Questions tagged [generalized-linear-model]

A generalization of linear regression allowing for nonlinear relationships via a "link function" and for the variance of the response to depend on the predicted value. (Not to be confused with "general linear model" which extends the ordinary linear model to general covariance structure and multivariate response.)

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

sum of the x's and the sample mean issues

Quick simple question as I must have missed the explanation. why $$\sum_{j=1}^n (x_j - \bar{x}) = \sum_{j=1}^n x_j - n\bar{x} = (n\bar{x}- n\bar{x})$$ I understand why $\bar{x}$ turns out to be $n\...
0
votes
0answers
7 views

cant seem to do random slope intercept model because I am missing values, any way around it?

I have a data set with 3 fixed effects categories region(2 levels), genus(2 levels), and food(5 levels). I am looking to see if sponges have different retention efficiency of the different food type ...
1
vote
0answers
6 views

Partitioning data into train and test sets in generalized linear mixed models

please excuse my probable lack of knowledge in machine learning - I am a vet trying hard to find my way around in this somewhat new world. The data I am analyzing was collected on 5 different farms, ...
0
votes
0answers
8 views

Logistic regression model for the probability of a don’t know response and a separate ordinal model for the ordered categories

Questions: A response scale has the categories (strongly agree, mildly agree, mildly disagree, strongly disagree, do not know). A two-part model uses a logistic regression model for the probability ...
0
votes
0answers
8 views

Matrix of variance-covariance in lme4 in case of random slope

I had before a question on how to get the full matrix of variance-covariance in a general linear mixed model with the glmer function on ...
0
votes
0answers
4 views

What is going on when deviation is significant but then not significant for outlier test using DHARMa?

I've used the DHARMa package to determine if my model fit is acceptable. I have run the following model: Number of types of bird food ~ number of feeders, age, education, bird feeding years. I've ...
0
votes
1answer
16 views

Trying to determine which distribution to use for my percentage data for mixed effects model

I am seeing a lot of different answers to percentage data, either beta or binomial with a logit link and not to use poison distribution because it isn't count data. My response variable is retention ...
1
vote
1answer
25 views

Which is the best model for explaining spatial distance between points?

I have a dataset with distances between beneficiaries and the nearest provision point (nearest hub). I want to develop a model to explain distances based on several atrributes like category of ...
0
votes
0answers
68 views

What to do when you have significant autocorrelation in a glmmTMB logistic regression model (easily reproducible code provided)?

I have significant autocorrelation apparent from acf and pacf plots of a binomial GLM. My question is how can I solve this ...
0
votes
1answer
31 views

Using a mixed linear model to evaluate responses in a RCBD experiment?

I am new to mixed linear models, so I have a question about them. I have a plant study (being intentionally vague here to achieve confidentiality) evaluating plant senescence rates (leaf death) in an ...
1
vote
1answer
28 views

Factor included based on AIC from anova, yet no significant comparisons using PostHoc

