# Chapter 21 Logistic Regression Analysis

To explore the association between one or more predictors and a dichotomous dependent variable, logistic regression analysis can be used. In this example, a dataset/dataframe called dat contains two continuous variables, predictorVariable1, and dependentVariable, and one nominal variable predictorVariable3.

## 21.1 jamovi

Go to the Regression menu and select right under Logistic Regression ‘2 outcomes/ binomial’. Numerical variables are dragged to the window, labeled ‘Covariates’. Nominal variables (factors) are dragged to the window, labeled ‘Factors’.

## 21.2 R

The function to use is glm (generalized linear model), which comes with R base. The summary function shows the most important results.

result <-  glm(dichotomousDependentVariable ~ predictorVariable1 + predictorVariable3,
data = dat,family = binomial(link = "logit"))
summary(result)

## 21.3 SPSS

In SPSS the syntax looks like the following.

LOGISTIC REGRESSION VARIABLES dichotomousDependentVariable
/METHOD=ENTER predictorVariable1 + predictorVariable3.