Hello I have been using the package glmnet do multiple linear regression with different regularizations. I am a biologist though, so I don't understand the math behind it deeply. However, being a linear regression, I assume it generates a line to fit the data as best as possible, is that correct? In this case, shouldn't this line have a formula? If so, how could I get it? I intend to use it in a validation set to calculate the sensitivity and specificity.
EDIT
Here is an example of what I mean
In this figure I have table X with my explanatory variables, table y with my response values and, lastly, the coefficients given by multiple linear regression with lasso regularization from the package glmnet.
https://imgbbb.com/image/zgLnt
I assumed the formula y = "A" * 1 + "B" * 2 + "C" * 2 + "D" * 3 + "E" * 9
would give me back the response value, which would be 1. In this case, I get a y which is very closely related to the real value. However, in the models that I'm trying to fit, I am not. Am I doing the calculation right, or is the model I am using just bad?
are you looking for some thing like this? demoraesdiogo2017
example is furnished here, with glmnetutils package : https://cran.r-project.org/web/packages/glmnetUtils/vignettes/intro.html and author post is here: https://stackoverflow.com/questions/29093868/formula-interface-for-glmnet
Thank you for the links
unfortunately, I believe the formulas and validations he refers to are no the same I am. What I am looking for exactly is a formula that uses explanatory variables so I can predict the response variable, for example like this
yi = B0 + B1xi1 + B2xi2 + ... where y is a response variable x are the explanatory variables B their correlation and B0 the height etc
In the most recent versions of glmnet, you can provide a formula to the function.
amazing! can you share a tutorial on how to do this?
The code I have been using is pretty much like this
Dude... follow the links provided by cpad0112...
check the times between answers...
Thank you cpad and kevin for the responses, extremely helpful. I wanted to leave a thanks here for the rest of us that are actually thankful for helping the newbies.