Description Usage Arguments Value Examples
Get the GAMLSS LR test results into a neatly formatted table.
1 | get_lr_tbl(mod, mod_null, mod_null_name, silent = FALSE)
|
mod, mod_null |
objects of class |
silent |
logical. If |
mod_null_null |
character. Name by which to refer to null model. |
A table with columns Comp. model, LR DF, LR Chi^2 and LR P-value.
1 2 3 4 5 6 7 8 9 10 11 12 13 | set.seed(1)
data_mod <- data.frame(x = rnorm(20, 5) + rgamma(20, 0.01, 0.0001))
data_mod[['y']] <- 3 * data_mod[['x']] + rnorm(20, sd = 5)
mod_mu <- gamlss::gamlss(formula = y ~ -1 + x,
family = "NO",
data = data_mod,
control = gamlss::gamlss.control(trace = FALSE))
mod_sigma <- gamlss::gamlss(formula = y ~ -1 + x,
sigma.formula = ~ x,
family = "NO",
data = data_mod,
control = gamlss::gamlss.control(trace = FALSE))
lr_tbl <- get_lr_tbl(mod = mod_sigma, mod_null = mod_mu, mod_null_name = "sigma")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.