Tagged Questions

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)

0
votes
1answer
12 views

bayesglm (arm) versus MCMCpack

Both bayesglm() (in the arm R package) and various functions in the MCMCpack package are aimed at doing Bayesian estimation of generalized linear models, but I'm not sure they're actually computing ...
2
votes
1answer
26 views

Type of inference to use with log-linear Poisson glm on contingency table frequency counts

I was doing some log-linear models to test for interactions/associations in multiway contingency tables (based on the tutorial here, http://ww2.coastal.edu/kingw/statistics/R-tutorials/loglin.html). I ...
1
vote
1answer
62 views

Logistic Regression Assumptions

I am preparing a presentation on logistic regression. I applied logit model to a data set and now want to check whether my model meets logistic regression assumptions. I don't exactly know how to do ...
1
vote
0answers
11 views

Measure of explained variance for Poisson GLM (log-link function)

I am looking for an appropriate measure of the "explained variance" of a Poisson GLM (using a log-link function). I have found a number of different resources (both on this site and elsewhere) that ...
0
votes
0answers
15 views

Creating a jpeg or TIFF for a loop of negative binomial GLMs in R [migrated]

I have made a loop to perform 4 negative binomial GLMs and now I want to graph them in a TIFF. What would be the best way to do this? ...
0
votes
0answers
6 views

Methodology for OCR Content Parsing

From a PDF book I have used built-in PDF OCR to retrieve text contents. But the PDF pages have 1-2 real book pages in one PDF page. I want to separate these pages. Example for txt page i: ...
0
votes
0answers
27 views

How do we generate the ROC curve for Linear Discriminant Analysis method

I know the method to generate the ROC curve for other methods such as naive Bayes where the tuning parameter is the threshold like also in logistic regression. If we want to generate the ROC curve ...
1
vote
0answers
18 views

How to account for overdispersion in a glm with negative binomial distribution?

I'm analysing count data with a generalised linear model in R. I started with a Poisson family distribution, but then realized that data was clearly overdispersed. I then took the option of applying a ...
0
votes
0answers
25 views

R gam() throws error: “Can't correct step size”

I am computing a GAM on a large set of data sets. Almost all of them work, just this one data set makes gam() throw an error. I paste a code that reproduces this error here: ...
0
votes
0answers
8 views

Coefficients flip sign in general linear model depending on what predictors are included: collinearity is NOT a problem [duplicate]

I have a general linear model with several predictors (~10). The sign (beta) of one of the predictors (Pred1) is negative when all predictors are included. It's STILL negative when the most correlated ...
1
vote
0answers
22 views

Adding real zeros to a dataset vs. presence-only modeling?

I have a fisheries dataset for which I have calculated the number of fishing sets in each grid cell (100 km x 100 km) for each month of every year. Fishermen in this fishery are legally required to ...
3
votes
2answers
47 views

Proportion data - beta distribution v. GLM with binomial distribution and logit link

I have a fisheries dataset for which I have calculated value for each grid cell on a map. The value is the proportion of the total fishing sets in that cell for each month/year. So, I have values ...
0
votes
0answers
16 views

covariance matrix of residuals from a fitted model to decorrelate residuals

I fit a geeglm model with clustered data and now I would like to decorrelate the residuals of the model in order to run model diagnostics. I read that if I can obtain the covariance matrix of the ...
0
votes
0answers
27 views

Adding in L2 predictor in GLiMM fails even though ICC is high

I'm using SPSS GLiMM to run a repeated measures logistic regression model. Research Qn I'm interested to know if a MP is more likely to make a particular response (e.g., apology, challenge, denial) ...
0
votes
1answer
33 views

Exploring dependencies between variables in log-linear models

Hi there I'm using R to perform some multivariate data analysis on health data. I'm currently using the glm() function with ...
1
vote
1answer
10 views

Problem fitting a geeglm regression

I am fitting a model using geeglm in geepack and ran into a problem. I have a dataset pertaining to oil consumption and fit the below model. ...
0
votes
0answers
40 views

Poisson GLM,Hessian matrix = the observed Hessian matrix

Assume a simple Poisson model with 2 unknown parameters (the intercept and the slope) Show that the expectation of the Hessian matrix = the observed Hessian matrix or equivalently the observed ...
0
votes
1answer
26 views

Expressing beta estimate in terms of odds ratio for a continuous variable

I am making a table from results of an analysis using generalised linear model which involves detecting association of a categorical predictor variable over multiple outcome variables. Of those ...
0
votes
0answers
16 views

R implementation of Zeger's parameter-driven (latent process) approach to time series regression with count data

For time series regressions with count data, Poisson-response with log link (i.e. GLM) is widely used. However, such models often suffer from serial correlation. One approach to handle was introduced ...
0
votes
0answers
8 views

Proc GLM with a list of binary dummy variables [migrated]

I am running a regression. My outcome (dependent) is a continuous variable. I have two types of independent variables. One represents day of week. The second type of independent variable is a binary ...
3
votes
0answers
24 views

Paired test using GLM with Gamma distribution

I know, that a paired T-test can be formulated in the framework of a linear model for gaussian distributions. I have two vectors of paired mesurements (rates under certain conditions) that follow a ...
0
votes
0answers
10 views

Post hoc for GLM that looks at interactions (in R)

I’d like some help with analysing some count data. I am very new to R (and statistical analysis for that matter!) and have done my best to work it out on my own … but seemed to have got stuck! I am ...
0
votes
0answers
12 views

Post hoc test for GLM using quasi poisson on count data in R? glht?

I'm currently working with count data with lots of zeros (the number of invertebrates within 6 types of hedge plots). I decided to use glm and quasipoisson which showed there is significant ...
0
votes
0answers
46 views

Set of confidence intervals for linear combinations of linear regression coefficients

If $$ y_i = b_0 + b_1 x_i + e_i $$ are linear regressions with $ e_i $ independent and identically distributed $N(0,v^2)$, how do I obtain a set of confidence intervals $ a_0 b_0 + a_1 b_1 $ such ...
0
votes
0answers
22 views

How to measure goodness of fit in a simple quadratic Gaussian GLM?

I hope this question will be specific enough, I went through many of the other questions about GLM but now I am even more confused because my sample size is small and it seems that R square (or pseudo ...
1
vote
0answers
11 views

Variance Decomposition in Generalized Linear Models

I'm using a generalized linear model (with a Negative Binomial distribution for observed variables) to model my data. I was wondering whether using the partial coefficient of determination is ...
0
votes
0answers
19 views

correlation between factors in a glm

My model looks like this: mdl<-glm(yld ~ rain + stage + rain*stage) A hypothetical data for the above model is: ...
0
votes
0answers
28 views

Relative variable importance for glm & glm.nb - Percentage of deviance explained

I'm currently trying to calculate variable importance for multiple GLMs. I've got both continous and count data response variables. The first I modeled with gaussian GLM, the second with negative ...
8
votes
0answers
179 views

Advanced regression modeling examples

I'm looking for an advanced linear regression case study illustrating the steps required to model complex, multiple non-linear relationships using GLM or OLS. It is surprisingly difficult to find ...
2
votes
1answer
154 views

Logistic Regression with regression splines in R

I have been developing a logistic regression model based on retrospective data from a national trauma database of head injury in the UK. The key outcome is 30 day mortality (denoted as "Survive" ...
0
votes
0answers
22 views

How to make beta coefficients comparable?

My study design delivers both, count data and continous outcomes (e.g., numbers of taxa vs. an diversity index). As these variables are used as response variables, I have to use negative binomial glm ...
1
vote
0answers
12 views

modeling a proportion with seasonality removed

I have a time series of proportions that typically fall in the 0.01-0.05 range. I had intended to use GLM to model these proportions, but I ran into trouble when I needed to first remove a strong ...
6
votes
2answers
303 views

Why is GLM different than an LM with transformed variable

As explained in this course handout (page 1), a linear model can be written in the form: $$ y = \beta_1 x_{1} + \cdots + \beta_p x_{2} + \varepsilon_i$$ , where $y$ is the response variable and ...
2
votes
1answer
43 views

Probit or Logit in Generalized Linear Model [duplicate]

I'm trying to apply GLMs on a dataset in which dependent variable Y is dichotomous. I applied either logit and probit models, and probit fitted better than logit model. How do I justify the choice of ...
1
vote
0answers
46 views

How to determine if GLM quadratic term should be set up orthogonal or non-orthogonal

I am setting up a GLM in R where I have only one predictor variable and its quadratic form. I understand that in R I have 2 options. ...
1
vote
1answer
32 views

Why does the null deviance in glm.nb differ between models of the same response variable?

I'm struggeling to understand the topic of deviance. Let's have two models as follows: ...
0
votes
0answers
17 views

Negative binomial instead of ordinal logistic?

I have data with one metric and a discrete outcome that I'm trying to estimate the probability of. The outcome is a count, but it's a safe assumption that the increments aren't i.i.d. I thought an ...
1
vote
0answers
41 views

“weight” input in glm.nb function in R. How exactly does the weight affect the likelihood?

I would like to understand how the weight argument of glm.nb is affecting the likelihood function. I understand that glm.nb find the MLE in an alternating iteration process where for a given theta the ...
1
vote
1answer
48 views

R large glm with sample weights

I have a "stacked panel" data set with ~600,000 rows. While the data are compiled from a survey , the data are no longer in survey format: rather, these are person-year observations for ~100000 ...
0
votes
0answers
6 views

How to specify that the model must include a particular independent variable in r package glmulti

I am trying to find the best model(lowest AICc value) using the package glmulti in r. This model must include TVIS as an independent variable but I am unsure how to specify this in the script. ...
1
vote
2answers
73 views

Analysis for checking if an Ensemble model is a better fit for a dataset than Primitive model

I have a dataset and have the option to apply either GLM (primitive) or a Random Forest (ensemble). So far the Random Forest is giving way better results than the GLM. As it is generally believed that ...
2
votes
2answers
256 views

Was this the appropriate regression model?

I was recently proof-reading a friend's thesis (for their writing, not stats usage) when I came across a usage of a regression model which I would regard as incorrect. However, I'm pretty new to the ...
3
votes
1answer
49 views

“weight” input in glm and lm functions in R

I am confused with the definition of the weights in glm and lm. Using the McCullagh and Nelder (1989)'s notation, If random variable $y_i$ is from the Generalized Linear Model (GLM), then its density ...
2
votes
1answer
29 views

Some questions about AlgDesign for Fractional Factorial Design in R

I have a few Design of Experiment type questions about the AlgDesign package in R that I can't find answered online: Will using the center=TRUE option in the ...
0
votes
0answers
26 views

How to use controls as a reference in GLM?

I'm running glms in R on two datasets, both with three discrete explanatory variables and one continuous dependent variable. My question is about the use of controls - I want to use my controls as a ...
1
vote
1answer
48 views

compare quasi poisson models

I have two models: ...
0
votes
0answers
26 views

Fitting a predictive model when I only care about the top values

I want to build a predictive model that given a certain set of features, predicts a value ( As in regular linear regression models). But as opposed to regular least squares, I actually don't care ...
1
vote
1answer
21 views

Benchmark datasets for testing multiple regression or multivariate regression model?

I have a question as a newbie. I'm working on a tool using regression analysis( linear, multiple, multivariate) to derive a regression model. To verify the correctness of the tool, I'm trying to find ...
2
votes
0answers
45 views

Looking for and dealing with collinearity in a GLM

I've got this dataset with one continuous dependent variable and two categorical explanatory variables. I'm wanting to run glms on the data but I'm finding problems with what I think is collinearity. ...
2
votes
0answers
23 views

Is there a simple model that assumes a negative relationship between the mean and variance of response?

Poisson and Negative Binomial models assume that the variance of response is greater or equal to the mean of response. Is there a simple model where that assumption is reversed, i.e. variance goes ...