| setModel | R Documentation |
This function creates an object of class tlseModel. The model
contains all specifications about the model being estimated including
the starting knots for the control and treated group for the piecewise
polynomial.
setModel(form, data, nknots = function(n) n^0.3,
knots0 = NA, knots1 = NA, userRem=NULL, ...)
form |
A formula for the regression (outcome versus treatment
indicator) and a formula for the covariates to include in the
regression, separated by |
data |
A |
nknots |
A function to determined the number of knots. It has to be a function of one argument, the sample size. To fix it, simply input a function that returns an integer. |
knots0 |
A list of knots for the control group. The length must
be equal to the number of covariates. The number of knots is 0 an
element of the list is set to |
knots1 |
A list of knots for the control group. See |
userRem |
A vector of characters representing the covariates not to be apploximated by a piecewise polynomial. |
... |
Corrently not used. |
data(simData)
mod1 <- setModel(Y~Z|~X1*X2, data=simData)
mod1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.