How can I run a logistic regression with only a constant in the model using SPSS?

How can I run a logistic regression with only a constant in the model using SPSS?

To run a logistic regression with only a constant in SPSS, follow these steps:
1. Open SPSS and click on “Analyze” in the menu bar.
2. Select “Regression” and then “Binary Logistic” from the drop-down menu.
3. In the “Dependent” field, enter the variable that represents the outcome of interest.
4. In the “Covariates” field, enter the constant by typing “1” or selecting it from the list of variables.
5. Click on “Options” and make sure the “Constant” option is selected under “Model Selection.”
6. Click “Run” to execute the logistic regression with only a constant in the model.
This will provide information on the intercept and the overall model fit, which can be used for further analysis and interpretation.

How can I run a logistic regression with only a constant in the
model? | SPSS FAQ

There may be times when you would like to run a logistic regression with no
predictor variables; in other words, just the constant (a.k.a. the
intercept).  For example, one may do this when calculating deviance scores
between various models.  If you try to run the logistic regression command
in SPSS without a method subcommand or a method = enter
subcommand with no variables after it, SPSS will give you an error message and
not run the logistic regression.  There is a way to “trick” SPSS
into running this type of logistic regression model.  First, you will need
to create a new variable that is a constant in the dataset.  Next, when you
run the logistic regression, use this new (constant) variable as the independent
variable with the noconst subcommand.  In effect, you are simply
substituting the constant that you create for the one that would normally be
included in the model.  (Please note that this trick does not work with the
regression command.  According to SPSS technical support, the
regression
command cannot be run without predictors; in other words, you
cannot get an intercept only model.  If you want an intercept only model,
you will need to use the glm command.)

For example, let’s use the /spss/faq/hsb2.sav
dataset.  First, we will create the constant
variable.  Next, we will run the logistic regression using female as the dependent
variable (we understand that this is an unusual choice for a dependent
variable, but we just needed a dichotomous variable for the example).

compute constant = 1.
execute.
logistic regression  var = female
 /method = enter constant
 /noconst.
Case Processing Summary
Unweighted Cases(a)NPercent
Selected CasesIncluded in Analysis200100.0
Missing Cases0.0
Total200100.0
Unselected Cases0.0
Total200100.0
a If weight is in effect, see classification table for the total number of cases.
Dependent Variable Encoding
Original ValueInternal Value
male0
female1

Classification Table(a,b,c)
Predicted
FEMALEPercentage Correct
Observedmalefemale
Step 0FEMALEmale091.0
female0109100.0
Overall Percentage54.5
a No terms in the model.
b Initial Log-likelihood Function: -2 Log Likelihood = 277.259
c The cut value is .500
Variables not in the Equation
ScoredfSig.
Step 0VariablesCONSTANT1.6201.203
Overall Statistics1.6201.203
Omnibus Tests of Model Coefficients
Chi-squaredfSig.
Step 1Step1.6221.203
Block1.6221.203
Model1.6221.203
Model Summary
Step-2 Log likelihoodCox & Snell R SquareNagelkerke R Square
1275.637.008.011

Classification Table(a)
Predicted
FEMALEPercentage Correct
Observedmalefemale
Step 1FEMALEmale091.0
female0109100.0
Overall Percentage54.5
a The cut value is .500
Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 1(a) CONSTANT .180 .142 1.616 1 .204 1.198
a Variable(s) entered on step 1: CONSTANT.

Cite this article

stats writer (2024). How can I run a logistic regression with only a constant in the model using SPSS?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-run-a-logistic-regression-with-only-a-constant-in-the-model-using-spss/

stats writer. "How can I run a logistic regression with only a constant in the model using SPSS?." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-run-a-logistic-regression-with-only-a-constant-in-the-model-using-spss/.

stats writer. "How can I run a logistic regression with only a constant in the model using SPSS?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-run-a-logistic-regression-with-only-a-constant-in-the-model-using-spss/.

stats writer (2024) 'How can I run a logistic regression with only a constant in the model using SPSS?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-run-a-logistic-regression-with-only-a-constant-in-the-model-using-spss/.

[1] stats writer, "How can I run a logistic regression with only a constant in the model using SPSS?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I run a logistic regression with only a constant in the model using SPSS?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top