I have txt file on which the results of a research are saved.
I called it SPD this way:
SPD<-read.table("C:\\Users\\Inhib\\OneDrive\\documents\\mydata.FromR.txt", header=TRUE)
when I write then SPD
it presents all columns and everything is fine.
Now, I want to perform elastic net analysis and I need lambda values, so I tried to use SPD in cv.glmnet for that using data(SPD) but it didn't work.
Then I tried to create new data from SPD, doing this:
myvars <- c("Age", "Uniqgenver","Elgenver", "Flowgenver", "Gender", "Resilience")
newdata<-SPD[myvars]
newdata
When I do below, it doesn't work.
data(newdata)
I really need to do lambda estimation using cv.glmnet or any other method, would be happy if anyone could explain me how to do it step by step using my file.