ITG_step: Itegration by step function

Description Usage Arguments Value

Description

Sum up area under rectangle formulated by step function at observed time points.

Usage

1
ITG_step(X, basis, sseq, T.name = "TIME", from = 0, to = 1)

Arguments

X

a data.frame or vector

  • If X is a data.frame, dim(X)=nobs*(p+1), nobs is the total number of observations, p is size of covariates

  • If X is a vector, X is a sequence of observed time points

basis

a matrix of basis

sseq

a sequence used as predictor variable to generate basis

T.name

a character specifying name for time varaible in X

from, to

two scalers defining domain for integration - defalt values from = 0, to = 1.

Value

a scaler approximating integral. If X is a vector, taking integration for basis on user provided time points sequence.


Zhe-Research/compReg documentation built on May 28, 2019, 8:38 a.m.