Dear Statalist members,
I have a penal data crop plot level profit every season. i want to calculate xtreg results using below command
xtreg ln_m_net_profit_ac ln_operational_land ln_m_labor_hrs_ac ln_m_capital_val_ac i.plot_location i.Year , fe
but here log of operational land of the household ( ln_operational_land) is an endogenous variable . hence to tackle endogeneity, i used average operational land for previous generation for each household as instrumental variable.
This data is collected for 2009-2014 at plot level and operational land is a household level variable. operational land may vary each year during 2009-2014 but average operational land for previous generation as instrumental variable (ln_operational_land_ivs) does not vary.
I used 2sls xtivreg results to first and second stage results but I got error after using below command
xi:xtivreg2 ln_m_net_profit_ac ln_m_labor_hrs_ac ln_m_capital_val_ac i.plot_location i.Year (ln_operational_land = ln_operational_land_ivs), fe cluster (plot_ids time_ids )
Error: Warning - singleton groups detected. 69 observation(s) not used.
Warning - collinearities detected
Vars dropped: ln_operational_land_ivs
equation not identified; must have at least as many instruments not in
the regression as there are instrumented variables
Please help me to understand the problem. I have attached sample dataset
Thanks
I have a penal data crop plot level profit every season. i want to calculate xtreg results using below command
xtreg ln_m_net_profit_ac ln_operational_land ln_m_labor_hrs_ac ln_m_capital_val_ac i.plot_location i.Year , fe
but here log of operational land of the household ( ln_operational_land) is an endogenous variable . hence to tackle endogeneity, i used average operational land for previous generation for each household as instrumental variable.
This data is collected for 2009-2014 at plot level and operational land is a household level variable. operational land may vary each year during 2009-2014 but average operational land for previous generation as instrumental variable (ln_operational_land_ivs) does not vary.
I used 2sls xtivreg results to first and second stage results but I got error after using below command
xi:xtivreg2 ln_m_net_profit_ac ln_m_labor_hrs_ac ln_m_capital_val_ac i.plot_location i.Year (ln_operational_land = ln_operational_land_ivs), fe cluster (plot_ids time_ids )
Error: Warning - singleton groups detected. 69 observation(s) not used.
Warning - collinearities detected
Vars dropped: ln_operational_land_ivs
equation not identified; must have at least as many instruments not in
the regression as there are instrumented variables
Please help me to understand the problem. I have attached sample dataset
Thanks
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(plot_ids time_ids) float(ln_m_net_profit_ac ln_MAIN_PLOT_AREA ln_operational_land ln_operational_land_ivs ln_m_labor_hrs_ac ln_m_capital_val_ac Year) long plot_location 2112 2 . .6931472 .6931472 .9707789 6.824374 8.992185 2009 1 2112 4 9.165203 .6931472 .6931472 .9707789 6.333871 8.673855 2009 1 2112 17 8.633103 .6931472 .6931472 .9707789 6.052089 8.814665 2012 1 2113 2 . 1.0986123 1.0986123 1.867176 5.644269 8.961107 2009 1 2113 7 9.307477 1.0986123 1.0986123 1.867176 6.122493 8.58703 2010 1 2113 12 . 1.0986123 1.0986123 1.867176 5.991465 9.283408 2011 1 2113 17 9.2536 1.0986123 1.0986123 1.867176 6.118097 9.25057 2012 1 2113 22 9.862342 1.0986123 1.0986123 1.867176 5.821072 9.097601 2013 1 2113 27 . 1.0986123 1.0986123 1.867176 5.155217 8.881327 2014 1 2143 4 . -.6931472 0 .3220835 4.3307333 6.745236 2009 1 2143 22 9.640028 -.6931472 1.0986123 .3220835 6.605298 9.434621 2013 1 2144 4 . -.6931472 0 .3220835 4.3307333 6.745236 2009 1 2144 22 9.476099 .9162908 1.0986123 .3220835 5.304962 8.797382 2013 1 2144 27 . .9162908 1.0986123 .3220835 5.002603 8.560498 2014 1 2148 2 . 1.0986123 1.609438 1.7509375 4.3985558 5.922472 2009 1 2149 2 7.488321 0 1.609438 1.7509375 6.461468 8.414706 2009 1 2150 2 . 0 1.609438 1.7509375 6.590301 8.7045355 2009 1 2150 4 8.637284 0 1.609438 1.7509375 6.539586 8.257904 2009 1 2176 2 . .6931472 .6931472 1.901361 6.190315 8.603454 2009 1 2176 7 9.017366 .6931472 .6931472 1.901361 6.57368 8.859924 2010 1 2177 12 8.107305 .6931472 .6931472 1.901361 6.030685 8.780664 2011 1 2177 17 9.339705 .6931472 .6931472 1.901361 6.090178 9.088822 2012 1 2178 7 . .9162908 2.0794415 1.1143216 4.644391 6.626718 2010 1 2179 17 8.725184 1.252763 1.704748 1.1143216 5.793014 8.893298 2012 1 2179 22 7.543363 1.252763 1.704748 1.1143216 5.554509 9.098202 2013 1 2180 2 . 1.252763 2.2823825 1.1143216 5.477857 7.666292 2009 1 2180 4 . 1.252763 2.2823825 1.1143216 6.498282 8.619027 2009 1 2180 7 . 1.252763 2.0794415 1.1143216 6.193589 8.4487 2010 1 2180 9 7.604895 1.252763 2.0794415 1.1143216 6.133398 8.934192 2010 1 2180 12 . 1.252763 1.8405497 1.1143216 5.676754 8.795161 2011 1 2180 14 . 1.252763 1.8405497 1.1143216 5.437288 8.266025 2011 1 2181 2 . .6931472 2.2823825 1.1143216 5.40139 7.590217 2009 1 2181 4 10.393232 .6931472 2.2823825 1.1143216 7.352441 9.078179 2009 1 2181 7 10.831265 .6931472 2.0794415 1.1143216 6.861362 8.091015 2010 1 2181 17 8.918162 .6931472 1.704748 1.1143216 5.836758 8.934982 2012 1 2181 22 8.132054 .6931472 1.704748 1.1143216 5.47227 8.9593115 2013 1 2181 27 . .6931472 1.704748 1.1143216 3.5115454 8.274931 2014 1 2182 4 6.610397 .5877866 2.2823825 1.1143216 4.627149 5.196039 2009 1 2182 12 . .5877866 1.8405497 1.1143216 6.086775 8.58119 2011 1 2183 12 8.017653 0 1.8405497 1.1143216 6.198479 8.568143 2011 1 2186 4 5.560682 1.3862944 2.484907 2.018231 4.85203 7.090077 2009 1 2186 12 . 1.3862944 2.484907 2.018231 4.7361984 7.914778 2011 1 2186 17 8.849896 1.3862944 2.484907 2.018231 6.049734 8.9028635 2012 1 2186 22 9.989823 1.3862944 2.484907 2.018231 6.014937 8.916976 2013 1 2186 27 . 1.3862944 1.3862944 2.018231 5.062595 8.46985 2014 1 2187 2 . 2.0794415 2.484907 2.018231 5.743003 8.852186 2009 1 2187 4 9.410327 2.0794415 2.484907 2.018231 6.360727 8.4524765 2009 1 2187 7 8.574793 2.0794415 2.0794415 2.018231 5.868783 8.09809 2010 1 2187 9 8.9774475 2.0794415 2.0794415 2.018231 6.269096 8.397959 2010 1 2187 12 8.775703 2.0794415 2.484907 2.018231 5.898527 7.739577 2011 1 2187 14 7.174957 2.0794415 2.484907 2.018231 5.83909 8.183714 2011 1 2187 17 8.070884 2.0794415 2.484907 2.018231 5.853023 8.99886 2012 1 2187 19 . 2.0794415 2.484907 2.018231 6.359574 9.072686 2012 1 2187 22 9.726792 2.0794415 2.484907 2.018231 5.849103 8.953013 2013 1 2187 24 8.433899 2.0794415 2.484907 2.018231 6.466145 9.619771 2013 1 2196 27 . 0 1.94591 2.1036463 5.659482 8.633037 2014 1 2197 2 . 1.609438 1.94591 2.1036463 5.181784 8.21059 2009 2 2197 7 9.336774 1.609438 1.94591 2.1036463 6.182085 8.575462 2010 1 2197 27 . 1.609438 1.94591 2.1036463 5.537334 8.672332 2014 1 2220 2 8.470752 1.609438 2.420368 2.5103216 5.713733 7.177324 2009 1 2220 4 9.592049 1.609438 2.420368 2.5103216 6.415915 8.201454 2009 1 2220 9 7.796151 1.609438 1.609438 2.5103216 6.350304 8.271293 2010 1 2220 12 . 1.609438 2.420368 2.5103216 4.6051702 7.200425 2011 1 2220 22 9.706996 1.609438 2.7568405 2.5103216 5.795044 8.801607 2013 1 2221 2 7.734209 1.8325815 2.420368 2.5103216 5.468977 7.614381 2009 1 2221 12 . 1.8325815 2.420368 2.5103216 5.416841 8.159472 2011 1 2221 17 8.79839 1.8325815 2.420368 2.5103216 6.21912 9.210549 2012 1 2221 22 9.289739 1.8325815 2.7568405 2.5103216 6.03966 8.988478 2013 1 2221 27 8.189953 1.8325815 2.8763855 2.5103216 5.537334 8.947205 2014 1 2222 22 8.180321 .9162908 2.7568405 2.5103216 5.605802 6.709304 2013 1 2222 27 9.183585 .9162908 2.8763855 2.5103216 5.56987 8.946896 2014 1 2223 22 10.647625 .6931472 2.7568405 2.5103216 5.700444 8.705746 2013 1 2232 2 7.539551 2.014903 2.6390574 2.6436894 5.962194 8.439681 2009 1 2232 4 8.511879 2.014903 2.6390574 2.6436894 5.951944 8.309061 2009 1 2232 7 9.321845 2.014903 2.2512918 2.6436894 6.291569 8.80119 2010 1 2232 9 6.959715 2.014903 2.2512918 2.6436894 6.335054 8.950706 2010 1 2232 12 8.804358 2.014903 2.2512918 2.6436894 6.158607 8.713908 2011 1 2232 14 7.863899 2.014903 2.2512918 2.6436894 6.095825 8.747316 2011 1 2232 17 9.284389 2.014903 2.2512918 2.6436894 6.448889 9.476438 2012 1 2232 19 8.489822 2.014903 2.2512918 2.6436894 6.120297 8.997766 2012 1 2232 22 9.843921 2.014903 2.2512918 2.6436894 6.018032 8.903611 2013 1 2232 24 9.204134 2.014903 2.2512918 2.6436894 6.304449 9.110726 2013 1 2232 27 . 2.014903 2.2512918 2.6436894 5.889801 9.3877945 2014 1 2232 29 9.425344 2.014903 2.2512918 2.6436894 6.032287 8.763741 2014 1 2233 2 7.549741 .6931472 2.6390574 2.6436894 5.971262 8.259549 2009 1 2233 7 8.416721 .6931472 2.2512918 2.6436894 6.156979 8.387256 2010 1 2233 12 . .6931472 2.2512918 2.6436894 5.828946 8.4247265 2011 1 2233 17 9.531973 .6931472 2.2512918 2.6436894 6.156979 8.862271 2012 1 2233 22 9.430882 .6931472 2.2512918 2.6436894 6.045005 9.281754 2013 1 2233 27 . .6931472 2.2512918 2.6436894 5.560682 9.020813 2014 1 2234 2 5.665431 1.5040774 2.6390574 2.6436894 5.710427 8.157109 2009 1 2244 7 9.65037 .6931472 1.252763 2.339881 6.38097 8.750279 2010 1 2244 12 . .6931472 1.252763 2.339881 5.749393 8.739108 2011 1 2244 17 8.606994 .6931472 1.252763 2.339881 6.182085 9.033782 2012 1 2244 22 9.438463 .6931472 1.252763 2.339881 5.950643 9.223316 2013 1 2244 27 . .6931472 1.252763 2.339881 5.31812 8.504107 2014 1 2277 2 7.687607 2.0794415 2.1972246 2.249975 5.935952 8.641983 2009 1 2277 4 8.820045 2.0794415 2.1972246 2.249975 6.088073 8.762981 2009 1 2277 7 8.638821 2.0794415 2.1972246 2.249975 6.156555 8.827261 2010 1 2277 9 9.458324 2.0794415 2.1972246 2.249975 6.284134 8.616314 2010 1 end label values plot_ids plot_ids label def plot_ids 2112 "INAPAUR110010000AOwn land", modify label def plot_ids 2113 "INAPAUR130030000AOwn land", modify label def plot_ids 2143 "INAPAUR134034000AOwn land", modify label def plot_ids 2144 "INAPAUR134034000BLeased-in on fixed rent", modify label def plot_ids 2148 "INAPAUR135035000AOwn land", modify label def plot_ids 2149 "INAPAUR135035000BOwn land", modify label def plot_ids 2150 "INAPAUR135035000CLeased-in on fixed rent", modify label def plot_ids 2176 "INAPAUR143043000AOwn land", modify label def plot_ids 2177 "INAPAUR143043000BLeased-in on fixed rent", modify label def plot_ids 2178 "INAPAUR144044000AOwn land", modify label def plot_ids 2179 "INAPAUR144044000BLeased-in on fixed rent", modify label def plot_ids 2180 "INAPAUR144044000BOwn land", modify label def plot_ids 2181 "INAPAUR144044000CLeased-in on fixed rent", modify label def plot_ids 2182 "INAPAUR144044000DLeased-in on fixed rent", modify label def plot_ids 2183 "INAPAUR144044000ELeased-in on fixed rent", modify label def plot_ids 2186 "INAPAUR146046000AOwn land", modify label def plot_ids 2187 "INAPAUR146046000BOwn land", modify label def plot_ids 2196 "INAPAUR148048000AOwn land", modify label def plot_ids 2197 "INAPAUR148048000COwn land", modify label def plot_ids 2220 "INAPAUR153053000AOwn land", modify label def plot_ids 2221 "INAPAUR153053000BOwn land", modify label def plot_ids 2222 "INAPAUR153053000COwn land", modify label def plot_ids 2223 "INAPAUR153053000DOwn land", modify label def plot_ids 2232 "INAPAUR155055000AOwn land", modify label def plot_ids 2233 "INAPAUR155055000BOwn land", modify label def plot_ids 2234 "INAPAUR155055000COwn land", modify label def plot_ids 2244 "INAPAUR181081000AOwn land", modify label def plot_ids 2277 "INAPAUR182082000AOwn land", modify label values time_ids time_ids label def time_ids 2 "2009Kharif", modify label def time_ids 4 "2009Rabi", modify label def time_ids 7 "2010Kharif", modify label def time_ids 9 "2010Rabi", modify label def time_ids 12 "2011Kharif", modify label def time_ids 14 "2011Rabi", modify label def time_ids 17 "2012Kharif", modify label def time_ids 19 "2012Rabi", modify label def time_ids 22 "2013Kharif", modify label def time_ids 24 "2013Rabi", modify label def time_ids 27 "2014Kharif", modify label def time_ids 29 "2014Rabi", modify label values plot_location plot_location label def plot_location 1 "Inside", modify label def plot_location 2 "Outside", modify
Comment