Expected `objects[[x]]` to equal `expected[[x]]`.
Differences:
Component "nzero": Mean relative difference: 1
Component "glmnet.fit": Component "beta": Attributes: < Component "i": Numeric: lengths (525, 524) differ >
Component "glmnet.fit": Component "beta": Attributes: < Component "p": Mean relative difference: 0.004132908 >
Component "glmnet.fit": Component "beta": Attributes: < Component "x": Numeric: lengths (525, 524) differ >
Component "glmnet.fit": Component "df": Mean relative difference: 1

beta <- matrix(c(rep(2, 5), rep(0, 15)), ncol = 1)
ytest <- xtest %*% beta + rnorm(n)*sigma
pred1 <- predict(fit1,xtest[1:10,],s=1) #predict on test data
# Two-stage variation where we carve off a small dataset for computing the univariate coefs.
fit2s <- uniLasso(x[-cset,], y[-cset], info = info)
cvfit2s <- cv.uniLasso(x[-cset,], y[-cset], info = info)
# cv.uniLasso with same positivity constraints, but starting `beta`
# from univariate fits on the same data. With loo=FALSE, does not tend to do as well,
cvfitpa <- cv.uniLasso(x, y, loo = FALSE)
# cv.uniLasso with no constraints, but starting `beta` from univariate fits.
# This is a version of the adaptive lasso, which tends to overfit, and loses interpretability.
cvfita <- cv.uniLasso(x, y, loo = FALSE, lower.limits = -Inf)
fitua <- cv.uniReg(x, y, hard.zero = FALSE)

Expected `objects[[x]]` to equal `expected[[x]]`.
Differences:
Component "nzero": Mean relative difference: 1
Component "glmnet.fit": Component "beta": Attributes: < Component "i": Numeric: lengths (519, 518) differ >
Component "glmnet.fit": Component "beta": Attributes: < Component "p": Mean relative difference: 0.004181826 >
Component "glmnet.fit": Component "beta": Attributes: < Component "x": Numeric: lengths (519, 518) differ >
Component "glmnet.fit": Component "df": Mean relative difference: 1

Expected `objects[[x]]` to equal `expected[[x]]`.
Differences:
Component "X97.5.": Mean relative difference: 1.330143e-07