пятница, 16 августа 2019 г.

Logistic regression 10

Logistic regression/Section 2: Examples in SPSS. FREQUENCIES VARIABLES=age marst sex2 drink2 /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT /HISTOGRAM /FORMAT=LIMIT(20) /ORDER=ANALYSIS. What do we see, does anything catch your eye? Starting point: Missing data: we have 1800 cases, and only 17 missing. . now, that’s not bad; 17 people didn’t tell us their age; 10 people didn’t tell us their marital status. We didn’t suppress tables; you’d have pages and pages and pages if you had a variable with a ton of data points. Looking at the table, we can get a rough estimate of the median: around 36-37 years for age. . . Under “Marital Status”, it shows only the labels, rather than the values: you might want to put both on here. We see that hte bulk of the sample is married, with reasonable percentages of the. Gender of respondent - see anything wrong here? 50.1% male to 49.9% female - see anything here? A: It’s suspiciously close. Did you Drink Alcohol in the last year? How to deal with Missing Data (SPSS Example) Edit. There are different ways to screen out the ones that are missing: I have one way that works, . . . I go up to ‘’Data/Select Cases’’ Select cases “IF” a condition is satisfied Now, the missing ones don’t have a value. . . or do they? Go back to the data set and check how the variable “Age” has been coded. It’s coded, “0”, or “99” is “Missing” IF Age >= 0& marital status >=0 ( RESULT: Some of these cases are missing; now we go up to Descriptives: Age, Marital Status, Gender; Run: Here we go: My descriptive result: 1776; so it worked; I told you it was superstitious! SPSS just did that. . . But if you use techniques like these, CHECK IT! (J: You think it’s not going to work, logically. . .) but it did work! So this is a bit awkward. Apparently, 0 was not a legitimate value; now we’re taking all these cases that do have legitimate values. So, we’ll try to see whether people drink or not using a single dichotomous variable - ‘’sex’’, in this case. Q: What analysis would you use? A: χ^2 test of independence. That’s correct: that’s what I actually did first here then, is I ran just a simple cross-tab: Crosstabs (SPSS Report Section) Edit. What statistic would you report? - Is there a statistically significant difference? A: Yes. Can we conclude that men drink more then women? A: No. (It doesn’t say which way the difference goes) If you ask, “What proportion of the men had a drink. Logistic Regression (SPSS Instructions) Edit. In SPSS go to menu item ‘’Analyse; Regression; Binary Logistic’’ Dependent variable: “Did you drink alcohol…” Covariate (what SPSS calls Independent Variables here): If we have categorical data, we have to tell the program that it’s categorical. A dichotomy is a very special type of categorical variable: In a sense, it’s an interval variable: all the intervals are equal because there is only one variable! So we don’t have the problem of unequal intervals. Some analysis in SPSS won’t run if it thinks you’re giving it the wrong kind of variable: it may not even tell you why, and if it does tell you it’s kind of hidden in there; you have to look for it. . .Okay, so we don’t have to call it a categorical variable: run the analysis OUTPUT: Logistic Regression, report from SPSS. Components of a Logistic Regression Report in SPSS Edit. Logistic Regression (Header) Case Processing Summary (Table) Dependent Variable Encoding (Table) Block 0: Beginning Block (Header) Classification Table Variables in the Equation (Table) Variables not in the Equation (Table) Block 1: Method = Enter (Header) Omnibust Tests of Model Coefficients. ‘’’2.1 Classification Table’’’ If we know people’s gender, can that help us be more accurate? The baserate is that. Q: Can we go over 1) those numbers, and 2) how to interpret? A: In our sample; we have 654 drinkers, and 1122 non-drinkers. The prediction would be, you predict everybody is a drinker, because the majority are: On the people who are not drinkers you are correct on 0%; on the drinkers 100%; the total % correct is 63.2%

Комментариев нет:

Отправить комментарий