lr.test: Precision test

Description Usage Arguments Value Author(s) Examples

View source: R/tests.R

Description

Tests the null hypothesis of precision fixed in RBS models against the alternative of precision variable.

Usage

1
2
3
4
lr.test(modelh0,modelh1)
grad.test(modelh0,modelh1)
wald.test(modelh1)
score.test(modelh0,modelh1)

Arguments

modelh0

model under null hypothesis.

modelh1

model under alternative hypothesis.

Value

A list with class "htest" containing the following components:

statistic the value of the test statistic.

parameter the degrees of freedom for the test statistic.

p.value the p-value for the test.

method a character string indicating what type of likelihood ratio test was performed.

data.name a character string giving the name(s) of the data

Author(s)

Manoel Santos-Neto manoel.ferreira@ufcg.edu.br, F.J.A. Cysneiros cysneiros@de.ufpe.br, Victor Leiva victorleivasanchez@gmail.com and Michelli Barros michelli.karinne@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##
library(alr3)
data(landrent)
attach(landrent)
resp <- I(Y/X1)
y1 <-  split(resp, X4)$"1"
x21 <-  split(X2, X4)$"1"
##Fixed Precision
fit0 <- gamlss(y1 ~ x21, family=RBS(mu.link="identity"),method=CG()  )
##Varying Precision
fit1 <- gamlss(y1 ~ x21,sigma.formula = y1 ~x21, family=RBS(mu.link="identity",sigma.link="sqrt"),method=CG()  )
#Precision Test
lr.test(fit0,fit1)
score.test(fit0,fit1)
grad.test(fit0,fit1)
wald.test(fit1)

santosneto/rbsmodels documentation built on May 29, 2019, 1:49 p.m.