Logistic Regression in SPSS - University of Michigan
Logistic Regression in SPSS
DATA LIST
FILE="d:\510\2006\data\brca.dat" RECORDS=1
/IDNUM 1-4 STOPMENS 5 AGESTOP1 6-7 NUMPREG1 8-9 AGEBIRTH 10-11
MAMFREQ4 12 DOB 13-20 (A) EDUC 21-22
TOTINCOM 23 SMOKER 24 WEIGHT1 25-27.
EXECUTE.
/*Before proceeding, be sure to set dob up as a date variable, rather than string*/
/*Extract the Month, Day, and Year of birth from DOB*/
COMPUTE yearbir = Xdate.year(dob) .
EXECUTE .
COMPUTE daybir = Xdate.mday(dob).
EXECUTE.
COMPUTE monbir = Xdate.mon(dob) .
EXECUTE .
missing values yearbir (1999).
IF (yearbir>=2000) yearbir = yearbir-100 .
EXECUTE .
/*Glue Month, Day, and Year of Birth back together to form DATEBIRTH*/
/*Be sure to set up the format of this variable to display as a date*/
COMPUTE datebirth = DATE.DMY(daybir,monbir,yearbir) .
EXECUTE .
/*Now, calculate the date of the survey, DOS*/
/*Be sure to set up the format of this vairable to display as a date*/
COMPUTE dos = DATE.DMY(01,01,1997) .
EXECUTE .
/*Finally, compute the person's age in years*/
COMPUTE AGE = DATEDIFF(dos,datebirth,"years") .
EXECUTE .
/*Set up missing values for other variables*/
missing values stopmens (9)
/agestop1 (88,99)
/agebirth (99)
/numpreg1 (99)
/mamfreq4 (9)
/educ (99)
/totincom(8,9)
/smoker (9)
/weight1 (999).
RECODE stopmens (1=1) (2=0) into MENOPAUSE.
EXECUTE.
RECODE educ (1 thru 4 = 1) (5,6 = 2) (7,8=3) into EDCAT.
EXECUTE.
RECODE educ (1 thru 5 = 0) (6 thru 8 = 1) into HIGHED.
EXECUTE.
RECODE age (low thru 49 = 1) (50 thru 59 = 2) (60 thru 69 = 3) (70 thru high =4) into AGECAT.
EXECUTE.
RECODE age (low thru 49 = 0) (50 thru high = 1) into OVER50.
EXECUTE.
RECODE age (50 thru high = 1) (low thru 49 = 2) into HIGHAGE.
EXECUTE.
*---------------------------------------------------------------------------------------------------------ANALYSIS.
DESCRIPTIVES
VARIABLES=IDNUM STOPMENS AGESTOP1 NUMPREG1 AGEBIRTH MAMFREQ4 DOB EDUC TOTINCOM SMOKER WEIGHT1 yearbir daybir monbir
datebirth dos AGE MENOPAUSE EDCAT HIGHED AGECAT OVER50 HIGHAGE
/STATISTICS=MEAN STDDEV MIN MAX .
*--------------------------------------------Logistic regression with a single continuous predictor.
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGE
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
*-----------------------------------------------------------------------------------Oneway frequencies.
FREQUENCIES
VARIABLES=STOPMENS MENOPAUSE EDUC EDCAT HIGHED AGE AGECAT OVER50 HIGHAGE
/ORDER= ANALYSIS .
/*Crosstabs of HIGHAGE by STOPMENS*/
CROSSTABS
/TABLES=HIGHAGE BY STOPMENS
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ RISK
/CELLS= COUNT ROW
/COUNT ROUND CELL .
/*Logistic Regression with Dummy Variable Predictor*/
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER OVER50
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
/*Relationship of AGECAT to MENOPAUSE*/
CROSSTABS
/TABLES=AGECAT BY MENOPAUSE
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ
/CELLS= COUNT ROW
/COUNT ROUND CELL .
/*Recode Age into AGECAT3 with 3 categories*/
RECODE age (low thru 49 = 1) (50 thru 59=2) (60 thru high = 3) into AGECAT3.
EXECUTE.
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGECAT3
/CONTRAST (AGECAT3)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
/*Relationship of several predictors to Menopause*/
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGE EDCAT SMOKER TOTINCOM NUMPREG1
/CONTRAST (EDCAT)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
*********************************************************************************************
DESCRIPTIVES
VARIABLES=IDNUM STOPMENS AGESTOP1 NUMPREG1 AGEBIRTH MAMFREQ4 DOB EDUC TOTINCOM SMOKER WEIGHT1 yearbir daybir monbir
datebirth dos AGE MENOPAUSE EDCAT HIGHED AGECAT OVER50 HIGHAGE
/STATISTICS=MEAN STDDEV MIN MAX .
[pic]
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGE
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Logistic Regression
[pic]
[pic]
Block 0: Beginning Block
[pic]
[pic]
[pic]
Block 1: Method = Enter
[pic]
[pic]
[pic]
[pic]
FREQUENCIES
VARIABLES=STOPMENS MENOPAUSE EDUC EDCAT HIGHED AGE AGECAT OVER50 HIGHAGE
/ORDER= ANALYSIS .
Frequencies
[pic]
Frequency Table
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
/*Crosstabs of HIGHAGE by STOPMENS*/
CROSSTABS
/TABLES=HIGHAGE BY STOPMENS
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ RISK
/CELLS= COUNT ROW
/COUNT ROUND CELL .
Crosstabs
[pic]
[pic]
[pic]
/*Logistic Regression with Dummy Variable Predictor*/
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER OVER50
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Logistic Regression
[pic]
[pic]
Block 0: Beginning Block
[pic]
[pic]
[pic]
Block 1: Method = Enter
[pic]
[pic]
[pic]
[pic]
/*Relationship of AGECAT to MENOPAUSE*/
CROSSTABS
/TABLES=AGECAT BY MENOPAUSE
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ
/CELLS= COUNT ROW
/COUNT ROUND CELL .
[pic]
[pic]
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGECAT
/CONTRAST (AGECAT)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
RECODE age (low thru 49 = 1) (50 thru 59=2) (60 thru high = 3) into AGECAT3.
EXECUTE.
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGECAT3
/CONTRAST (AGECAT3)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Logistic Regression
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
/*Relationship of several predictors to Menopause*/
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGE EDCAT SMOKER TOTINCOM NUMPREG1
/CONTRAST (EDCAT)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Logistic Regression
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
/*Relationship of several predictors to Menopause*/
LOGISTIC REGRESSION MENOPAUSE
/METHOD = ENTER AGE EDCAT SMOKER TOTINCOM NUMPREG1
/CONTRAST (EDCAT)=Indicator(1)
/PRINT = CI(95)
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
Logistic Regression
[pic]
[pic]
[pic]
[pic]
[pic]
[pic]
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- differences between statistical software sas spss and
- analyses of cateogical dependent variables
- multinomial logistic regression ibm spss output
- psychology 522 622
- chapter 6b logistic regression using spss answers
- logistic regression in spss university of michigan
- case study logistic regression
- logistic regression using sas university of michigan
- hi tim jeroen smits
Related searches
- university of michigan admissions staff
- multinomial logistic regression in sas
- ordinal logistic regression in r
- probabilities ordinal logistic regression in r
- multiclass logistic regression in r
- ordinal logistic regression in spss
- multinomial logistic regression in spss
- plot logistic regression in r
- ordinal logistic regression in minitab
- logistic regression in sas
- multiple regression in spss 25
- binary logistic regression in excel