Learn R Programming

countSTAR (version 1.0.2)

init_bam_thin: Initialize the parameters for an additive model

Description

Initialize the parameters for an additive model, which may contain both linear and nonlinear predictors. The nonlinear terms are modeled using low-rank thin plate splines.

Usage

init_bam_thin(y, X_lin, X_nonlin, B_all = NULL)

Value

a named list params containing

  1. mu: vector of conditional means (fitted values)

  2. sigma: the conditional standard deviation

  3. coefficients: a named list of parameters that determine mu

Arguments

y

n x 1 vector of data

X_lin

n x pL matrix of predictors to be modelled as linear

X_nonlin

n x pNL matrix of predictors to be modelled as nonlinear

B_all

optional pNL-dimensional list of n x L[j] dimensional basis matrices for each nonlinear term j=1,...,pNL; if NULL, compute internally