Tagged Questions
0
votes
0answers
17 views
Prepare data for generalized linear regression [migrated]
I want to perform glm for the dataset Titanic in R. I did the following steps to prepare the data and run glm
...
0
votes
0answers
29 views
Restricting model parameters in logistic models in R
Is there any function in R that can solve the problem like this in SAS?
Thanks in advance!
0
votes
0answers
25 views
How do you generate synthetic sparse binary linguistic data for logistic regression?
I am trying to generate synthetic linguistic data (boolean features) to fit a binary logistic regression model. This is similar to 8260771 on StackOverflow and several synthetic data questions on this ...
0
votes
1answer
101 views
How are the p-values of the GLM in R calculated?
I have been running some binomial logistic regressions in R on a data set and I realised that the p-values of the estimated coefficients are not computed based upon a Normal distribution. For e.g. I ...
1
vote
0answers
107 views
Is conditional logit a specific form of GLM? And what are its specificities?
Background: For a project, I am fitting a conditional logit model where I have 5 control cases for every realized case. To do that I use the clogit() function in ...
3
votes
0answers
127 views
Assumptions of generalized linear models
On page 232 of "An R companion to applied regression" Fox and Weisberg note
Only the Gaussian family has constant variance, and in all other GLMs the conditional variance of y at $\bf{x}$ ...
4
votes
2answers
253 views
Generalized Linear Model in SPSS with common values among predictors treated as subpopulations. Why?
I am teaching a class on logistic regression with SPSS. The textbook supplies a sample data set with a binary predictor and two numeric covariates. The sample contains 1000 rows and a number of these ...
7
votes
1answer
253 views
Understanding the predictions from logistic regression
My predictions coming from a logistic regression model (glm in R) are not bounded between 0 and 1 like I would expected. My understanding of logistic regression is that your input and model parameters ...
2
votes
1answer
153 views
Enormous coefficients in logistic regression - what does it mean and what to do?
I get enormous coefficients during logistic regression, see coefficients with krajULKV:
...
2
votes
2answers
335 views
What is the difference between logit-transformed linear regression, logistic regression, and a logistic mixed model?
Suppose I have 10 students, who each attempt to solve 20 math problems. The problems are scored correct or incorrect (in longdata) and each student's performance can be summarized by an accuracy ...
3
votes
1answer
114 views
Indicator variables and backward elimination with GLM
I am running logistic regression using glm in R on data, that has some indicator variables to it. Two of those have multiple levels and have been rewritten as ...
1
vote
1answer
79 views
Simple way to fit large number of single factor logistic regression models in R - automatically
I have a dataset with one binary target variable called “target” and many many factors “F1”, F2”… “F200”. I’m trying to come up with code to fit 200 single factor logistic regression models and return ...
4
votes
1answer
545 views
How to simulate artificial data for logistic regression?
I know I'm missing something in my understanding of logistic regression, and would really appreciate any help.
As far as I understand it, the logistic regression assumes that the probability of a '1' ...
0
votes
2answers
879 views
How to do multiple regression with limited experience and (hopefully) excel?
I am doing a study of how legal need relates to a number of predictors.
Outcome Variable: Legal Need (Yes or No)
Possible Predictors: Age, Gender, Race, Ethnicity, Language, Clinic, Insurance ...
2
votes
1answer
422 views
Percent correctly predicted of logit model
Is there a standard way to report the percent correctly predicted when predicting a binary outcome? Using glm in r, the results are predicted probabilities. However, in order to make a comparison to ...
2
votes
1answer
132 views
Logistic regression-like model for non-discrete outcomes
If I have a set of continuous predictors $X$ and a binary outcome $Y$ and I wanted to build a predictive model of $P(Y|X)$, I would start with a logistic regression model.
However, in my particular ...
7
votes
2answers
636 views
Difference between 'link function' and 'canonical link function' for GLM
What's the difference between terms 'link function' and 'canonical link function'? Also, are there any (theoretical) advantages of using one over the other?
e.g. A binary response variable can be ...
0
votes
1answer
130 views
Logistic regression on a dataset with duplicated records
I have a large data set with multiple records per phone number. Each record has two variables - the number of past attempts in the past 60 days (number of times it was called) which range from 0 to 30 ...
1
vote
1answer
274 views
Error distribution for linear and logistic regression
With continuous data, a linear regression $Y=\beta_1+\beta_2X_2+u$ assumes that the error term is distributed N(0,$\sigma^2$)
1) Do we assume that Var(Y|x) is likewise ~N(0,$\sigma^2$)?
2) What is ...
3
votes
2answers
195 views
Logistic regression: the standard deviation used in: GLMPOWER
I attended a training class from SAS about experimental design in marketing. They advocated the use of their GLMPOWER proc for power analysis for designing experiments.
GLMPOWER is a power analysis ...
2
votes
3answers
1k views
How can I compute Pearson's $\chi^2$ test statistic for lack of fit on a logistic regression model in R?
The likelihood ratio (a.k.a. deviance) $G^2$ statistic and lack-of-fit (or goodness-of-fit) test is fairly straightforward to obtain for a logistic regression model (fit using the ...
4
votes
1answer
848 views
Logistic regression: grouped and ungrouped variables (using R)
I'm reading A. Agresti (2007), An Introduction to Categorical Data Analysis, 2nd. edition, and am not sure if I understand this paragraph (p.106, 4.2.1) correctly (although it should be easy):
In ...
3
votes
1answer
167 views
Why does -2*LL differ when using binary logistic regression vs GLM binary logistic in SPSS?
I'm comparing plausible models selected a-priori to predict a binary response variable. I used binary logistic regression in SPSS20 and obtained AIC=-2*LogLikelihood+2k where k is the number of ...
3
votes
3answers
344 views
Do zero inflated continuous covariates cause “problems” in binary logistic regression?
I am trying to do a logistic regression to look at the relationship between the number of cigarettes smoked by subjects in a sample (0-60 per day) and a yes/no outcome. As a lot of people in the ...
0
votes
1answer
189 views
Controlling for multiple, nominal variables in a linear model
Here's my experiment: I'm testing the physiological effects of a treatment on a mice (measuring continuous variables such as total mass, fat mass, bone density, etc). I want to test the significance ...
0
votes
1answer
587 views
Logistic regression in R returning NA values
First off, I'll say I am a biologist and new to the statistics side of things so excuse my ignorance
I have a data set that consists of a binary outcome and then a bunch of trinary explanatory ...
2
votes
1answer
184 views
Logistic regression and complementary log log model
is there like a diagnostic checking(like those in the time series) done for logistic regression and complementary loglog model?
9
votes
1answer
3k views
Obtaining predicted values (Y=1 or 0) from a logistic regression model fit
Let's say that I have an object of class glm (corresponding to a logistic regression model) and I'd like to turn the predicted probabilities given by ...
3
votes
2answers
151 views
Efficiency as a dependent variable
I have a dataset, consisting of two independent variables each with two levels.
The independent variables are individuals (1 vs. 2) and light (day vs. night) The dependent variable is the efficiency ...
7
votes
2answers
1k views
Can I use glm algorithms to do a multinomial logistic regression?
I am using spotfire (S++) for statistical analysis in my project and I have to run multinomial logistic regression for a large data set. I know best algorithm would have been mlogit, but unfortunately ...
3
votes
1answer
820 views
Explanation of R diagnostic plot for logistic regression
I'm hoping someone can explain this bit of R code for me related to glm(). I don't understand the diagnostic plot that has been suggested. It seems a more ...
2
votes
1answer
461 views
Find the equation from generalized linear model output
Another basic question.
Let's say that I generate the probability of an outcome based on a certain factor and plot the curve of that outcome. Is there any way to extract the equation for that curve ...
37
votes
5answers
14k views
Difference between logit and probit models
Can anybody please tell me the difference between the logit and the probit model? I'm more interested here in knowing when to use logistic regression, and when to use probit. If there's any literature ...
4
votes
1answer
379 views
How to write a multinomial logit model as a generalized linear model?
Logistic, linear and probit regression can be written in terms of Generalized Linear Model (GLM). Can the multinomial logit regression be written in terms of GLM as well?
5
votes
1answer
2k views
What is the difference between generalized estimating equations and GLMM?
I'm running a GEE on 3-level unbalanced data, using a logit link. How does this differ (in terms of the conclusions I can draw and the meaning of the coefficients) from a GLM with mixed effects ...
8
votes
1answer
353 views
Properties of logistic regressions
We're working with some logistic regressions and we have realized that the average estimated probability always equals the proportion of ones in the sample; that is, the average of fitted values ...
2
votes
2answers
1k views
Interaction suppresses the main effect? How to interpret it?
I have a simple model without interaction and it stated significant effect for all the explanatory variables (continuous variable rok and categorical variables obdobi (levels hn and nehn) and kraj:
...
2
votes
2answers
890 views
How to obtain in R a good formula for glm (general linear models) to predict a binomial variable?
Is there a package or library that can help me suggest a formula given the independent variables which will work well in glm, for example this formula can be something like x^2+log(y)+Z, it does not ...
8
votes
3answers
2k views
How to apply LASSO to IRLS (logistic regression)?
I have programmed a logistic regression using the IRLS algorithm. I would like to apply a LASSO penalization in order to automatically select the right features. At each iteration, the following is ...
7
votes
1answer
882 views
Output of logistic model in R
I'm trying to interpret the following type of logistic model:
mdl <- glm(c(suc,fail) ~ fac1 + fac2, data=df, family=binomial)
Is the output of ...
12
votes
2answers
1k views
When is logistic regression solved in closed form?
Take $x \in \{0,1\}^d$ and $y \in \{0,1\}$ and suppose we model the task of predicting y given x using logistic regression. When can logistic regression coefficients be written in closed form?
One ...