Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: glm
See also: glmest glmstat glmll

Quantlet: glmlrtest
Description: glmlrtest performs a likelihood ratio test of two nested GLM.

Link:
Usage: {lr,alpha} = glmlrtest(loglik0,dim0,loglik1,dim1)
Input:
loglik0 scalar, log-likelihood of the hypothesis model.
dim0 integer, dimension of the hypothesis model.
loglik1 scalar, log-likelihood of the alternative model, loglik1 >= loglik0.
dim1 integer, dimension of the hypothesis model, dim1 >= dim0.
Output:
lr scalar, value of the lr test statistic.
alpha scalar, significance level at which hypothesis is rejected.

Example:
library("glm")
n = 100
x  = normal(n)
eps= normal(n)
y  = x/3+eps
one =matrix(n)
mod0=glmest("noid",one,y)    ; constant regression
mod1=glmest("noid",one~x,y)  ; linear regression
{lr,alpha}=glmlrtest(mod0.stat.loglik,1,mod1.stat.loglik,2)
alpha

Result:
The significance level (smallest level) at which the constant
regression model is rejected.



Author: M. Mueller, 20010228
(C) MD*TECH Method and Data Technologies, 05.02.2006