LRT.study: This function is deprecated.

View source: R/2_study-fn.R

LRT.studyR Documentation

This function is deprecated.

Description

Function computes a likelihood ratio test (LRT) between the model with and without random intercept. If the p-value for this test is smaller than 0.05, we compute the LRT between the model with the random slope and the one without this term (but with the random intercept). If the larger model delivers a superior fit to the data, we print the summary of that model. Otherwise we report the summary of the model we had chosen before. Note: to compute the LRT we need to have the ML estimate. anova() automatically refits the models, whose parameters were estimated using REML

Usage

LRT.study(object)

Arguments

object

is an object of class study, which contains an output of object mixedModels

Value

It returns a list with five elements. The first element is the model we have chosen (model with 1-merely fixed effects, 2- random intercept only, 3- with random intercept and random slope) The second element reports the p-value of the hypothesis we have tested in order to choose the model The third element the orginal fit for the "winning model" as from MixedModels The fourth returned argument is the summary of the chosen model The fifth element are the confidence interval of the winning model

Author(s)

Stefan Thoma, adapted from Federico Rogai


StefanThoma/ReplicationRelevance documentation built on Feb. 6, 2023, 4:03 a.m.