Using step-wise model reduction I have reduced my full model down (Based on AIC and model comparisons using the anova() function in R. This resulted in the ...
0
votes
0answers
16 views

How to test possible interactions in GLM

I'm coding an GLM (with a tweedie distribution, log link) with 24 variables, 6 of which are binary dummy variables, 3 are categorical and the rest continuous. Is there a way to test for all possible ...
0
votes
0answers
26 views

Choosing an appropriate statistical model, must I use linear mixed model, or will a general linear model suffice?

enter code hereMy issue is related to model choice. I have a data set containing day path length (DPL) and a bunch of different behaviours of a lemur species ...
0
votes
1answer
13 views

Marginal effect in logistic regression greater than 1

I have a logistic regression and I calculated the marginal effects. Now I have a value for a numeric variable greater than 1, it's even greater than 2. I'm sorry that I can't give you a reproducable ...
1
vote
1answer
24 views

Comparing generalized linear mixed models (varying the distribution & link function)

I have some questions on performing mixed models on multi-rater data when residuals are heteroskedastic. I've found some of the info on 冠通棋牌-【官网首页】 confusing and quite technical-- would be very ...
0
votes
0answers
4 views

GEEs for temporal autocorrelation and the ACF plot

I have a dataset with temporal autocorrelation in it. The response variables consists of 0s and 1s, and I used a binomial GLM first. However, when I used: residualsmodel <- resid(model) acf(...
0
votes
1answer
45 views

Using a generalized linear model vs generalized mixed effect linear model

I conducted a study with 28 subjects to measure the effect of an intervention. Thus, I have 3 data points from each subject: pre-treatment, treatment, and post-treatment. I tried running a ...
0
votes
0answers
15 views

Why in SAS proc glm, the SE of a difference just simply takes on the larger SE of the two means in comparison?

In SAS proc glm (simple one-way ANOVA), I noticed the SE of differences do not correspond to widely circulated uncertainty propagation technique (e.g. any variation of quadrature summation, pooled ...
0
votes
1answer
36 views

Predicting outcomes with categorical predictors

My dataset is formulated in a contingency table. My predictor variables are categorical and my dependent variable is the number of observations observed. How do I predict outcomes and find residuals? ...
0
votes
1answer
10 views

Factors or dummy variables for a categorical binary response variable? Which approach is better for Machine Learning/Logistic regression in R?

I am new to R and I am creating a glm for a dataset trying to see the covariates that affect if someone is hyper or not hyper(my target categorical binary variable)[hyperness variable]. I am ...
1
vote
1answer
23 views

Interpreting probability from the inverse logit function

I'm doing a study using generalized linear models to investigate effect size and direction of species whose presence/absence were found to be affected by the presence of drought (tested by a Fisher's ...
0
votes
1answer
9 views

Plotting multiple binary glm lines

I'm trying to fit multiple lines on to one plot in R and I'c using code taken from http://stackoverflow.com/questions/36942443/plotting-a-multiple-logistic-regression-for-binary-and-continuous-values-...
0
votes
0answers
67 views

Which error families are allowed in generalized least squares models?

Which error families are allowed in generalized least squares (gls) models? Can I have, for example, a binomial glm and define a covariance structure (which, I guess, makes it a gls) in it (see below ...
0
votes
0answers
5 views

Score Function and Observed Information Matrix for Gamma GLM

I'm studying the theory behind fitting a Gamma GLM to data. I've been trying to replicate the steps that programming languages (e.g. R) might take to fit this GLM to data. The Gamma distribution, ...
0
votes
0answers
8 views

Two intercepts for zero-truncated negative binomial model using VGAM

I am trying to understand the first and second intercept for the zero-truncated negative binomial regression model I estimated using VGAM. Below is my syntax: mod.negb <- vglm(ED_Visit ~ Male + ...
0
votes
0answers
19 views

R package for Bayesian generalized non-linear model

I would like to know if it is possible to fit the Lee-Carter model in a Bayesian setting. This model is used to forecast population mortality dynamics and has the following form: $$ log(\mu_{xt})=\...
0
votes
0answers
5 views

Conducting t-test/multiple comparison in proc GLM vs calculating SE and estimates manually?

As far as I understood, in proc glm, the variance in the whole dataset are pooled together (because of the assumption of the homogeneity of variance?) and each estimate of lsmeans (of the experimental ...
1
vote
0answers
16 views

What to do if I find residuals (=deviance) patterns after aplying a GAMMA GLM in R?

I have activity data for 6 individuals (ID) obtained using two different formulas (RMS.X16 and ...
0
votes
0answers
31 views

Minimizing the expectation value of least-squares loss when data and model are randomly distributed with known normal distribution

How do you minimize the stochastic robust least-squares problem $$ \min_x \mathbb{E}\left\{||A x - b||^2\right\} $$ in which both the parameters $b$ and the model $A$ are normally distributed with ...
1
vote
0answers
14 views

How do I check the assumptions of the Wald test for binomial GLM?

At my statistics course we used LRT to get the p-value of the covariates from a binomial GLM. There was something mentioned about the Wald test assumptions not being met, which results in biased p-...
1
vote
0answers
21 views

Deviance Residuals in logistic regression [duplicate]

How are the deviance residuals (highlighted in yellow) calculated in logistic regression? Please help me to get a good understanding by using a clear example! Image source: Google
2
votes
0answers
16 views

Generalized regression with both additive and multiplicative errors

For measurements of chemical concentrations, it is often the case that the error in the data increases as the true (or estimated) concentration increases. That is, the error is multiplicative and has ...
1
vote
0answers
23 views

Mixed effect zero inflated negative binomial model in R: use of Dharma package, glmmTMB and glmmAdaptive

I am having trouble fitting a mixed effect zero inflated negative binomial model to my data using the GLMMadaptive package: negbi_1 <- mixed_model(fixed=MA ~ ST + AG + SU +SO +Y, ...
0
votes
0answers
12 views

Error fitting random slopes with glmmPQL

I am currently trying to fit a GLM to to describe the following data with both random slopes and intercepts: The following code with no random slope works: ...
0
votes
0answers
34 views

Why should link functions be differentiable?

I'm beginner in stats. I do know that link functions should be continuous, but I do not understand that why should they be differentiable.
1
vote
1answer
42 views

Complementary log-log regression

Can someone explain the general approach to conducting complementary log-log in R? I can hardly find any information on complementary log-log. Now I was capable of running a complementary log-log, but ...
2
votes
1answer
60 views

Alternatives to three-way ANOVA with unbalanced and non-idependent data, non-normal distribution of the residuals and heterocedasticity

I have a response variable ("Value") and three categorical variables for which I want to test the main effects and interactions. ALL DATA COMES FROM ONE INDIVIDUAL for which we have data over time. ...
0
votes
1answer
53 views

Can I build a statistical model for a dependent variable based on other dependent variables?

I have a question about statistical models. In particular, whether it is correct/meaningful to build a statistical prediction for a response variable based on the other dependent variables from the ...
0
votes
0answers
12 views

Gamma Generalized Linear Model (GLM) - Using IRLS algorithm

I'm struggling to understand how model parameters are estimated for a GLM fit to data $X$ with response $Y$ that is (for argument sake) Gamma ($\mu,\phi$) distributed. Let's assume $X$ has $m$ rows ...
1
vote
1answer
33 views

Interpreting quadratic trend coefficients in a repeated measures logistic regression

I conducted an experiment where people either endorsed or did not endorse a statement at the commencement of a one-week training session, at the end of the one-week training session, and at a follow-...
0
votes
0answers
9 views

Correct interpretation of using add1 in forward model selection

ard model selection to learn which of 3 predictors (distance, site, and salinity) should be ...
5
votes
2answers
293 views

Differences between approaches to exponential regression

One could fit an exponential in many different ways. This post suggests doing the down-and-dirty lm on the log of the response variable. This SO post suggests using ...
0
votes
0answers
15 views

Correct interpretation of forward stepwise model selection output

I have a question about my interpretation of stepwise model selection, but first let me explain my data: I have some data on the number of parasites that are counted on fish certain distances away ...
1
vote
0answers
26 views

Simulation from generalized linear model with specific signal to noise ratio

I am trying to simulate from a generalized linear model (GLM) in a specific signal to noise ratio (SNR) setting, but run in to problems if I try to define a reasonable SNR for non-Gaussian data. In ...
0
votes
0answers
8 views

How to connect distribution selection and model selection in generalized linear models [duplicate]

I am trying to better understand the general process of choosing a distribution family and linear predictor for a generalized linear model. There are plenty of examples out there for specific data ...
0
votes
0answers
40 views

How to correctly interpret results of logistics regression in R?

I ran a logistics regression on my data where I am trying to predict the affect state using the emotions. I am trying to predict SelfReport State (factors are "FLOW" and "NOFLOW") using the values of ...
8
votes
1answer
105 views

Why does R refer to the distribution family as an “error distribution” in the context of generalized linear models?

I was wondering why R refers to the distribution family as an "error distribution" in the context of generalized linear models? Normally distributed errors(residuals) of a fitted model are a key ...
0
votes
0answers
23 views

Count data that has two peaks. How would I model this?

We did an experiment where people came in the lab and engaged in a helping task. They were told they could help with as many puzzles as they wanted to and a peer would finish them. The DV was the ...
1
vote
1answer
32 views

What is the general process of choosing, confirming, and supporting the distribution used in a generalized linear model?

I am trying to better understand the process of choosing and validating a distribution for a generalized linear model (glm). I understand that for the most part, you can narrow it down to a few ...
0
votes
0answers
28 views

Converting SAS model to R model: treating intercept as random term

I have a binomial data set in SAS with the following column names: loc, trt, succ, fail I want the response to be the proportion of success, so in my data statement I have total = succ + fail My ...

1
2 3 4 5
63