mgcv_lambda: Maximum marginal likelihood score

Description Usage Arguments Details Value References See Also

View source: R/MultiLambdaCVfun.R

Description

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

Usage

1
2
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 15, 2021, 9:08 a.m.