Hi Statalist!
I have a panel data set with multiple variables (X1, X2, ...). I am trying to run a multivariate regression for each country separately and store the coefficients in a single table. So far this is what I have:
tempname output
postfile `output' ID X1 X2 X3 X4 using output.dta,replace
levelsof ID, local(C)
foreach i of local C{
qui regress Y X1 X2 X3 X4 if id==`i'
post `output' (`i') (`=_b[X1]') (`=_b[X2]') (`=_b[X3]') (`=_b[X4]')
}
postclose `output'
My problem is that the "ID" variable has a long format and I am getting numbers in the output file, instead of actual country names. I do have a variable "country" that has a string format, but I just don't know how to transfer it to this new output file.
Any help would be much appreciated.
Related Posts with Storing values of a multivariate regression
2x3 categorical interactionHi Listers, I want to make sure I am correctly interpreting my 2*3 interaction following a logistic…
How Poisson pseudo-maximum Likelihood deals with overdispersion.Dear forum, My question is more theoretical, but I hope I can find an answer here. I am running a …
Create list of variables w/ different redaction patterns & dropping specific redacted variables based on other non-redacted varsHello, disclaimer: dataset contains PHI therefore I have recreated a replica with substituted varia…
Excluding certain items/variables from queryHello, I have a big dataset and I am trying to analyse children with all congenital heart diseases(C…
Converting monthly data into quarterly for a panel with multiple variablesHi all, I am working with a panel dataset which contains the following variables: wage bin (define…
Subscribe to:
Post Comments (Atom)
0 Response to Storing values of a multivariate regression
Post a Comment