Description Usage Arguments Examples
Extract the 0 or non 0 coefficients
1 2 3 4 5 |
x |
a penalized lvm model |
... |
not used |
tol |
the threshold below which a coefficient is considered to be null |
operator |
the operator used to extract the coefficients |
penalized |
should only the penalized coefficient be returned |
value |
should the value of the coefficients be returned? Otherwise their position. |
1 2 3 4 5 6 7 8 9 10 11 | set.seed(10)
n <- 300
formula.lvm <- as.formula(paste0("Y~",paste(paste0("X",1:12), collapse = "+")))
mSim <- lvm(formula.lvm)
df.data <- sim(mSim,n)
pm <- penalize(mSim, c("Y~X1","Y~X4", "Y~X10"))
pm.fit <- estimate(pm, lambda1 = 1e5, data = df.data, control = list(constrain = TRUE))
coef0(pm.fit)
coef0(pm.fit, operator = ">")
coef0(pm.fit, operator = ">", penalized = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.