Heisenberg
Heisenberg

Reputation: 8806

Export Stata regression result to R?

My colleague and I chose Stata for regression analysis due to good handling of survey data. We also want to use R for graphics, but do not know how to export Stata regression model.

Within Stata, of course there is return list and ereturn list. But what's the best way to export these results outside of Stata? Direct to R would be ideal, but any intermediate format would be fine as well.

Upvotes: 4

Views: 1726

Answers (2)

0response
0response

Reputation: 21

I would advise using regsave

ssc install regsave

E.g. after a regression command you could use

regsave, tstat pval ci

to replace the current dataset by the estimation results and save it afterwards.

Upvotes: 2

Roberto Ferrer
Roberto Ferrer

Reputation: 11102

If I were to do this, I would create a Stata dataset with all the regression results using postfile. Then import it into R using, for example, some technique from here. Manipulate within R at your convenience.

See also the user-written command rsource: ssc describe rsource.

Disclaimer: my knowledge of R is rather limited.

Upvotes: 3

Related Questions