Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added univariate functionality #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lynnyi
Copy link

@lynnyi lynnyi commented Nov 9, 2017

In glmnet(x, y), allow x to be a vector instead of a matrix in order to perform univariate regression.

@emallickhossain
Copy link

I don't know if this will every get merged since this is just the CRAN mirror repo. I don't know where the active source code is stored. My guess is that Trevor has it in a private repo.

@marjoleinF
Copy link

marjoleinF commented Sep 21, 2023

If one wants to do univariate regression with glmnet, it might be easiest to just add a vector of zeros:

x <- rnorm(100)
y <- x + rnorm(100)
cv.glmnet(x = cbind(0, x), y = y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants