setModel: Thresholding Least Squares estimator model

setModelR Documentation

Thresholding Least Squares estimator model

Description

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.

Usage

setModel(form, data, nknots = function(n) n^0.3, 
         knots0 = NA, knots1 = NA, userRem=NULL, ...)

Arguments

form

A formula for the regression (outcome versus treatment indicator) and a formula for the covariates to include in the regression, separated by |. See details.

data

A data.frame with all variables included in form.

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 NULL.

knots1

A list of knots for the control group. See knots0.

userRem

A vector of characters representing the covariates not to be apploximated by a piecewise polynomial.

...

Corrently not used.

Examples

data(simData)
mod1 <- setModel(Y~Z|~X1*X2, data=simData)
mod1

causalTLSE documentation built on March 31, 2023, 3:07 p.m.