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 ...

learn more… | top users | synonyms (1)

1
vote
0answers
41 views

What is the difference between lm(log(y) ~ x) and glm(y ~ x, family = gaussian(link = “log”))?

Is all in the title. I would like to know if there is any difference in terms of coefficients, residuals, p-values, but also conceptually.
0
votes
1answer
16 views

perfect variable separation, determine cutoff via ROCR package in R

I am developing a logistic regression model where perfect variable separation occurs. I want to calculate a cutoff from this data. Interestingly, the length of the slot ...
0
votes
0answers
7 views

How do i input binary data correctly for generalised linear models in SPSS [on hold]

I am looking at which habitat variables might be explaining the presence of an organism. I'm completely hopeless at maths and therefore statistics is even worse for me. The data set i have is pretty ...
0
votes
0answers
6 views

apply fitted model to data and obtain loglikelihood [migrated]

I would like to do the following in Python, preferably with the statsmodels package (but if you know a solution with another package, I would be glad to hear about it as well): I have data ...
0
votes
0answers
16 views

Proper Model Selection Randomized Block with Count Data

I have a data set on insect counts that looks like this: ...
0
votes
1answer
17 views

Generalized linear model with random effects for skewed data

I'd like to use SPSS Generalized Linear Model to analyze a dataset of insects collected from one particular species of vegetables. I have following variables: NUMBER (number of insects collected) ...
1
vote
0answers
24 views

Relationship between the parameters of the Normal distribution and parameters in the probit with multiple predictors?

According to A. Agresti (2007, p. 73) in binary probit regression: "The parameters of the normal distribution relate to the parameters in the probit by mean (mu = -alpha/beta) and standard deviation ...
2
votes
1answer
22 views

Weighted GLM without weights

Suppose we have at our disposal a glm() that's got all the typical features except the ability to specify weights. Intuitively, I can trick it into using weights ...
0
votes
1answer
20 views

Difference between multilevel GLM and mixed linear models when the family is Gaussian and link function is Identity?

In Stata 13, there is now the new command "meglm" (multilevel generalized linear models) to analyse hierarchical models. My question is, what is the difference between the "meglm" with family of ...
2
votes
1answer
37 views

Appropriate regression-like model where the response is on half-integers

What is an appropriate model for the above scatter plot? I am not fully satisfied with a simple linear regression model. Any suggestions? Y in this problem is discrete in nature. It only increments ...
1
vote
0answers
44 views

Fitting GLM with Quasi-Newton method

I'm trying to code my own quasi-Newton algorithm for fitting GLMs in R. My results do not match up with glm and I've been over my code many, many times so I'm ...
1
vote
0answers
14 views

Can two separate regression coefficients be added to estimate their mutual effect?

Let's say I perform a Cox regression including 3 predictors that relate to the survival: Hazard ratios (HR) for predictors Sex: Hazard ratio for males = HR 1.5 Treatment: Hazard ratio for being ...
3
votes
1answer
38 views

Estimates of random effects in binomial model (lme4)

I'm simulating Bernoulli trials with a random $\text{logit}\, \theta \sim {\cal N}(\text{logit}\, \theta_0, 1^2)$ between groups and then I fit the corresponding model with the ...
1
vote
2answers
38 views

GLM over time and space?

is it possible to fit a GLM over space and time? I have shrimp densities measured over 8 months, and in each month there are 4 stations sampled along a freshwater-saltwater gradient, so I have 32 ...
0
votes
0answers
19 views

Testing model fit and running model validation plots for averaged models

I have carried out a model selection process and averaged the models within the top 2 AICcs (using MuMIn in R). I would like to test the model fit using both the chisq and validation/residual plots. ...
0
votes
1answer
26 views

difference between R square and rmse in linear regression

When Performing a linear regression in r I came across the following terms. ...
0
votes
0answers
12 views

Parameter estimation in generalized linear models

