Hello,
I am running a forvalues loop regression from years 1990 to 2010 (so 21 regressions in total at the same time)
Looks like this:
forvalues i=1990(1)2010{
regress mkval ni if fyear==`i' & high_tech==1
}
Basically I am running these 21 regressions on two groups (high_tech sample which is equal to 1 in this case and non high-tech sample where I would write high_tech==0).
My goal is to store the adjusted R-squared values of all these 21 regressions and then export them to an Excel file.
I tried the following command:
forvalues i=1990(1)2010{
regress mkval ni if fyear==`i' & high_tech==1
estimates store result `i'
}
However, I get the error 1990 invalid name. I am aware that 1990 is the first year in my sample and that I am running a loop on years but I don't really understand how to resolve this problem.
Once this is done, I would like to use the xml_tab command to export the R-squared values.
Thank you in advance for any help
I am running a forvalues loop regression from years 1990 to 2010 (so 21 regressions in total at the same time)
Looks like this:
forvalues i=1990(1)2010{
regress mkval ni if fyear==`i' & high_tech==1
}
Basically I am running these 21 regressions on two groups (high_tech sample which is equal to 1 in this case and non high-tech sample where I would write high_tech==0).
My goal is to store the adjusted R-squared values of all these 21 regressions and then export them to an Excel file.
I tried the following command:
forvalues i=1990(1)2010{
regress mkval ni if fyear==`i' & high_tech==1
estimates store result `i'
}
However, I get the error 1990 invalid name. I am aware that 1990 is the first year in my sample and that I am running a loop on years but I don't really understand how to resolve this problem.
Once this is done, I would like to use the xml_tab command to export the R-squared values.
Thank you in advance for any help
Comment