Description Usage Arguments Details Value Author(s) References See Also Examples

Corrects the p-value due to model selection. It works with models of class `glm`

and selected with function `step {stats\)`

.

1 2 3 |

`object` |
object of class |

`MC` |
number of random permutations for the dependent variable |

`scope` |
as in function |

`scale` |
as in function |

`direction` |
as in function |

`trace` |
as in function |

`keep` |
as in function |

`steps` |
as in function |

`k` |
as in function |

It performs anova function (stats library) on the model selected by function step vs the null model with the only intercept
and it corrects for multiplicity.
For `lm`

models and gaussian `glm`

models it computes a F-test, form other models it uses Chisquare-test (see also `anova.glm`

and `anova.lm`

help).

An `anova`

table with an extra column reporting the corrected p-value

Livio Finos and Chiara Brombin

L. Finos, C. Brombin, L. Salmaso (2010). Adjusting stepwise p-values in generalized linear models. Communications in Statistics - Theory and Methods.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
set.seed(17)
y=rnorm(10)
x=matrix(rnorm(50),10,5)
#define a data.frame to be used in the glm function
DATA=data.frame(y,x)
#fit the model on a toy dataset
mod=glm(y~X1+X2+X3+X4+X5,data=DATA)
#select the model using function step
mod.step=step(mod, trace=0)
#test the selected model vs the null model
anova(glm(y~1, data=DATA),mod.step,test="F")
#step.adj do the same, but it also provides multiplicity control
step.adj(mod,MC=101, trace=0)
``` |

someMTP documentation built on May 29, 2017, 3:47 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.