Hi
I am trying to use the fixedLassoInf function and I keep getting the following error for some values of lambda generated by 'glmnet'.
"Error in seq.default(gridrange[1] * sd, gridrange[2] * sd, length = gridpts) : 'from' must be a finite number"
Here's the code I was trying to run.
sigmahat<-estimateSigma(newdata,z)$sigmahat
n<-nrow(newdata)
gfit<-glmnet(newdata, z, family="gaussian", standardize = FALSE, thresh=1e-12)
beta<-coef(gfit,s=gfit$lambda[80]/n, exact=TRUE, x=newdata, y=z)[-1]
out<-fixedLassoInf(x=newdata, y=z,beta, gfit$lambda[80], sigma=sigmahat)
Any leads on what could be causing this error?