We provide a multilevel logit model based on panel data which allows a capturing of the determinants of investment in their capacity for generating renewable energy in farms. As a novelty, we focus on regional determinants in order to assess the role of the regional dimension in making decisions by farmers about whether or not to invest in renewable energy generation. The relevance of this territorial/regional dimension acquires even greater significance in countries with a high degree of administrative decentralization, as is the case in Spain; where energy legislation gives a central role to regional governments in aspects related to the promotion of renewable energy sources. Multilevel analysis allows us to evaluate together both dimensions: Individual and regional. The results highlight the importance of the R & D investment carried out in regions, as well as the fact that there is an environment that favors the diffusion of renewable energies into the territory. Other variables, such as the level of agricultural income or regional energy intensity, do not seem to have significant relevance in the light of these results.Farmers", the estimated contribution of farms in the production of renewable energy could amount to 25% of total renewable energy generated.Another noteworthy fact is that more than three quarters of the energy consumed in agriculture comes from fossil fuels, a percentage only surpassed by the Transport sector. That is why the agricultural sector plays an important role in the European transition strategy towards an energy system based upon renewable energy. This circumstance is evident in the incentives to diversify farm activity through the production of this type of energy [3][4][5]. For example, the Renewable Energy Plan for Spain 2011-2020 includes various proposals to encourage the use of renewable energies in agricultural holdings, such as photovoltaic, low power wind energy, or geothermal energy for application in greenhouses and the heating of floors. Moreover, in the National Integrated Energy and Climate Plan [6], it is expected that the presence of renewable energy in the agricultural sector will increase from 94 to 278 kilotonnes of oil equivalent (ktep) over the period 2021-2030. There are four main types of sources established in the agricultural sector: Bio, solar, wind and geothermal energy [7]. It is not easy to make a detailed estimate of the mix of renewable energy production specific to the agricultural sector. In this regard, Pedroli & Langeveld [2] estimate energy production from farms in the EU in 2008, for two alternative scenarios in 2020: One consistent with the national renewable energy plans (NREAPs), and another in which the scenario is modified, based on the NREAPs to take into account additional stimulus measures for the deployment of renewable energies designed from the specific characteristics of the farms in each country (NREAPs +). The structures derived from the three cases are shown in Table 1: