Description Usage Arguments Value References Examples

View source: R/homogeneity.test.R

Performs several test for testing equality of *p ≥ 2* correlated variables. Likelihood ratio test,
score, Wald and gradient can be used as a test statistic.

1 | ```
homogeneity.test(object, test = "LRT", type = "scale")
``` |

`object` |
object of class |

`test` |
test statistic to be used. One of "LRT" (default), "Wald", "score" or "gradient". |

`type` |
one of |

A list of class 'homogeneity.test' with the following elements:

`statistic` |
value of the statistic, i.e. the value of either Likelihood ratio test, Wald, score or gradient test. |

`parameter` |
the degrees of freedom for the test statistic, which is chi-square distributed. |

`p.value` |
the p-value for the test. |

`estimate` |
the estimated covariance matrix. |

`null.value` |
the hypothesized value for the covariance matrix. |

`method` |
a character string indicating what type of test was performed. |

`null.fit` |
a list representing the fitted model under the null hypothesis. |

`data` |
name of the data used in the test. |

Harris, P. (1985).
Testing the variance homogeneity of correlated variables.
*Biometrika* **72**, 103-107.

Modarres, R. (1993).
Testing the equality of dependent variables.
*Biometrical Journal* **7**, 785-790.

Osorio, F., and Galea, M. (2015). Statistical inference in multivariate analysis using the t-distribution. Unpublished manuscript.

1 2 3 4 5 6 | ```
data(examScor)
fit <- studentFit(examScor, family = Student(eta = .25))
fit
z <- homogeneity.test(fit, test = "LRT")
z
``` |

```
Call:
studentFit(x = examScor, family = Student(eta = 0.01841))
Converged in 97 iterations
Center:
mechanics vectors algebra analysis statistics
39.2459 50.8419 50.7489 46.9611 42.2372
Scatter matrix estimate:
mechanics vectors algebra analysis statistics
mechanics 301.46055
vectors 124.32688 171.39077
algebra 100.37281 84.71008 111.29784
analysis 106.76788 95.03320 110.48892 218.19315
statistics 116.68248 99.19755 120.82291 154.34480 297.81509
Number of Observations: 88
Likelihood ratio test for equality of variances
data: examScor
LRT statistic = 51.538, df = 4, p-value = 0
alternative hypothesis: true variances are not equal.
sample estimate:
mechanics vectors algebra analysis statistics
mechanics 301.46055
vectors 124.32688 171.39077
algebra 100.37281 84.71008 111.29784
analysis 106.76788 95.03320 110.48892 218.19315
statistics 116.68248 99.19755 120.82291 154.34480 297.81509
```

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.