Questions tagged [gamlss]

Collection of R functions to fit Generalized Additive Models for Location Scale and Shape (GAMLSS)

Generalized Additive Models for Location Scale and Shape (GAMLSS) is a general framework for univariate regression type statistical problems using new ways of dealing with overdispersion, skewness and kurtosis in the response variable.

Reference
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007

76 questions
1
vote
1 answer

gamlss compatibility with MuMIn

I recently tried to conduct model averaging on a glm fitted with gamlss using MuMIn's dredge function and am getting the same error as these two other users here and here. Here is a reproducible example and the error: library(gamlss) library(MuMIn)…
Conrad
  • 45
  • 6
1
vote
2 answers

What is ga() in the gamlss package doing?

I have been looking into the gamlss package for fitting semiparametric models and came across something strange in the ga() function. Even if the model is specified as having a gamma distribution, fitted using REML, the output for the model is…
Constantin
  • 132
  • 9
1
vote
1 answer

R: Worm Plot Error in as.environment(DaTa) : invalid object for 'as.environment'

I am trying to create worm plots for a variety of linear regression models in R. The code is wp(modelL, bg="deeppink3"). Out of the nine worm plots I am attempting to create, it only works for two. The others bring the error message "Error in…
1
vote
0 answers

Anova table by variable

I'm using 'gamlss' from the package 'gamlss' (version 5.4-1) in R for a generalized additive model for location scale and shape. My model looks like this propvoc3 = gamlss(proporcion.voc ~ familiaridad * proporcion) When I want to see the Anova…
1
vote
1 answer

Using GAMLSS, the difference between fitDist() and gamlss()

When using the GAMLSS package in R, there are many different ways to fit a distribution to a set of data. My data is a single vector of values, and I am fitting a distribution over these values. My question is this: what is the main difference…
redfish993
  • 21
  • 1
1
vote
0 answers

Saving a gamlss model to an RDS format

I'm fitting an R gamlss model: set.seed(1) df <- data.frame(group = c(rep("g1",100),rep("g2",100),rep("g3",100)), value = c(rgamma(100,rate=5,shape=3),rgamma(100,rate=5,shape=4),rgamma(100,rate=5,shape=5))) df$group <-…
dan
  • 6,048
  • 10
  • 57
  • 125
1
vote
1 answer

Random effects specification in gamlss in R

I would like to use the gamlss package for fitting a model benefiting from more available distributions in that package. However, I am struggling to correctly specify my random effects or at least I think there is a mistake because if I compare the…
1
vote
1 answer

Why does gamlss give incorrect estimates of ex-gaussian distribution parameters?

From the gamlss.dist page for exGAUSS: The ex-Gaussian distribution is often used by psychologists to model response time (RT). It is defined by adding two random variables, one from a normal distribution and the other from an exponential. The…
mk9y
  • 320
  • 2
  • 11
1
vote
0 answers

How to share GAMLSS models without revealing the raw data?

I want to distribute a fitted gamlss model (lms) as a file. The data used to fit the gamlss model must not be published, as it is subject to privacy regulations. However, when I use the save or saveRDS functions, the resulting files are both huge…
Jakob
  • 11
  • 2
1
vote
1 answer

Worm plot residuals graph in ggplot2

I'm trying to plot the Worm plot residuals on a model fitted using the gamlss function from the gamlss package. The interest graph looks like the one below: Initially, below is the computational routine referring to the use of the wormplot_gg…
user55546
  • 37
  • 1
  • 15
1
vote
2 answers

gamlss: Algorithm RS has not yet converged

I'm running a generalised additive mixed model using the gamlss() function. I used the fitDist() on my data and it recommended I used a zero inflated poisson. My response variable is 'deg' and is count data but has a lot of zeros. fitDEG <-…
mikejwilliamson
  • 405
  • 1
  • 7
  • 17
1
vote
1 answer

Interaction term in GAMLSS through pvc ()

We are fitting Generalized Additive Models for Location, Scale and Shape to access the effects of month (continuos) and year (categorical) on the response variable Y. To investigate the seasonal variability of Y across the years, interaction terms…
Henrique
  • 11
  • 1
1
vote
1 answer

R gamlss::predict.gamlss not an exported object from 'namespace:gamlss'

I am experiencing some confusing behavior from gamlss in R. The documentation lists predict.gamlss and ?predict.gamlss returns the function documentation in RStudio. However, the function does not autocomplete when typing out predict.gamlss, and…
gabagool
  • 640
  • 1
  • 7
  • 18
1
vote
1 answer

GAMLSS ERROR : NA's in the working vector or weights for parameter mu

I am getting the following error ERROR : NA's in the working vector or weights for parameter mu for the gamlss function: fit <- gamlss::gamlss(x ~ y, sigma.formula = ~ y, data = d, family = GA) where d is a dataframe containing x and y x = 17.83961…
Jack_d
  • 37
  • 6
1
vote
0 answers

Random effects in GAMLSS BEINF family

I'm running a GAMLSS in R modelling by random effect. However, this error appears: Error in solve.default(pdMatrix(a, factor = TRUE)) : system is computationally singular: reciprocal condition number = 0 I've tried the model without random…
Victor
  • 11
  • 2