3

I am trying to fit a simple lasso model with the latest glmnet package.

I have read in a csv-file and have all my data stored as a "list" or matrix.

I tried to follow this guide for the implementation: https://www.r-bloggers.com/ridge-regression-and-the-lasso/

But when I run:

lasso.mod <- glmnet(b[,2:22], b$power, alpha=1)

I get the following error:

Error in .Fortran("get_int_parms", fdev = double(1), eps = double(1), : "get_int_parms" not available for .Fortran() for package "glmnet"

In my input:

B is just a matrix with 23 columns and around 100000 rows. The first colunmn is what I want to have as my explanatory variable. I googled around a bit but did not find so much on this type of error. Anyone knows what is wrong?

Mikael
  • 31
  • 1
  • Does the code from the blog post work for you? What ist the output of `.Fortran("get_int_parms", PACKAGE = "glmnet")` and `packageVersion("glmnet")`? What OS do you use? – Ralf Stubner Mar 21 '18 at 10:09
  • Cannot try since I don't have the data that the blog works. I have copied it and used my own data frames and then adjusted the names. Not sure, I am completely unfamiliar with .Fortran... I use windows 7. – Mikael Mar 21 '18 at 10:50
  • The dataset used in that blog post is build in, c.f. `?swiss`. Even if you are unfamiliar with `.Fortan` (c.f. `?.Fortran`) you could just run the command in R ... – Ralf Stubner Mar 21 '18 at 10:58

1 Answers1

2

Recently got the same error.

I reinstalled the glmnet package and everything worked fine.

Talbert
  • 21
  • 3