lrtest: Likelihood Ratio Test of Nested Models

lrtestR Documentation

Likelihood Ratio Test of Nested Models

Description

lrtest carries out likelihood ratio tests to compare nested CLV models of the same family that were fitted on the same transaction data.

The method compares each two consecutive models. An asymptotic likelihood ratio test is carried out: Twice the difference in log-likelihoods is compared with a Chi-squared distribution.

Usage

## S3 method for class 'clv.fitted'
lrtest(object, ..., name = NULL)

lrtest(object, ...)

## S4 method for signature 'clv.fitted'
lrtest(object, ..., name = NULL)

Arguments

object

An fitted model object inheriting from clv.fitted.

...

Other models objects fitted on the same transaction data

name

A character vector of names to use for the models in the resulting output. If given, a name has to be provided for object and each model in .... If not given, the default model names are used.

Value

A data.frame of class "anova" which contains the log-likelihood, degrees of freedom, the difference in degrees of freedom, likelihood ratio Chi-squared statistic and corresponding p-value.


CLVTools documentation built on Oct. 13, 2024, 9:07 a.m.