Skip to content

Error in seq.default(gridrange[1] * sd, gridrange[2] * sd, length = gridpts) : 'from' must be a finite number #49

@Dweepobotee

Description

@Dweepobotee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions