0

I am running a forward selection regression model with 20,000 gene expressions in R:

select.genes.fwd = SignifReg(lm(log_daystodeath ~ . - 
        patient_ID - age - vitalstatus - daystodeath - 
        pathologicstage - gender - radiationtherapy - 
        number_packs_smoked_per_year - race, 
  data = lungCancerData, na.action = na.omit), 
  direction = "forward", criterion = "AIC",
   correction = "None", trace = F)

and I am getting an error message that reads:

Error: protect(): protection stack overflow

I have already tried increasing the R_MAX_VSIZE=100Gb in .Renviron from my command line and I've also tried

R --max-ppsize=5000000

within my command line and reran my model in R Markdown, but I still get the same error message.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
  • Does this answer your question? [Error: protect(): protection stack overflow](https://stackoverflow.com/questions/36009344/error-protect-protection-stack-overflow) – Eric Leung Dec 10 '20 at 07:01
  • this could be difficult. I have some suggestions for troubleshooting: (1) can you get this to work with a subset of your data, subsetting by rows or columns or both? (2) try contacting the maintainer? (3) a modern approach like LASSO regression (see the `glmnet` package) might be more efficient ... – Ben Bolker Dec 10 '20 at 19:34

0 Answers0