Hello, I am having some problems running my code in stata. The code is as follows:
regress dependent var1 if Indicator2==1
outreg2 using Hypothesis_1, pvalue replace excel sideway noparen e(r2_a) title(Loyaly Norm vs. Systemic Repression) cttop(OLS Binary, Unrestricted Universe)
quietly margins, at(var1=(0(.1)1)) atmeans vsquish post
marginsplot, recast(line) recastci(rarea) ti(Loyaly Norm vs. Systemic Repression) subtitle("OLS Binary, Unrestricted Universe")
graph save dependent_var1_Hypoth1A_OLSBinaryUnrestrictedUniv
graph export dependent_var1_Hypoth1A_OLSBinaryUnrestrictedUniv. png, width(800) height(600)
putexcel set Hypothesis_1, modify
putexcel A30=image(dependent_var1_Hypoth1A_OLSBinaryUnrestr ictedUniv.png)
Rather than creating an excel document entitled Hypothesis_1 and then appending my graphs on A30 of the same excel graph, the outreg2 portion of the code generates an XML file with my regression results at the top and the putexcel portion creates an XLS file with a graph starting on A30. I've tried converting the XML file to XLS using the outreg code or after, but the file is corrupted. The result is my regression is stuck in one file and my graph is in my xls file. I could just use putexcel to construct the regression model, but I like out outreg2 formats the regression results, and I want to line up about eight models next to eachother---outreg2 would create a chart that's easily readable.
At this point, I'm leaning towards just pasting in the graphs, but I have hundreds of models to run for my analysis, so that's going to be really annoying and waste a bunch of time i don't really have. Any advice you can provide would be super helpful.
I would provide my data--but my dataset is huge. If necessary, I can just cut a couple of variables for you guys to use if someone needs data to look at this.
Thank you,
Maeryn
Related Posts with Problems with Outreg2 for my dissertation
adding multiple tables to an existing sheet in excel or buliding two/three way table?Hello, I'm trying to build three tables (each one for a country based on var country_id) in excel. …
Customizing legend of twoway graph.Dear All, I am making a twoway graph as follows: Code: twoway (scatter daysMED week if dateWeek&…
Making long labels wrap into two lines using esttab on latexHi all, I am trying to tabulate some variables and export the data to latex using esttab (command f…
How to export difference-in-differences table from Stata to Latex?I'm trying to export the results from a difference-in-differences from Stata to Latex. I tried the f…
generate random number using loopforv i = 1/10{ if mod(`i',2)==0 gen z`i' = rnormal() if mod(`i',2)==1 gen z`i' = runiform() } i want…
Subscribe to:
Post Comments (Atom)
0 Response to Problems with Outreg2 for my dissertation
Post a Comment