Description Usage Arguments Details Value See Also Examples
Run a model in Stata and return marginal or predicted effects for you
1 2 |
model |
string of the desired model (in stata syntax) |
margs |
list of strings, each of which should represent a margins command (in stata syntax) and have a name |
df |
data frame |
do_file_name |
string of what the do file should be called |
wd |
working directory for storing stata files |
limit |
time limit (in seconds) on how long stata should run, defaults to 10 seconds |
dta_file_name |
string, name of dta file and defaults to 'tmp.dta' |
verbose |
defaults to FALSE |
You will need to install estout
in Stata for this to run. You can just run
stata ssc install estout, replace
from the command line.
To improve performance, try to only pass the variables of the data frame that you actually need.
If the code errors out, you should always look at the log file that is
generated from the analysis.
You should be able to find that in the working directory that you set.
The other thing that you might want to do is delete any temporary text files
that were created (they will have the names of the list items you passed in
the margs
parameter).
Some notes on idiosyncratic Stata things. First, it doesn't handle periods in dataframe names, so you'll want to fix that in your original dataset. Second, the variable names can only be so long, so if you have very long names, you should rename them before you pass them through this argument.
a list containing model output and margins output
http://www.stata.com/help.cgi?margins
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.