ตัวแปรตาม คือ low
ตัวแปรต้น คือ age ตัวแปร Covariate คือ lwt, race, smoke, pti, ht, ui
ตัวแปรต้น อาจเป็นชนิด Continuous หรือ Categorical ได้
Ho : ตัวแปรต้นและตัวแปรตามไม่เกี่ยวข้องกัน (no relationship)
Ha : ตัวแปรต้น predict ตัวแปรตามได้
ใช้ Wald (Chi - Square) เพื่อทดสอบ ว่าตัวแปรต้น predict ตัวแปรตามได้
โดยมีสมการเส้นตรง คือ ln[Y/(1−Y)] = a +
b
1X1 +
b
2X2 +
b
3X3 + ...
p-value ที่ได้จาก Wald statistics หมายถึง b<>0 ตัวแปรต้น predict ตัวแปรตามได้
(Odds Ratio = e ยกกำลัง b, ถ้า b เป็น 0, Odds Ratio = 1)
แต่ต้องดูที่ 95%CI ของ Odds Ratio ด้วย การหาค่า 95% CI ทำได้หลายวิธี เช่น woolf, exact, ...
มีข้อตกลงเบื้องต้นว่า แต่ละเหตุการณ์เกิดขึ้นอย่างอิสระ
natural log ของ odds ratio และตัวแปรต้น เป็นสมการเส้นตรง
Odds Ratio และ 95%CI อาจบอกได้ว่า
ตัวแปรต้นตัวใดมี effect ต่อตัวแปรตาม มากกว่าต้วแปรต้นตัวอื่นๆ
"assumes that the natural log of the odds ratio
and the measurement variables have a linear relationship."
"you can use it for suggestions about which independent variables
have a major effect on the dependent variable."
Source :
http://www.biostathandbook.com/multiplelogistic.ht...
SPSS
Ho: ตัวแปรต้นและตัวแปรตามไม่เกี่ยวข้องกัน no relasionship
Ha: ตัวแปรต้น predict ตัวแปรตามได้
Logistic Regression Exp(B) คือ Odds Ratio เลือก Option 95%CI
Sig. เป็นค่า p-value ของ Wald (Chi Square)
Categorical Variables Codings
black 1, 0
other 0, 1
white 0, 0
STATA
logistic var1 var2 var3 var4 var5
var1 คือตัวแปรตาม
var2 คือตัวแปรต้น และตัวแปร Covariate คือ var3, var4, var5
race (white, black, other) มีได้มากกว่า 2 ค่า เป็นตัวแปรชนิด polytomous
ตัวแปร race (white, black, other) ใช้คำสั่ง i.race
(1) Log Likelihood มีค่าน้อยคือ "Prob > chi2" < 0.001
(2) Wald Statistic คือ "P> | Z |" ของตัวแปรต้น ถ้าน้อยกว่า 0.05 เช่น lwt, race, smoke, ht
หมายถึงตัวแปรต้น predict ตัวแปรตามได้ แต่ต้องดูที่ 95%CI ด้วย
(3) 95% CI ของ Odds Ratio ไม่มีค่า 1 รวมอยู่ด้วย "ไม่คร่อม 1"
(4) Pseudo R2 = 0.1416 หมายถึง สมการนี้อธิยายตัวแปรตาม ได้ 14.16 %
Odds Ratio ของตัวแปรต้น age อายุมารดา และตัวแปรตาม low (birthweight < 2500g)
คือ ถ้าตัวแปร ht เปลี่ยนจาก 0 เป็น 1 Odds Ratio = 6.2
ht คือประว้ติการป่วยโรคความดันโลหิตสูงก่อนหรือระหว่างตั้งครรภ์
ไม่ป่วย ht = 0, ป่วย ht = 1
Categorical Variables
Adjusted Odds Ratio | 95% Conf. Interval | ||
|
Lower | Upper | |
white | 1.0 | Ref. | |
black | 3.5 | 1.25 | 9.91 |
other | 2.3 | 1.001 | 5.60 |
STATA เลือก white เป็น ref เพราะกลุ่ม white มีจำนวนมากที่สุด
ถ้าจะไม่ใช้ white เป็น Ref.
generate ตัวแปร race1 และ recode
กำหนดค่า white ให้มี ชื่อหมายเลข มากกว่าตัวแปร black และ other
generate ตัวแปร race1 = race
white = 1, black = 2, other = 3
อาจ recode 1 ให้เป็น 4 ลำดับการเรียงตัวแปร Categories ก็จะเรียงลำดับ ตามที่ต้องการ
STATA จัดให้ race1 white=1 black=2 other=3
recode race1 1=4
black = 2
other = 3
white = 4
ไม่มีความเห็น