lmmen: linear mixed model Elastic Net

Description Usage Arguments Details Value See Also Examples

Description

Regularize a linear mixed model with the linear mixed model Elastic Net penalty.

Usage

1
lmmen(data, init.beta, frac, eps = 10^(-4), verbose = FALSE)

Arguments

data

matrix, data

init.beta

numeric, initial values for fixed effects coefficients

frac

numeric, penalty levels for fixed and random effects expressed in ratios. c(L1.fixed,L2.fixed,L1.random,L2.random)

eps

numeric, tolerance level to pass to solve.QP, Default: 10^(-4)

verbose

boolean, show output during optimization Default: FALSE

Details

y_i=x^{t}_{ij}β+z^{t}_{ij}b_i+ε_i,

ε_i\sim N(0,σ^2I_{n_i})

The lmmen function solves for the folloing problem.

Q(φ|y,b)=||y-ZΛΓ b-Xβ||^2+\tilde{P}(β,d)

\tilde{P}(β,d)=

λ_2^f∑\limits_{i\in P}β_i^2+λ_2^r∑\limits_{j\in Q}d_j^2+

λ_1^f∑\limits_{i \in P}|β_i|+λ_1^r∑\limits_{j \in Q}|d_j|

Where \tilde{P} and Q(φ) denote the penalty applied to the likelihood and the penalized log-likelihood.

When the final model is not a mixed effects model, but either a fixed effects or random effects model then the original form of the Elastic Net penalty is applied.

Value

lmmen fit object including

fixed: estimated fixed effects coefficients

stddev: estimated random effects covariance matrix standard deviations

sigma.2: standard error of the model residual effect

lambda: estimated lower triangle of Λ (correlation of random effects)

Mean.est: model prediction X^{t}β

loglike: log likelihood

df: degrees of freedom

BIC: Minimum BIC penalty value

frac: ratio placed on the penalties corresponding to BIC

Gamma.Mat.RE: estimated Γ

Cov.Mat.RE: estimated random effect covariance matrix

Corr.Mat.RE: estimate random effects correlation matrix

solveQP: output of the call to solveQP corresponding to min BIC

See Also

solve.QP

Examples

1
2
3
 dat <- initialize_example(n.i = 5,n = 30,q=4,seed=1)
 init <- init.beta(dat,method='glmnet')
 lmmen(data=dat,init.beta=init,frac=c(0.8,1,1,1))

yonicd/lmmen documentation built on May 9, 2019, 2:29 p.m.