Description Usage Arguments Value Examples
A general function to estimate average and conditional treatment effects for a count outcome.
1 2 3 4 5 6 7 8 9 10 11 12 | countEffects(
y,
x,
k = NULL,
z = NULL,
data,
method = "nb",
distribution = "condNormal",
control = "default",
measurement = list(),
na.rm = TRUE
)
|
y |
Dependent variable (character string). Has to be the name of a count variable (i.e., non-negative integer). |
x |
Treatment variable (character string) currently treated as binary variable. |
k |
Categorical covariate (character string). |
z |
Continuous covariate (character string). |
data |
A data frame. |
method |
By default a negative binomial regression model is fitted (i.e., |
distribution |
Distribution of the covariate. By default, normal distribution is assumed (i.e., |
control |
Name or value of the control group |
measurement |
List containing information for a measurement model (i.e., name of the latent variable and its indicators) |
na.rm |
Should rows with missing values be removed? |
Object of class countEffects.
1 2 3 4 | ## Example with normally distributed covariate:
m1 <- countEffects(y="dv", x="treat", z="pre", data=example01,
method="poisson", distribution="condNormal")
summary(m1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.