Description Usage Arguments Details Value Note Author(s) References See Also Examples
Constructs NN by estimating pscores with a GLM and estimates a linear model in a DD setting
1 2 3 4 5 6 7 8 |
formula |
a formula expression of the form |
data |
a data frame containing the variables occurring in the formulas such as time and group identifiers. The data has to be a panel. |
indexes |
a list containing the name of the time, group, treatment identifier, and the outcome variable #Fixme: last two not really necessary |
nn_time |
a list containing the start timing and end timing for the NN estimation. The GLM is estimated at the end timing. However, it contains all regressor variables lagged in the given interval (start , end). |
t_time |
a string containing the timing of the treatment. |
time_ids |
#Fixme: delete this |
family |
family of the GLM. #Fixme: not implemented in NnDd, but in predict.NnDd |
subset |
an optional vector specifying a subset of observations to be used for fitting. |
na.action |
a function which indicates what should happen when the data
contain |
model |
logical. If |
x, y |
#Fixme: do I need this? |
... |
arguments to be passed on to the estimation of the DD (lm.fit) |
object_NnDd |
an object of class |
call |
a call of a |
plot.NnDd
Creates eight plots in one window. The first tow plots are the distribution of the treated and control pscores pre and post the Nn selection. If data is not specified the pre Nn plot is omitted. In the following the outcome variable of the Dd estimation is plotted over time. For a description of the last four plots see plot.lm
.
NnDd |
An object of class |
nndd_reshape |
A data.frame containing a reshaped model matrix of the |
nndd_reshape_other |
A data.frame containing reshaped data. |
predict_fun_glm |
A list containing pscores. |
predict.NnDd |
A data.frame containing the specified predictions. |
print.NnDd |
Returns the imputed object. |
plot.NnDd |
#Fixme: Ns are not well chosen at the Density plots (the N is of the control) Name of the plot is returned. |
Fixme
[aut]
Fixme
Fixme:
1 2 3 4 5 6 7 8 | require(Formula)
set.seed(2015-5-23)
data <- gen_data(treated.n = 50, control.n = 50)
formula <- Formula(tg | outcome ~ X6+X9+X10+X11 | X6+X9+X10+X11+X12+X13)
nndd <- NnDd(formula, data = data, indexes = c("year", "firm_id", "tg", "outcome"),
nn_time = c(1997,2001), t_time = "2002")
names(nndd)
print(nndd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.