mgcv_lambda: Maximum marginal likelihood score

View source: R/MultiLambdaCVfun.R

mgcv_lambdaR Documentation

Maximum marginal likelihood score

Description

Computed maximum marginal likelihood score for given penalty parameters using mgcv.

Usage

mgcv_lambda(penalties, XXblocks,Y, model=NULL, printscore=TRUE, pairing=NULL, sigmasq = 1,
  opt.sigma=ifelse(model=="linear",TRUE, FALSE))

Arguments

penalties

Numeric vector.

XXblocks

List of nxn matrices. Usually output of createXXblocks.

Y

Response vector: numeric, binary, factor or survival.

model

Character. Any of c("linear", "logistic", "cox"). Is inferred from Y when NULL.

printscore

Boolean. Should the score be printed?

pairing

Numerical vector of length 3 or NULL when pairs are absent. Represents the indices (in XXblocks) of the two data blocks involved in pairing, plus the index of the paired block.

sigmasq

Default error variance.

opt.sigma

Boolean. Should the error variance be optimized as well? Only relevant for model="linear".

Details

See gam for details on how the marginal likelihood is computed.

Value

Numeric, marginal likelihood score for given penalties

References

Wood, S. N. (2011), Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models, J. Roy. Statist. Soc., B 73(1), 3-36.

See Also

CVscore for cross-validation alternative. A full demo and data are available from:
https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4


multiridge documentation built on June 13, 2022, 5:07 p.m.