0

I have a following generalized linear model (part with coefficients was removed as it's not significant for this question)

Call:
glm(formula = time ~ I(nDOF^3) + I(ndoms^2) + I(nDOF^2) + (poly(I(1/nprocs), 
    2) + poly(nnodes, 2) + nDOF + ndoms)^2, family = gaussian(link = "log"), 
    data = dataFact)

(Intercept)                            ***
I(nDOF^3)                              ***
I(ndoms^2)                             ***
I(nDOF^2)                              ***
poly(I(1/nprocs), 2)1                  ***
poly(I(1/nprocs), 2)2                  ***
poly(nnodes, 2)1                       ***
poly(nnodes, 2)2                       ***
nDOF                                   ***
ndoms                                  ***
poly(I(1/nprocs), 2)1:poly(nnodes, 2)1 ***
poly(I(1/nprocs), 2)2:poly(nnodes, 2)1 ***
poly(I(1/nprocs), 2)1:poly(nnodes, 2)2 ***
poly(I(1/nprocs), 2)2:poly(nnodes, 2)2 ** 
poly(I(1/nprocs), 2)1:nDOF             ***
poly(I(1/nprocs), 2)2:nDOF                
poly(I(1/nprocs), 2)1:ndoms            ***
poly(I(1/nprocs), 2)2:ndoms            ***
poly(nnodes, 2)1:nDOF                  ***
poly(nnodes, 2)2:nDOF                     
poly(nnodes, 2)1:ndoms                 ***
poly(nnodes, 2)2:ndoms                 ** 
nDOF:ndoms                             ***

t-test shows us, that poly(I(1/nprocs), 2)2:nDOF and poly(nnodes, 2)2:nDOF are not significant and I'd like to remove them from the model. I don't want to write down all the interactions by hand.

Is there any simple way to remove them in R?

Eenoku
  • 2,741
  • 4
  • 32
  • 64
  • Possible duplicate of [Selecting the statistically significant variables in an R glm model](http://stackoverflow.com/questions/16153497/selecting-the-statistically-significant-variables-in-an-r-glm-model) – minem Mar 24 '17 at 13:31
  • @MārtiņšMiglinieks I'm afraid the problem is with using `poly` - command `sig.formula <- as.formula(paste("time ~",relevant.x, collapse= "+"))` then doesn't work. – Eenoku Mar 24 '17 at 13:57

0 Answers0