5

No. A GLM is characterized by its link function and its target distribution. TweedieRegressor assumes a Tweedie distribution for the latter, which do not include the Bernoulli distribution needed for logistic regression.


4

Logistic regression corresponds to a Binomial distribution, a member of the exponential family, so in that sense it is nested within the Exponential Dispersion class of models. The $\mathrm{Tweedie}(\mu, \sigma^2)$ family specifically is also contained within $\mathrm{ED}$, but imposes the mean-variance relationship \begin{align*} \mu &= \mathbf{E}[Y]\\ \...


3

You definitely need the intercept. Say you have two binary $X$'s and a binary $Y$. Without the intercept, your model is $\log(p/(1-p)) = \beta_1 X_1 + \beta_2 X_2$. When both $X$'s are at their reference levels, you get $\log(p/(1-p)) = \beta_1 0 + \beta_2 0 = 0$. This implies that $p = 0.5$ when both of your independent variables are at their reference ...


3

Because probabilities are bounded between 0 and 1, we need some function which can take the unbounded input $\theta^T x$ and map it to the unit interval. Mathematically, we need $$f : \mathbb{R} \to [0,1]$$ The sigmoid function accomplishes this, but it is not the only one. If we had used the CDF of the normal, we would be doing something called Probit ...


3

This is because the estimated coefficients are in a model controlling for other variables, whereas the plot you made does not control for other variables. If you were to make a simple model just of the outcome regressed on the single scale you are looking at, the model coefficients would reproduce the marginal plot exactly. There are many reasons why this ...


2

Unless you invent clever features as highly non-linear functions of $\{X_1,X_2\}$, logistic regression will not be able to separate the two classes visualized below. Logistic regression will have to draw the boundary somewhere. Adding powers of $\{X_1,X_2\}$ will not help in this situation. You will need to know the nature of the two classes to introduce ...


2

The issue is that the units of the $X$-variables are not constant, so standardizing them makes them the same (at least in the sense of all being standard deviations—whether that really makes them the same is a bit of a philosophical issue). You are discussing this in terms of variable importance, but the topic has been discussed extensively in the area of ...


2

There are many "sigmoid" functions, but the one you quote, the logistic function, is the most common in machine learning and statistics. I can think of two reasons for it: It fits well into the formalism of generalised linear models, and it appears naturally as the class probability if the classes are normally distributed. The first reason is ...


2

GLM is geared more towards vectors and matrices within linear algebra, mainly for the use of calculating - computing shaders and rendering, transformations, etc. However, they do support Quaternions. In A 3D graphics environment if you try to rotate from all 3 axes individually and independently, it can lead to a phenomenon called Gimbal Lock through the use ...


2

I assume that you'd like to fit a four parameter logistic model extended to multiple independent variables. I think this essentially means that you'd like to do a logistic regression with a floor and ceiling. 4PL: $$y = d + \frac{a-d}{1 + (\frac{x}{c})^b}$$ In this context, each of the parameters has a specific interpretation. It doesn't exactly work when ...


2

You can use a mixed effects model, a logistic regression with random intercepts for question and for participant. If you have data in long format, something like participant question answer 1 1 A 1 2 B . . . n 1 A n 2 A the logistic regression will have a linear predictor $$ \eta_{...


1

Unfortunately your contrast matrix is, as you suspected, rank-deficient. I think your suggestion of two analyses is probably the best way to go forward but you would need to stress when reporting your findings that you are just cutting the cake in slightly different ways, not finding separate things n the two analyses.


1

If your outcome is a 0/1 variable, it gives the probability of 1. If your outcome is a factor variable, it gives the probability of levels(y)[2] where y is the outcome. If you're confused, change your outcome to be a 0/1 variable where you control which values correspond to 0 and 1. For example, if your outcome y had two levels A and B and you wanted the ...


1

Let's suppose we could simply observe the joint distribution of $\Pr(Y,X,Z)$. We don't have to estimate anything. We can calculate anything we want from this joint distribution. Our assumptions about how the outcome is determined (a causal model) say the treatment effect, $E[Y_{X=1} - Y_{X=0}]$ isn't equal to $E[Y|X=1] - E[Y|X=0]$. There's a confounding ...


1

This is a matter of model form, not of colinearity, so the correlations between the variables will not help you interpret this phenomenon. The fact that you get significant results with one model but not with another model just means that the predictors with significant coefficients are conditionally associated with the outcome while the predictors in the ...


1

For the Cox model deviance residuals, see this page for discussion. Censored cases necessarily have negative deviance residuals; they don't have observed event times, so their event times can't be earlier than predicted (the requirement for a positive deviance residual). Deviance residuals can be helpful in identifying outliers, but your data don't suggest ...


1

\begin{align*} f\left(x;\theta\right) &= 2\cdot\theta\cdot\exp\left(-x^2\right)\cdot\left(\frac{\exp\left(-x^2\right)}{1-\exp\left(-x^2\right)}\right)^{\theta-1}\\ &= \underbrace{\theta}_{a\left(\theta\right)}\cdot\underbrace{2\cdot\exp\left(-x^2\right)}_{b\left(x\right)}\cdot\exp\left(\underbrace{\theta-1}_{c\left(\theta\right)}\cdot\underbrace{\log\...


1

First of all, you should be aware that the "Psuedo-$R^2$" probably doesn't mean what you think it means. In OLS $R^2$ tells you the "percent of variance" that is being explained by the model, but in a logit model you aren't explaining variance at all - you are predicting $Pr(Y=1)$, so there is no direct analogy. Despite that, there are a ...


1

I think there is a lot of confusion here. First, I want to remind you that OLS and MLE are statistical algorithms for estimating parameters from data. OLS says, to get the parameters estimates for a linear model, find those that minimize the sum of the squared residuals. MLE says, to get the parameter estimates for a model, find those that maximize the ...


1

Without knowing the specifics of your problem, it may simply be that OLS models the conditional average of the dependent variable, while logistic regression models the probability of being 1. Especially with a large number of data points, the two may simply coincide. For instance, you may have 1000 matches with 40 moves, 550 won by White and 450 by black. (...


1

Short answer: Your second proposal seems strange to me, go for the simpler first proposal. There is no problem in principle with mixing different kinds of variables as predictors in a regression. If the range of the continuous variable is not small, consider to spline it (or simpler, a quadratic polynomial model). For the categorical variable with some ...


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