# Questions tagged [logistic-regression]

Logistic regression is a statistical classification model used for making categorical predictions.

3,088 questions
Filter by
Sorted by
Tagged with
0answers
9 views

### clogitL1 - extract regression coefficients

I'm an R newbie. I'm using "clogitL1" to run a regularized conditional logistic regression for a matched case-control study with 1021 independent variables (metabolites). I'm not able to ...
0answers
15 views

### Implementing a structural equation model in a hybrid regression model with longitudinal data

I am working on longitudinal data with three waves and have first utilized a hybrid probit regression model (within-between regression model). I have run the analyses in STATA using the following code:...
0answers
18 views

### Parameters of cost function in cross validation function for logistic regression in R

I am following a course where cross validation of logistic regression is explained. I know how cross validation work .The code is shown as below: library(boot) library(SDMTools) # Accuracy function ...
0answers
8 views

### Logistic Model Error: Singular matrix while having highly correlated categorical dummy

Similar to Question here: If I have one of the dummies of the categorical variables which has high VIF (multicollinearity), I would assume it should not be removed from the predictor list. But the ...
1answer
57 views

### How to use LogisticRegression on categorical data? [closed]

import pandas as pd from sklearn import model_selection from sklearn.linear_model import LogisticRegression trans = pd.read_csv("steam3.csv") dummies = pd.get_dummies(trans["platforms&...
1answer
29 views

### Accounting for Spatial Autocorrelation in Model

I am trying to account for spatial autocorrelation in a model in R. Each observation is a country for which I have the average latitude and longitude. Here's some sample data: country <- c("IQ&...
0answers
10 views

### Why Do I Get Different Results When I Change the Reference Category for the Same Logistic Regression Model?

I run a multiple binary logistic regression of the same model with different references and found different results. In the first model, I set the first categories of each independent variable as ...
1answer
30 views

### Why the Accuracy Score is Zero in Sentiment Analysis

The training data contains around 20000 rows with headers: id, sentiment, text I have mapped the sentiment as follow: df.sentiment= df.sentiment.map({"Neutral": 1, "Negative":0, &...
1answer
64 views

### How do I make fit work in logistic regression?

I am trying to fit data using logistic regression, but I am getting a value error. I am working with iris dataset from sklearn: # The data is in iris["data"] and target in iris["target&...
0answers
18 views

### Categorical variables - Regression coefficients of variable levels not fully displayed in model output

The question in short: How to encode a categorical variable with K levels in a regression model with more than 1 feature, such that the model coefficient for this categorical variable returns K-1 ...
1answer
28 views

### Error using the 'predict' function for a logistic regression

I am trying to fit a multinomial logistic regression and then predicting the result from samples. ### RZS_TC is my dataframe RZS_TC.loc[RZS_TC['Mean_Treecover'] <= 50, 'Mean_Treecover' ] = 0 ...
0answers
14 views

### How to generate synthetic data to train a given logistic regression model in tensorflow probability?

I'm currently working on a Python project where I need to generate synthetic training data for a classification problem. In particular, I need to generate n data points using tensorflow_probability, ...
1answer
16 views

### Cannot get L1 ratio in LogisticRegressionCV object

I am trying to fit an elastic net model using LogisticRegressionCV. I want to see what L1 ratio LogisticRegressionCV chooses after cross validation. I read from its documentation that after fitting we ...
0answers
11 views

### How to extract PCA results (only PC1 + PC2) and use it as my independent variable in logistic regression?

My data is about fifa world cup. I'm trying to find the team winner of the year. Since my data is for each player, i use code 'group_by' and get 352 groups. Below are my code: by_season.team<-data....
0answers
22 views

### Getting Chi-Square statistics in proc surveylogistic

per Default proc surveylogistic displays an F test in the "testing the null hypothesis /beta = 0 " output. Can I somehow change that to a Chi-Square Test? Usually I use proc logistics but ...

15 30 50 per page