R: Many analysis of variance tests with a discrete variable

Many analysis of variance tests with a discrete variable {Rfast} | R Documentation

## Many analysis of variance tests with a discrete variable

### Description

Many analysis of variance tests with a discrete variable.

### Usage

    poisson.anovas(y, ina, logged = FALSE)
    quasipoisson.anovas(y, ina, logged = FALSE)
    geom.anovas(y, ina, type = 1, logged = FALSE)

### Arguments

`y` | A numerical matrix with discrete valued data, i.e. counts for the case of the Poisson, or with 0s and 1s for the case of the Bernoulli distribution. Each column represents a variable.
`ina` | A numerical vector with discrete numbers starting from 1, i.e. 1, 2, 3, 4,... or a factor variable. This is suppose to be a categorical predictor. If you supply a continuous valued vector the function will obviously provide wrong results.
`type` | This rgument is for the geometric distribution. Type 1 refers to the case where the minimum is zero and type 2 for the case of the minimum being 1.
`logged` | Should the p-values be returned (FALSE) or their logarithm (TRUE)?

### Details

This is the analysis of variance with count data. What we do is many log-likelihood ratio tests. For the quasi Poisson case we scale the difference in the deviances.

### Value

A matrix with two values, the difference in the deviances (test statistic) and the relevant p-value. For the case of quasi Poisson the estimated φ parameter is also returned.

### Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

### See Also

`g2tests, poisson.anova, anova, poisson_only, poisson.mle`

### Examples

    ina <- rbinom(500, 3, 0.5) + 1
    ## Poisson example
    y <- matrix( rpois(500 * 100, 10), ncol= 100 )
    system.time(a1 <- poisson.anovas(y, ina) )
    y <- NULL

[Package Rfast version 2.0.4 Index]