Hot answers tagged

10 votes
Accepted

Zero inflated beta regression using gamlss for vegetation cover data

I have added preliminary support for gamlss to the emmeans package... ...
Russ Lenth's user avatar
  • 19.2k
10 votes
Accepted

Simulate linear regression with heteroscedasticity

To simulate data with a varying error variance, you need to specify the data generating process for the error variance. As has been pointed out in the comments, you did that when you generated your ...
gung - Reinstate Monica's user avatar
7 votes
Accepted

Are Random Forests more powerful than generalized linear models?

You should try lots of models. The 'no free lunch' theorem states that there is no one best model - every situation is different. Logistic regression for example is desirable when it works because ...
HEITZ's user avatar
  • 1,762
7 votes

Are there better approaches than the weighted mean?

There seems to be a smooth dependence of variance on observation index, so you could try a joint modeling approach, see for instance Articles that work with covariates for mean, variance, and ...
kjetil b halvorsen's user avatar
6 votes
Accepted

Is there a hypothesis test that tells us whether we should use GAM vs GLM?

Simon Wood, the author of the mgcv package for R and a statistician who has made significant contributions to GAM theory and methods, has developed well-performing Wald-like tests for smooths. As such,...
Gavin Simpson's user avatar
5 votes

fit GLM for weibull family

Sorry i'm quite late with this.... but might help someone i believe : gamlss package is what you should be looking for. It supports almost all the distributions( ...
user3801801's user avatar
5 votes

Are Random Forests more powerful than generalized linear models?

One point to consider is are you interested in making predictions or understanding associations and carrying out inference (confidence intervals around effects). Although random forests provide a ...
julieth's user avatar
  • 2,312
5 votes

Simulate linear regression with heteroscedasticity

You need to model the heteroskedasticity. One approach is via the R package (CRAN) dglm, dispersion generalized linear model. This is an extension of glm's which, ...
kjetil b halvorsen's user avatar
5 votes
Accepted

Is smoothing an appropriate solution to deal with model diagnostics in a GAMLSS?

The overall and predictor-specific worm plots share the feature that "different shapes indicate different inadequacies in the model", as explained in the article Analysis of longitudinal ...
Isabella Ghement's user avatar
5 votes
Accepted

How to compare centiles from different models?

Some of the deviations you point to can be due to random variation alone. There are simple ways to test them. When there are independent observations of a variable whose conditional distributions ...
whuber's user avatar
  • 316k
5 votes
Accepted

Difference between ZIP and ZIP2

There's more details in the freely available older version of the gamlss book (section 18.2.11-12). The regular Poisson model is parametrized through a mean $\mu$, ...
PBulls's user avatar
  • 1,826
4 votes

How can GAMLSS relax the GLM exponential family assumption?

What Rigby and Stasinoplous' GAMLSS models allow is the modelling of all parameters of a distribution with separate linear predictors. Thomas Yee's Vector Generalised Additive Model (VGAM) class of ...
Gavin Simpson's user avatar
4 votes

What does it mean to perform regression using a specific distribution?

These concepts fall under the subject of Generalized Linear Models. Generalized linear models contain two components A random component. The observed data is distributed according to some ...
Matthew Drury's user avatar
4 votes
Accepted

What does it mean to perform regression using a specific distribution?

Regression models aim to estimate a parameter (typically a mean) for a response variable conditional on a (set of) regressor variable(s). To do that, we generally need to specify the nature of the ...
gung - Reinstate Monica's user avatar
3 votes

fit GLM for weibull family

The glm() function does not support the Weibull distribution in R unfortunately. You can try ?family to see which distributions ...
Billywob's user avatar
  • 213
3 votes

Stepwise model selection using Generalized Akaike Information Criterion

In general, you can't select "the best" model using stepwise regression. All statistics produced through stepwise model building have a nested chain of invisible/unstated "conditional on excluding X" ...
Alexis's user avatar
  • 29.2k
3 votes
Accepted

