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

emmeans error: Error in match.arg(type) : 'arg' should be one of “link”, “response”, “terms”

I'm trying to calculate estimated marginal means with the emmeans library for a gamlss object. My gamlss object comes from a zero inflated beta regression. Let's say that my model is called m1 and one of my variables is internationaltreaty, so I…
florabol
  • 11
  • 1
  • 2
1
vote
1 answer

How to fix Error in glim.fit 'fit'not found in GAMLSS regression

I am trying to execute gamlss's zero-inflated beta regression model as below> It works fine with variable V255 but through an error for simialr variable V256 as Error in glim.fit(f = nu.object, X = nu.X, y = y, w = w, fv = nu, os = nu.offset, : …
Lily Nature
  • 613
  • 7
  • 18
0
votes
0 answers

Using GAMLSS predictions within a wrapper function

I'm trying to write functions that wrap basic gamlss modeling (because I'm preparing a higher-level, application-specific package). But I've run into issues wrapping predict. The example from the predict.gamlss documentation works…
Krisrs1128
  • 311
  • 4
  • 8
0
votes
1 answer

qBCPEо with negative sigma values

I am trying to use qbcpeo to produce lower limit than normal for a gamless bcpe object, however, some of the sigma values (sigma link is log) yields negative value so when I attempt to use qbcpeo I get the error "sigma must be positive" how can I…
0
votes
0 answers

How to solve Error: C stack usage 15924528 is too close to the limit?

My shiny app works fine in the console, but when I clean the R environment and runApp(), I get Error: C stack usage 15924528 is too close to the limit. One related post suggests to type 'ulimit -s unlimited' in the terminal before starting R,…
Meer
  • 1
  • 1
0
votes
0 answers

Pulling a specific output from a function using sapply?

I'm looking to run the fitDist function on columns in a dataframe using sapply and save the output to a dataframe, using something like the following: data.frame(sapply(df, fitDist)) Run singularly, fitDist outputs it's results as a…
TDeramus
  • 77
  • 5
0
votes
1 answer

how to get multinomial regression coefficients from gamlss

I am trying to fit a mixed effects multinomial model for my 4 level categorical outcome variable (y). I am using the gamlss function from gamlss package. The call looks like: library(mixcat) data("schizo") head(schizo) gamlss::gamlss( formula = y ~…
bison2178
  • 747
  • 1
  • 8
  • 22
0
votes
2 answers

Error in computing GAIC of linear model and other GLMs

my dataset can be found here: https://raw.githubusercontent.com/yuliaUU/test/main/test.csv library(gamlss) library(tidyverse) data_final<- read_csv("https://raw.githubusercontent.com/yuliaUU/test/main/test.csv") # Normal model with log…
yuliaUU
  • 1,581
  • 2
  • 12
  • 33
0
votes
1 answer

How to bound centile curves for a censored distribution

I'm trying to fit centile curves for a censored gamma distribution. The censoring goes well I think, but when trying to make the percentile curves, I get the following result: I tried the following code to get this: y <- c(35.00, 100.00, 100.00, …
0
votes
1 answer

GAMLSS for complex associations

Is GAMLSS a good choice to quantify association of paternal and maternal vitamin levels (continuous variables, biologically correlated) on the risk of offspring autism(binary vaiable)? It this better than using GAM model or GAM model in testing…
WLY
  • 1
0
votes
1 answer

GAMLSS function in R

I am trying to fit a GAMLSS model with the response variable, y>0 with age and gender as independent variables. Since I need to model all 4 parameters of the distribution, I used BCPE as the family. The call is showing the error: Error in dBCPE(y,…
Datalive
  • 3
  • 2
0
votes
1 answer

Error: "Ops.Surv(y, mass.p) : Invalid operation on a survival time' when trying to fit a censored zero-inflated gamma (ZAGA) distribution in GAMLSS

I have a dataset with response variable y that takes values between 0 and 100 and an explanatory variable age that takes values between 18 and 70. To construct a model, a GAMMA distribution seemed fine for the response variable y. Since 80% of the…
0
votes
1 answer

How to automate the process of generating random numbers based on the best fit distribution?

Objective Automate the process of finding the best fit distribution using gamlss package and generating random numbers from this distribution Example My actual data has several variables. So, I will use 2 variables from iris dataset in this example.…
umair durrani
  • 5,597
  • 8
  • 45
  • 85
0
votes
1 answer

How can I extract centile values for age categories to create a reference table from an GAMLSS object in r

I have fitted an gamlss object and created centile curves from it: m1_IAT_m<-gamlss(IAT_rel~cs(age),family=BCPE,data=df_m) centiles.fan(m1_IAT_m,df_m$age,cent=c(1,5,10,25,50,75,90,95), ylab="Power at IAT (W/kg)", xlab="age", ylim = range(0.5,3),…
0
votes
0 answers

Can I get pairwise contrasts in or from a Gamlss model?

I am using the following code to model how a one-inflated response correlates with treatment (categorical). I would like to get a post-hoc pairwise comparison of the treatments. There is a "contrasts" call in the gamlss model function, but I have no…
Jenn
  • 11
  • 1