genBasisSplines: Generate basis matrix for splines

Description Usage Arguments Value

View source: R/mtr.R


The user can declare that the unobservable enters into the MTRs in the form of splines. This function generates the basis matrix for the splines. The specifications for the spline must be passed as the $splineslist object generated by removeSplines. Note that this function does not account for any interactions between the splines and the covariates. Interactions can be added simply by sweeping the basis matrix by a vector for the values of the covariates.





a list. The name of each element should be the spline command, and each element should be a vector. Each entry of the vector is a covariate that the spline should be interacted with. Such an object can be generated by removeSplines, and accessed using $splineslist.


the values of the unobservable at which the splines basis should be evaluated.


either 0 or 1, indicating the treatment status.


a matrix. The number of rows is equal to the length of x, and the number of columns depends on the specifications of the spline. The name of each column takes the following form: "u[d]S[j].[b]", where "u" and "S" are fixed and stand for "unobservable" and "Splines" respectively. "[d]" will be either 0 or 1, depending on the treatment status. "[j]" will be an integer indicating which element of the list splines the column pertains to. "[b]" will be an integer reflect which component of the basis the column pertains to.

ivmte documentation built on Sept. 17, 2021, 5:06 p.m.