Description Usage Arguments Value Author(s) See Also Examples
The setx
command uses the variables identified in
the formula
generated by zelig
and sets the
values of the explanatory variables to the selected
values. Use setx
after zelig
and before
sim
to simulate quantities of interest.
1 |
obj |
the saved output from zelig |
fn |
a list of functions to apply to the data frame |
data |
a new data frame used to set the values of explanatory variables. If data = NULL (the default), the data frame called in zelig is used |
cond |
a logical value indicating whether
unconditional (default) or conditional (choose |
withdata |
If TRUE, then expressions for setting variables will be evaluated in a new environment created with the dataset of the passed saved output from zelig |
... |
user-defined values of specific variables for
overwriting the default values set by the function
|
For unconditional prediction, x.out
is a model
matrix based on the specified values for the explanatory
variables. For multiple analyses (i.e., when choosing
the by
option in zelig
, setx
returns the selected values calculated over the entire
data frame. If you wish to calculate values over just
one subset of the data frame, the 5th subset for example,
you may use: x.out <- setx(z.out[[5]])
Matt Owen mowen@iq.harvard.edu, Olivia Lau and Kosuke Imai
The full Zelig manual may be accessed online at http://gking.harvard.edu/zelig
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.