Description Usage Arguments Value Author(s) Examples
residuals
is a function which extracts model residuals from objects returned by modeling functions.
1 | residuals(model,residual = "deviance")
|
model |
an object for which the extraction of model residuals is meaningful. |
residual |
type of residual to be used. |
Residuals extracted from the object object.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##
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() )
plot(fitted(fit0),residuals(fit0),xlab="fitted values",ylab="Deviance")
##Varying Precision
fit1 <- gamlss(y1 ~ x21,sigma.formula = y1 ~x21, family=RBS(mu.link="identity",sigma.link="sqrt"),method=CG() )
plot(fitted(fit1),residuals(fit1),xlab="fitted values",ylab="Deviance")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.