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) N Percent Selected Cases Included in Analysis 200 100.0 Missing Cases 0 .0 Total 200 100.0 Unselected Cases 0 .0 Total 200 100.0 a If weight is in effect, see classification table for the total number of cases.
Dependent Variable Encoding Original Value Internal Value male 0 female 1
Classification Table(a,b,c) Predicted FEMALE Percentage Correct Observed male female Step 0 FEMALE male 0 91 .0 female 0 109 100.0 Overall Percentage 54.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 Score df Sig. Step 0 Variables CONSTANT 1.620 1 .203 Overall Statistics 1.620 1 .203
Omnibus Tests of Model Coefficients Chi-square df Sig. Step 1 Step 1.622 1 .203 Block 1.622 1 .203 Model 1.622 1 .203
Model Summary Step -2 Log likelihood Cox & Snell R Square Nagelkerke R Square 1 275.637 .008 .011
Classification Table(a) Predicted FEMALE Percentage Correct Observed male female Step 1 FEMALE male 0 91 .0 female 0 109 100.0 Overall Percentage 54.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.
