GLT {NormData}R Documentation

Conduct the General Linear Test (GLT) procedure

Description

The function GLT fits two nested linear regression models (that are referred to as the unrestricted and the restricted models), and evaluates whether or not the fit of both models differs significantly.

Usage

GLT(Dataset, Unrestricted.Model, Restricted.Model, Alpha=0.05, 
Alpha.Homosc=0.05, Assume.Homoscedasticity=NULL)

Arguments

Dataset

A data.frame that should consist of one line per test participant. Each line should contain (at least) one test score and one independent variable.

Unrestricted.Model

The unrestricted regression model to be fitted. A formula should be provided using the syntaxis of the lm function (for help, see ?lm). For example, Test.Score~ Gender will fit a linear regression model in which Gender is regressed on Test.Score. Test.Score~Gender+Age+Gender:Age will regress Test.Score on Gender, Age, and their interaction.

Restricted.Model

The restricted regression model to be fitted.

Alpha

The significance level that should be used in the GLT procedure. Default Alpha= 0.05.

Alpha.Homosc

The significance level to conduct the homoscedasticity test. If the unrestricted model only contains qualitative independent variables, the Levene test is used. If the model contains at least one quantitative independent variables, the Breusch-Pagan test is used. If the homoscedasticity assumption is violated, a heteroscedasticity-robust F* test is provided. Default Alpha.Homosc=0.05.

Assume.Homoscedasticity

Logical. The NormData package ‘decides’ whether the homoscedasticity assumption is valid based on the Levene (or Breusch-Pagan) test.
The Assume.Homoscedasticity= TRUE/FALSE argument can be used to overrule this decision process and ‘force’ the NormData package to assume or not assume homoscedasticity.

Details

For details, see Van der Elst (2023).

Value

An object of class GLT with components,

F.Test.Stat.Results

The result of the GLT procedure, i.e., the SSEs and DFs the fitted unrestricted and restricted models, and the F^* test-statistic.

Fit.Unrestricted.Model

The fitted unrestricted model.

Fit.Restricted.Model

The fitted restricted model.

Alpha

The significance level that was used.

p.val.homoscedasticity

The p-value that was used in the homoscedasticity test for the unrestricted model.

F.Test.Hetero.Robust

The result of the heteroscedasticity-robust F* test. For details, see the waldtest function of the lmtest package (see ?waldtest).

Alpha.Homoscedasticity

The significance level that was used to conduct the homoscedasticity test. Default Alpha.Homoscedasticity=0.05.

Author(s)

Wim Van der Elst

References

Van der Elst, W. (2024). Regression-based normative data for psychological assessment: A hands-on approach using R. Springer Nature.

Examples

# Replicate the GLT results that were obtained in 
# Case study 1 of Chapter 5 in Van der Elst (2023)
# ------------------------------------------------
data(Personality)

GLT.Openness <- GLT(Dataset=Personality,
     Unrestricted.Model=Openness~LE, Restricted.Model=Openness~1)
summary(GLT.Openness)

# Replicate the GLT results that were obtained in 
# Case study 2 of Chapter 5 in Van der Elst (2023)
# ------------------------------------------------
data(Fluency)

GLT.Fruits <- GLT(Dataset=Fluency,
     Unrestricted.Model=Fruits~LE, Restricted.Model=Fruits~1)
summary(GLT.Fruits)

[Package NormData version 1.1 Index]