- formula
a formula that specifies outcome and treatment variables.
- int2.formula
(optional). A formula that specifies two-way
interactions.
- int3.formula
(optional). A formula that specifies three-way
interactions.
- data
an optional data frame, list or environment (or object coercible
by 'as.data.frame' to a data frame) containing the variables in the model.
If not found in 'data', the variables are taken from 'environment(formula)',
typically the environment from which 'CausalANOVA' is called.
- nway
With nway=1
, the function estimates the Average Marginal
Effects (AMEs) only. With nway=2
, the function estimates the AMEs
and the two-way Average Marginal Interaction Effects (AMIEs). With
nway=3
, the function estimates the AMEs, the two-way and three-way
AMIEs. Default is 1.
- pair.id
(optional).Unique identifiers for each pair of comparison.
This option is used when diff=TRUE
.
- diff
A logical indicating whether the outcome is the choice between a
pair. If diff=TRUE
, pair.id
should specify a pair of
comparison. Default is FALSE
.
- cv.collapse.cost
A vector containing candidates for a cost parameter
ranging from 0 to 1. 1 corresponds to no regularization and the smaller
value corresponds to the stronger regularization. Default is
c(0.1,0.3,0.7)
.
- nfolds
number of folds - default is 5. Although nfolds can be as
large as the sample size (leave-one-out CV), it is not recommended for large
datasets.
- screen
A logical indicating whether select significant factor
interactions with glinternet
. When users specify interactions using
int2.formula
or int3.formula
, this option is ignored.
screen
should be used only when users want data-driven selection of
factor-interactions. With screen.type
, users can specify how to
screen factor interactions. We recommend to use this option when the number
of factors is large, e.g., more than 6. Default is FALSE
.
- screen.type
Type for screening factor interactions. (1)
"fixed"
select the fixed number (specified by screen.num.int
)
of factor interactions. (2) "cv.min"
selects factor-interactions with
the tuning parameter giving the minimum cross-validation error. (3)
"cv.1Std"
selects factor-interactions with the tuning parameter
giving a cross-validation error that is within 1 standard deviation of the
minimum cv error.
- screen.num.int
(optional).The number of factor interactions to
select. This option is used when and screen=TRUE
and
screen.type="fixed"
. Default is 3.
- family
A family of outcome variables. "gaussian"
when
continuous outcomes "binomial"
when binary outcomes. Default is
"binomial"
.
- cluster
Unique identifies with which cluster standard errors are
computed.
- maxIter
The number of maximum iteration for glinternet
.
- eps
A tolerance parameter in the internal optimization algorithm.
- seed
an argument for set.seed()
.
- fac.level
optional. A vector containing the number of levels in each
factor. The order of fac.level
should match to the order of columns
in the data. For example, when the first and second columns of the design
matrix is "Education" and "Race", the first and second element of
fac.level
should be the number of levels in "Education" and "Race",
respectively.
- ord.fac
optional. logical vectors indicating whether each factor has
ordered (TRUE
) or unordered (FALSE
) levels. When levels are
ordered, the function uses the order given by function levels()
. If
levels are ordered, the function places penalties on the differences between
adjacent levels. If levels are unordered, the function places penalties on
the differences based on every pairwise comparison.
- verbose
whether it prints the value of a cost parameter used.