envelope: Simulated Evelope

Description Usage Arguments Value Author(s) References Examples

View source: R/envelopes.R

Description

A normal plot with simulated envelope of the residual is produced.

Usage

1
2
envelope(model,k=19,alpha=0.05,res="deviance", precision = c("fixed","varying"),
dist = RBS(mu.link = "identity",sigma.link = "identity") )

Arguments

model

object of class gamlss holding the fitted model.

k

number of replications for envelope construction. Default is 19.

alpha

value giving the size of the envelope. Default is 0.05 which is equivalent to a 95% band.

res

type of residuals to be extracted. Default is deviance.

precision

If precision = "fixed" a model with precision fixed is used; else a model with precision variable is used.

dist

The function RBS() defines the RBS distribution.

Value

A simulated envelope of the class RBS.

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

References

Atkinson, A. C. (1985) Plots, transformations and regression : an introduction to graphical methods of diagnostic regression analysis. Oxford Science Publications, Oxford.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Fixed Precision
library(faraway)
data(cpd)
attach(cpd)
model0 = gamlss(actual ~ projected, family=RBS(mu.link="identity"),method=CG())
summary(model0)
set.seed(2015)
envelope(model0)
model = gamlss(actual ~ 0+projected, family=RBS(mu.link="identity"),method=CG())
summary(model)
set.seed(2015)
envelope(model)

##
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()  )
summary(fit0)
set.seed(2015)
envelope(fit0,alpha=0.01, precision="fixed",res="quantile",dist=RBS(mu.link="identity"))
##Varying Precision
fit1 <- gamlss(y1 ~ x21,sigma.formula = y1 ~x21, family=RBS(mu.link="identity",sigma.link="sqrt"),method=CG()  )
summary(fit11)
set.seed(2015)
envelope(fit1,alpha=0.01, precision="varying",res="quantile",dist=RBS(mu.link="identity",sigma.link="sqrt"))

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