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
0
votes
1 answer

error when trying cross-validation for a gamlss model

I am trying to perform a 5-fold cross-validation for a model I estimated with the gamlss package. When I use the same code and estimate another model (e.g. OLS), I have no problems. However, when I change the model to a gamlss, I get an error…
Nerd
  • 61
  • 5
0
votes
1 answer

R: How to fit gamlss in a foor loop with a variable (character)

I have a tricky problem. I have a dataframe with more than 1000 variables and want to fit each variable to age using fp smoothing function. I know how to use gamlss() for a specific variable (vari), but that's not practical to repeat this explicitly…
Junhao Wen
  • 31
  • 2
  • 6
0
votes
1 answer

meanBEINF vs predict(model, type = "response') in BEINF GAMLSS. and determining odds of predictor variable coefficient

A variation of this question has been asked, but certain items remain unanswered - I am modeling the proportion of mortality (Prop) using a single continuous predictor variable which is temperature (Temp). I have three questions. 1.) Should I be…
0
votes
0 answers

Error when using dredge on a GLMM fitted with GAMLSS

I receive the following error when I try to use dredge on a model fitted using GAMLSS with a random effect. data(usair) usair$rand<-c(rep("A",11),rep("B",10),rep("C",10),rep("D",10)) fit1<-gamlss(y~x1+x2+x3+x4+x5+re(random=~1|rand), data=usair,…
cosalofa
  • 1
  • 1
0
votes
0 answers

Error in "as.data.frame.default(x[[i]], optional = TRUE): cannot coerce class ‘"function"’ to a data.frame" when using the gamlss function (or lme())

I am trying to fit a one-inflated Beta regression mixed model using the gamlss package using the following code: # Minimal reproducible example: efficiency <- rbeta(n = 85, shape1 = 2, shape2 = 2, ncp = 2) # My actual variable contains several…
Fanfoué
  • 165
  • 11
0
votes
1 answer

How can I extract the QQPLOT of the post.check function in GJRM package in R?

This is the code and I want to extract the QQplot of this Plot into post.check(out). Additionally, How can I change the title of the qqplot? library(GJRM) set.seed(0) n <- 400 x1 <- round(runif(n)) x2 <- runif(n) x3 <- runif(n) f1 <- function(x)…
LACL
  • 37
  • 6
0
votes
1 answer

Predicting data from gamlss model in handler function using tryCatch in R

I am having a problem using the tryCatch() function in R in a function I created. What I want to do is this: simulate data based on model results analyze simulated data using my gamlss model use the predict function to extract model predictions…
Tilt
  • 3
  • 3
0
votes
1 answer

Computing nomograms and z-scores with the gamlss package in R

I am currently trying to generate nomograms and z-scores for a cardiovascular research project. However, I have an issue with the gamlss package, in particular with the centiles.pred() function. For instance, if I run the following code, I get stuck…
0
votes
1 answer

R how to use sjPlot::tab_model() to put lmer, glmer, and gamlss models into a table

I am looking to make a summary table for a set of linear models. The models are either lmer(), glmer(), or gamlss(). I am trying to print the results of 6 of these models into a single table. However, when I try to do this with sjPlot::tab_model,…
Eric Dilley
  • 337
  • 2
  • 10
0
votes
1 answer

How to perform a post hoc test for a mixed model in beta distribution (I am using R's gamlss library)?

How do I perform a post hoc test for a random effect beta distribution? To build the mixed model with beta distribution I used the library gamlss (I found no other way to do this in R). In this model there is a factor with three levels. Suppose…
Omar
  • 19
  • 3
0
votes
1 answer

Response variable out of range -> using gamlss in r LOGNO

I am new to the function GAMLSS in r, and when I run my code I always get this error: Response Variable out of range After looking into the data frame, I realized the issue was one of response variables was 0.0000. I was wondering if someone could…
justin YU
  • 11
  • 1
0
votes
1 answer

R package gamlss used inside foreach() fails to find an object

I'm trying to get leave-one-out predicted values. Please help me with this "can't find object" issue. I have searched for similar issues, but haven't managed to figure it out. This is on Windows 10. Thanks in…
James
  • 237
  • 1
  • 12
0
votes
1 answer

broom::augment: Evaluation error: object not found with gamlss but all good with lm

I'm wrestling with collecting gamlss results into a data frame. This continues the example here Working example using lm library(tidyverse) library(broom) library(gamlss) library(datasets) # working mro <- mtcars %>% nest(-am) %>% mutate(am…
Hedgehog
  • 5,487
  • 4
  • 36
  • 43
-1
votes
1 answer

How can I predict the values of the dependent variable in a GAMLSS model after having predicted mu, sigma, nu and tau parameters?

I am trying to predict the dependent variable of a GAMLSS function based on predicted values of mu, sigma, nu and tau parameters. I have built a model for hospital length of stay using GAMLSS. After training the model in a sample of patients (using…
-1
votes
2 answers

Stop printing in console R

Good morning, I have to do a loop in R and some function inside this loop print each results in the console of R, there is a function to stop this printing? I let here an example of code: for (i in 1:100){ d=datafr[,i] a=gamlss(y~1,…
Lorenzo
  • 21
  • 3