View source: R/quantile_residuals.R
quantile_residuals | R Documentation |
quantile_residuals
is used to generate quantile residuals for a generalized log-gamma regression model.
quantile_residuals(fit)
fit |
is an object sglg. This object is returned from the call to glg(), sglg(), survglg() or ssurvglg(). |
Carlos Alberto Cardozo Delgado <cardozorpackages@gmail.com>
Carlos Alberto Cardozo Delgado, Semi-parametric generalized log-gamma regression models. Ph. D. thesis. Sao Paulo University.
# Example 1 n <- 400 set.seed(4) error <- rglg(n,0,0.5,1) y <- as.data.frame(0.5 + error) names(y) <- "y" fit_0 <- glg(y~1,data=y) fit_0$mu fit_0$sigma fit_0$lambda quantile_residuals(fit_0) # Example 2 n <- 500 set.seed(6) error <- rglg(n,0,0.5,1) x1 <- runif(n,-2,2) beta <- c(0.5,2) y <- cbind(1,x1)%*%beta + error data <- data.frame(y=y,x1=x1) fit_1 <- glg(y~x1,data=data) fit_1$mu fit_1$sigma fit_1$lambda quantile_residuals(fit_1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.