Create Spline from Coefficients and Knots in GAMLSS

the pb() function fits P-splines as described by Eilers and Marx (1996): B-splines on equally spaced knots and finite difference penalties. In the same paper there are some code chunks that show how ...
Gi_F.'s user avatar
  • 1,151
3 votes
Accepted

What distribution has exactly three parameters for mean, variance, and skewness?

Infinitely many answers are possible, some links in comments. One family is the skew-normal, but it only admits limited degrees of skewness. The same ideas used to construct the skew-normal family ...
kjetil b halvorsen's user avatar
3 votes
Accepted

Is it possible to use location-scale family distributions for mixed effects modeling?

A couple of comments: Generalized Linear Mixed Models (GLMMs) have the following general representation: $$\left\{ \begin{array}{l} Y_i \mid b_i \sim \mathcal F_\psi,\\\\ b_i \sim \mathcal N(0, D), \...
Dimitris Rizopoulos's user avatar
3 votes

Is smoothing an appropriate solution to deal with model diagnostics in a GAMLSS?

A worm plot is basically a qq plot, so what you are doing is trying to find the best functional form of the covariates that yields a normal quantile Residual. This indicates a better fit. You checked ...
Guilherme Marthe's user avatar
3 votes
Accepted

How to transform an uniform distribution into a generalized beta 2 distribution using gamlss, fitdist or other?

The generic way to solve this problem (converting a set of uniform random deviates to an alternative probability distribution) is to use the inverse cumulative distribution function or quantile ...
Ben Bolker's user avatar
  • 41.3k
3 votes
Accepted

Predict gamlss one-inflated beta model

The predicted probabilities that Y=1 are given by p1 = nu/(1+nu) So just predict nu and then transformation nu to p1.
Robert's user avatar
  • 318
3 votes
Accepted

can daily count data use GAM ordered categorical family, proportional-odds model?

For smoothing functions in gamlss I usually use P-splines, e.g. pb(Time), where the smoothing parameter is estimated automatically using a local maximum likelihood ...
Robert's user avatar
  • 318
3 votes

How to interpret the p-value associated with the intercept?

I want to establish which interactions of levels of factors are significantly different from the intercept. You will get into trouble if you only depend on the coefficients and p values displayed ...
EdM's user avatar
  • 86.4k
2 votes

Modelling zero-inflated proportion data in R using GAMLSS

I think the odds $\frac{p_0}{1-p_0-p_1}$ are given by $e^{\nu}$ not $\nu$, and similarly for $\frac{p_1}{1-p_0-p_1} = e^{\tau}$! This means that in the above answer one needs to use the exponentials ...
Michael Jerosch-Herold's user avatar
2 votes

Confidence intervals with gamlss package

It sounds like you want prediction intervals. The se.fit argument name reflects that it will give you standard errors extracted from the original fit, and it sounds ...
Wayne's user avatar
  • 20.7k
2 votes
Accepted

How to choose correct distribution in R

The possibility of values being exactly 0 and 1 would seem to rule out the just using the beta for all cases (otherwise I'd have suggested it earlier). One possibility is to use a zero-one inflated ...
Glen_b's user avatar
  • 277k
2 votes

How to model heteroscedasticity and get the coefficients?

First, you need to formally define the model you want to estimate. Based on your example, you'll want to set a model like this: $$Y_i = \beta_0 +\beta_1 X_i + \epsilon_i$$ where $\epsilon_i \sim N(0, ...
jjet's user avatar
  • 1,267
2 votes

Are Random Forests more powerful than generalized linear models?

Let's have some simple examples to show the differences. Our example have a single independent variable x and a single dependent variable - either real ...
Michal Skop's user avatar
2 votes

Smoothed Moments as Function of Predictor

Continuing from the example data generated in the OP, we can construct a simple GAMLSS model for the mean of the data using a penalised B-spline. This model assumed a Normal distribution. We are only ...
LBogaardt's user avatar
  • 554

Only top scored, non community-wiki answers of a minimum length are eligible