Hello,
I'm estimating a model where I have 74,000 equations, and I want to export the estimators to an excel matrix.
My loop looks like this:
putexcel set elasticities.xls, replace
foreach z of {
foreach v of num 1/273 {
display `v'
gen ln_proportion`v' = ln(proportion`v')
foreach k of num 1/273 {
display `k'
reg ln_proportion`v' p_q`v' price`v' pr`k' income
putexcel `z'`k' = e(b)
}
}
}
The problem is the outside of the loop, cause I don't know how to assign the corresponding letters to the rows on excel (A,B,C....AA,AB,AC)
I was thinking of using the tokenize command to generate the whole ABCDEFGH.... code and break it into small parts but I haven't used it before and can't figure out how to do it.
Related Posts with Export matrix to excel. How to asign rows on a loop
estat archlm, lags(1) no observations r(2000)Hello. I am working to build a CAPM-GARCH model in Stata in order to explain and predict the return…
GSEM: Using a latent variable as an explanatory variable in the multinomial logistic regressionHi, Is it possible to use CFA outputs, latent variables, as explanatory (independent) variables in …
Problem with tokenize a local variable using mata and tabstatmatHi all, I am trying to get label names from a tabstat matrix, I am using tabstatmat ado, an example…
Formatting Date so STATA can understand...I have date from Excel that is formatted as 8/31/15. The date has gaps. What's the optimal way of fo…
Plotting a subset of a sample (%) using a barchartHi, I am trying to plot the share of male smokers of the population against the 4 education categor…
Subscribe to:
Post Comments (Atom)
0 Response to Export matrix to excel. How to asign rows on a loop
Post a Comment