G.spline: Family of spline instrumental functions

View source: R/BoundingCovariateEffects.R

G.splineR Documentation

Family of spline instrumental functions

Description

This function normalizes the covariates to lie in the unit interval and then evaluates each B-spline at each observation, multiplying together the results per observation.

Usage

G.spline(
  x,
  g.idx,
  data,
  n.if.per.cov,
  norm.func,
  cov.ranges = NULL,
  norm.cov.out = NULL,
  degree = 3
)

Arguments

x

The vector of covariates at which to evaluate the B-splines

g.idx

The index of the instrumental function. Note that g.idx ranges between 1 and n.if.per.cov^n.cov, as an instrumental function is the product of the appropriate B-spline evaluation for each element in the covariate vector.

data

Data frame containing the data.

n.if.per.cov

Number of instrumental variables to be used per covariate.

norm.func

Function to be used to normalize the covariates.

cov.ranges

Matrix of ranges of the covariates. Used for normalizing the covariates. If cov.ranges = NULL, the data will be normalized in a data-dependent way. Default is cov.ranges = NULL.

norm.cov.out

Output of a preliminary call to the given covariate normalization function. Default is norm.cov.out = NULL.

degree

Degree of B-splines to use. Default value is degree = 3.


depCensoring documentation built on April 4, 2025, 1:52 a.m.