makepen | R Documentation |
This function computes the penalty weights (omega) for each covaraite.
makepen(Z, C, pen.type = "eigen")
Z |
Matrix of exposures including interactions. |
C |
A n x p matrix of covaraites. |
pen.type |
Choice of penalty. The default is "eigen." Other options are "correlation" and "projection." |
dat_acpme1 <- simregimes(scenario="acpme1", seed=1234, n=200, p=100)
omega <- makepen(Z=scale(dat_acpme1$Z),C=scale(dat_acpme1$C))
par(mfrow=c(2,1))
plot(omega$omega)
pr <- exp(omega$omega*omega$lambda)/(1+exp(omega$omega*omega$lambda))
plot(pr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.