I am running the following (truncated) code using glmnet in R
# do a lot of things to create the design matrix called x.design
> glmnet(x.design, y, thresh=1e-11)
where x.design is a n x p design matrix where n > p and y is a n x 1 vector of responses obtained using kernel density estimation. Both x.design and y contain real entries. I get the following error message when I run my code:
Error in if (nulldev == 0) stop("y is constant; gaussian glmnet fails at
standardization step") : missing value where TRUE/FALSE needed
I have visited and read
however I could not figure out a way to fix to my issue.
Could someone suggest a solution please?
str(x.design)
andstr(y)
. – Paquette