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
Population-weighted estimate with panel dataHi all, I have a problem in estimation with panel data. I would like to study the correlation betwe…
Instrumental Variable Affecting a Control Variable in Control Function ApproachDear all, I have a binary dependent variable Y, endogenous variable X, control variables C1 and C2,…
Help tracking down a possible bug under an older version of Stata: error 197, syntax statementHi all, This is a bit of an odd request, and it might end up going nowhere. I am the current maint…
Running Mixed Logit Models with > 20 Random CoefficientsHi there, I'm trying to run a Mixed Logit Model using the user written mixlogit command of the form…
Change Histogram Axis labels for 2 valuesHi ! I want to create an histogram in Stata. I can do it but I also want to change the value "0" a…
Subscribe to:
Post Comments (Atom)
0 Response to Export matrix to excel. How to asign rows on a loop
Post a Comment