Hi! I have created a few variables that I'd like to export to an excel file. I have variables rf1 through rf4 and fs and we1 through we4 . How do I create a table where my values are reported in rows so that the row reads Variable Name rf1 ---> fs ---> we1 and the row below is the next variable name ---> rf2 ---> fs ---> we2 .... and so on? My code so far is below (I'm saving the coefficients on variables from my regressions):
regress workedm multi2nd, robust
gen rf1=_b[multi2nd]
regress hourswm multi2nd, robust
gen rf2=_b[multi2nd]
regress incomem multi2nd, robust
gen rf3=_b[multi2nd]
regress weeksm1 multi2nd, robust
gen rf4=_b[multi2nd]
*first stage
regress morekids multi2nd, robust
gen fs=_b[multi2nd]
display fs
gen we1=(rf1)/(fs)
gen we2=(rf2)/(fs)
gen we3=(rf3)/(fs)
gen we4=(rf4)/(fs)
display we1
display we2
display we3
display we4
Related Posts with Exporting Variables to Excel
add one variable from one dataset to another one: error variable V2 does not uniquely identify observations in the master dataHell everyone, I have a dataset with V2 - country code (in the codebook each country has a code so…
Instrumental Variable for binary dependant variable and binary instrument and binary endogenous variableHi, What model should I use? Currently, my model looks like this:ivregress 2sls depressed L.formal…
Adding prefix to all observations in columnI have a column of identifiers which are e.g. : 58473J 50046Q 22631J I would like to add a prefix …
Instrumental Variable method for binary dependant variable and binary instrument and binary endogenous variableHi, What model should I use? Currently, my model looks like this:ivregress 2sls depressed L.formal…
Individual time span reference per observationDear community, I have a dataset with about 3 million observations. Each observation has a time id,…
Subscribe to:
Post Comments (Atom)
0 Response to Exporting Variables to Excel
Post a Comment