I have a bunch of questions on parameter estimation in GLM. They are all inter-related. I have tried to maintain a logical sequence of questions in the following. Bear with me, if the order doesn't ...
0
votes
2answers
51 views

count data as a dependent variable consist of five levels likert scale

I have few Likert type questionnaires (items) as responses recorded from 1 to 5. I am using these responses as a dependent variable against three independent variables( one contentious and two others ...
1
vote
1answer
30 views

Regression models in temperature data

I am quite new to the whole modelling world so I ask your understanding. Can glm models be used for modelling continuous variables? I ask this because I have read that glms are most commonly used to ...
1
vote
1answer
42 views

GLM model selection using AICc with Tweedie distribution

I have two questions regarding use of Tweedie GLM in R. I am new in using this distribution and despite a thorough search on different forums, I could not find my answers. I am now running several ...
0
votes
2answers
65 views

in r, lognormal, glm, transformations, what should I do?

(Updated) I have biomass (grams) as my response variable, and weather data (wind, air temperature, relative humidity, precipitation) as well as vegetation measurements (basal area, canopy closure, ...
0
votes
0answers
13 views

weight of sample sizes in quasi-binomial GLM for proportion data

I'm studying a colonial organism, and my hope is to compare differences in percent survival between three treatment groups. The results are clear, there is a 55% difference in survival between ...
4
votes
1answer
234 views

Why does Pearson's chi-squared test detect differences that the GLM model fails to detect?

How can I interpret the following result? I have 4 groups with around 300 observations each: ...
0
votes
0answers
12 views

scoring/predicting for new observations

I have two data sets of variables where one of them - the new observations - has no dependent variable. The data set without a dependent variable has around 20 times the number of records. ...
0
votes
0answers
16 views

How can I work out the response effect for categorical coefficients in a generalized linear model?

I have a set of different algorithms I would like to test on a set of different data. Running one algorithm on one datum gives a performance score. This score is log-normally distributed, and ...
2
votes
0answers
34 views

R: glm function with family = “binomial” and “weight” specification

I am very confused with how weight works in glm with family="binomial". In my understanding, the likelihood of the glm with family = "binomial" is specified as follows: $$ f(y) = {n\choose{ny}} ...
1
vote
1answer
41 views

Multilevel Modeling in stata

I would like to make a model that calculates the probability of disease. Range of variables are following: disease ~ (0, 1); score ~ (1-10); test ~ (0-30) Large values of test and score indicates that ...
5
votes
1answer
95 views

Advantage of GLMs in terminal nodes of a regression tree?

So I'm playing around with the idea of writing an algorithm that grows and prunes a regression tree from the data and then, in the terminal nodes of the tree, fits a GLM. I've been trying to read up ...
0
votes
0answers
30 views

Confidence intervals with gamlss package

My question regards the use of the gamlss package. I am using gamlss package to fit a dataset to a logistic function. There is ...
0
votes
0answers
17 views

how to plot the decision boundary of a linear model in 3d?

In Matlab I have trained a 3 predictor decision model using let's say fitglm or fltlm. Now I want to show the decision boundary plane of the model in 3D. How should I do that?
11
votes
2answers
198 views

GLM: verifying a choice of distribution and link function

I have a generalized linear model that adopts a Gaussian distribution and log link function. After fitting the model, I check the residuals: QQ plot, residuals vs predicted values, histogram of ...
4
votes
1answer
65 views

Test GLM model using null and model deviances

I've built a glm model in R and have tested it using a testing and training group so am confident it works well. The results from R are: ...
0
votes
0answers
10 views

Correlation between binned residuals and an endogenous variable

I have performed a logistic regression and calculated a binned residual plot: library(arm) binnedplot(x, y) The final plot looks like this: ...
0
votes
0answers
38 views

Are RSM and RBFN essentially GLM?

Is response surface methodology (RSM) the same as a generalized linear model (GLM) with quadratic terms and normal error distribution? Is radial basis function network (RBFN) also the same as a ...
3
votes
2answers
84 views

Appropriately selecting explanatory (independent) variables

My aim is to carry out a GLM. I have 400 sites where I have count data of animals (response variable) and environmental characteristics (explanatory variables). At the moment I have around 40 ...
1
vote
0answers
45 views

How to statistically validate a Framework?

I am creating a Framework, that has independent variables A and B. It has dependent variables C, D, E. F, G, as shown in the diagram. Framework I understand that only after validating a Framework we ...
1
vote
0answers
18 views

R: Plotting GLM residuals vs. linear predictor or response variable?

When assessing a GLM fit, why is it customary to plot residuals against the linear predictor rather than the response variable? I noticed that plot(glm) defaults to ...
0
votes
0answers
42 views

Logistic glm: marginal predicted probabilities and log-odds coefficients support different hypotheses

I'm running a fixed effects logistic regression in R. The model consists of a binary outcome and two binary predictors, with no interaction term. On the log-odds scale, and as an odds-ratio, the ...
2
votes
1answer
19 views

GLM with Gamma distribution of errors: negative residuals?

I'm trying to understand how the Gamma distribution, which is always positive, is used to describe errors when using a GLM. In practice, errors can be negative, as I get negative residuals when ...
1
vote
0answers
37 views

Confidence Intervals for Non-normal data?

I have a dataset where the response is the number of successes and I have two factor variables A, B (A has 6 levels and B has 4 levels) and a quantitative variable H (H is hours so it is ...
2
votes
1answer
71 views

GAM versus GLM: same fit, different significance of predictors

When performing GAM and GLM fits to the same data set, I get an almost identical fit in terms of fitting metrics. However, the variables that are identified as significant differ between the two ...
0
votes
0answers
6 views

how to understand if 2 very correlated predictor influence the output?

I have a binary output $y$ and a small set of predictors $x_1, x_2,...$ Two of these predictors are very correlated. It is known that one of them has influence on the output we want to know if also ...
2
votes
2answers
48 views

bias of p-value analysis in a not well fitting model

In the report http://www.stat.berkeley.edu/~breiman/wald2002-3.pdf Breiman says: Three decades ago many statisticians and quantitative social scientists were enamored of multilinear ...
0
votes
1answer
37 views

What transformation should be carried out if the count is non-integer in poisson glm in r?

My data is like this: person final sex 1 34.20 1 2 2.00 0 3 15.58 0 4 18.00 1 5 50.06 1 I am fitting ...
0
votes
0answers
13 views

Adding a square root link function to an overdispersed negative binomial GLM

I'm analyzing nematode count data (80 data points) from a randomized block design in which I have two factors with both four levels (Plant and Inoc). The data show heavy overdispersion when analyzed ...
3
votes
1answer
97 views

How is the sigma^2 value (or MSE) for the link function computed in logistic regression in R?

For example, if you have a logistic regression on certain dataset: fit <- glm(y ~ x, data = test, family = "binomial") If you do ...
4
votes
1answer
82 views

Examining trends with interactions and with stratification - obtaining discordant results

I'm examining the effect of income (categorized into quintiles) on a response variable during different years (from 2003 to 2014). I adjust for some other covariates and have repeated measurements on ...
3
votes
0answers
42 views

Modelling flight delays with negative values

Modelling flight delays with negative values I am working on a model to predict whether a flight will be delayed. The data consists of some explanatory variables for flights from a specific airport. ...
1
vote
0answers
21 views

Probability that LM with lesser RSS has greater residual for individual i (or opposite sign)?

You have fitted a basic linear Model #1 (i.e., GLM with identity-link) based on observed data with residuals: $$ Model 1: y_i = \beta_0 + \beta_1 x_{1i} + \beta_2 x_{2i} ... + R_i $$ A colleague ...
0
votes
1answer
19 views

I was expecting 0 and 1 as an answer of a predict function in r

I'm doing a binomial family with method="glm" in train function (caret package) and as result I'm getting predicted numbers like "0.62325028 0.51807017 0.67119878 ..." and I was expecting vector ...