What is the recommended way of accessing distribution parameters (mu,
sigma, ...) from the model fit? The indention is to use those values in
d/p/q/r calls. I came out with a wrapper

gamlss_fit <- function(x, family) {
    fit <- gamlssML(x, family = family)
    mu <- fitted(fit, "mu")[1]
    sigma <- fitted(fit, "sigma")[1]
    nu <- ifelse("nu" %in% fit$parameters, fitted(fit, "nu")[1], NA)
    tau <- ifelse("tau" %in% fit$parameters, fitted(fit, "tau")[1], NA)
    list(mu = mu, sigma = sigma, nu = nu, tau = tau)
}

Alternatively, I could write functions to emulate logspline calls to
density estimation.

I suspect I must be missing something obvious. I am relatively new to R.

George

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to