Learn R Programming

dlnm (version 2.4.7)

dlnm-internal: Internal Functions for Package dlnm

Description

These functions are called internally by other functions and are not meant to be directly run by the users.

Usage

fci(ci, x, high, low, ci.arg, plot.arg, noeff=NULL)

findrank(X)

getcoef(model, class)

getlink(model, class, model.link=NULL)

getvcov(model, class)

mkaddSlag(addSlag, d)

mkat(at, from, to, by, range, lag, bylag)

mkcen(cen, type, basis, range)

mklag(lag)

mkXpred(type, basis, at, predvar, predlag, cen)

seqlag(lag, by=1)

Arguments

ci

type of confidence intervals representation.

x

the coordinates of the x axis.

high, low

the coordinates of the y axis for the interval.

ci.arg

list of arguments to draw the confidence intervals.

plot.arg

list of arguments of the main plot.

noeff

reference value of the null effect.

X

a matrix.

model

a regression model object.

class

a regression model class.

addSlag

matrix or vector (or list of matrices and/or vectors) defining additional penalties on the lag structure.

d

numeric vector of length 2 providing the cross-basis dimensions.

at

either a numeric vector representing the values of a constant exposure throughout the lag period defined by lag, or a matrix of exposure histories over the same lag period used for estimation.

from, to

range of predictor values used for prediction.

by, bylag

increment of the sequences of predictor and lag values used for prediction.

range

range of values used for prediction.

lag

either an integer scalar or vector of length 2, defining the the maximum lag or the lag range, respectively.

cen

logical or a numeric scalar. It specifies the centering value, then used as a reference for predictions.

type, basis

type of model and related basis object from which predictions are needed. See crosspred.

predvar

vector or matrix of predictor values used for prediction

predlag

vector or matrix of lag values used for prediction

Details

The function fci provides different options for representing confidence intervals, and it is called internally in plotting functions.

The function findrank returns the rank of a matrix.

The functions getcoef, getlink, and getvcov extract coefficients, the model link, and (co)variance matrix, respectively, depending on the class of the model, and returns a message error if the process fails. They are used internally in crosspred and crossreduce.

The function mkaddSlag returns a list of rescaled penalty matrices defining additional penalties on the lag structure. It is used intenally in functions for performing penalized models.

The function mkat is used internally in crosspred to define the values used for predictions.

The function mkcen is used internally in crosspred to define the centering value for computing predictions.

The functions mklag is used internally in several other functions to check/define the vector of length 2 representing the lag interval.

The function mkXpred is used internally in crosspred to define the basis or cross-basis matrix for computing predictions.

The function seqlag is used internally in several other functions to create the vector with the sequence of lags given the range provided.

See Also

See dlnm-package for an introduction to the package and for links to package vignettes providing more detailed information.

Examples

Run this code
# NOT RUN {
### display internal functions
dlnm:::getcoef
getAnywhere(getcoef)

### display other undocumented functions
dlnm:::fci
getAnywhere(fci)
# }

Run the code above in your browser using DataLab