View source: R/anova_flipscores.R
anova.flipscores | R Documentation |
This is the anova
method for flipscores
object. Remark: it performs type III deviance decomposition as in car::Anova
.
## S3 method for class 'flipscores' anova(object, model1 = NULL, score_type = NULL, n_flips = 5000, id = NULL, ...)
object |
(the object) |
model1 |
a |
score_type |
The type of score that is computed. It can be "orthogonalized", "effective" or "basic".
Default is "orthogonalized". "effective" and "orthogonalized" take into account the nuisance estimation. The default is |
n_flips |
The number of random flips of the score contributions.
When |
id |
a |
... |
other parameters allowed in |
set.seed(1) dt=data.frame(X=scale(rnorm(50)), Z=factor(rep(LETTERS[1:3],length.out=50))) dt$Y=rpois(n=nrow(dt),lambda=exp(dt$X*(dt$Z=="C"))) mod0=flipscores(Y~Z+X,data=dt,family="poisson") summary(mod0) anova(mod0) mod1=flipscores(Y~Z*X,data=dt,family="poisson") summary(mod1) anova(mod0,model1 = mod1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.