1 들어가며 — § 10.3 NIMH 와 정반대 사례
§ 10.3 (NIMH 4 범주 ordinal, 10-5) 에서 비례 오즈 가정이 데이터에 적합 (\(\chi^2_6 = 3.71\), not significant) 했다. § 10.4 는 정반대 사례 — 비례 오즈 가정이 강하게 거부되는 데이터.
| 항목 | § 10.3 NIMH | § 10.4 MHRP |
|---|---|---|
| 응답 | 4 범주 (정신과 중증도) | 3 범주 (거주 형태) |
| 처치 | 약물 (placebo vs drug) | Section 8 housing certificate |
| 시점 | week 0, 1, 3, 6 | baseline, 6, 12, 24 months |
| 비례 오즈 검정 | \(\chi^2_6 = 3.71\) (만족) | \(\chi^2_7 = 52.14\) (강하게 거부) |
| 권고 모형 | Standard PO (10-5) | Partial PO (본 sub-post) |
| § 10.2.1 의 응용 | 불필요 | 핵심 |
“§ 10.4 = MHRP 노숙자 데이터에서 section 8 certificate 의 효과 분석. 표 10.6 의 비율 패턴이 두 cumulative logit (non-street vs independent) 에서 매우 다른 패턴 보임 (Figure 10.12-10.13). LR test (\(\chi^2_7 = 52.14\), p<.001) 로 비례 가정 강하게 거부. 핵심 임상 발견: Section 8 효과의 비대칭 — independent housing 진행에서는 매우 큰 효과 (모든 시점에서 유의), community vs street 비교에서는 효과 없음. 단순 proportional odds 만 봤으면 ‘6, 12 개월에 효과 있고 24 개월에 marginally’ 같은 잘못된 결론. Partial PO 모형이 정확한 효과 발견. § 10.2.1 의 partial proportional odds 의 직접 임상 응용.”
2 § 10.4 — McKinney 노숙자 연구 데이터
2.1 임상 배경
문헌: Hough et al. (1997), Hurlburt et al. (1996).
연구 목적: Section 8 housing certificate 가 심각한 정신질환 노숙자에게 independent housing 제공에 효과적인가 를 평가.
Section 8 program:
- 출처: 미국 Department of Housing and Urban Development (HUD).
- 메커니즘: 정부가 housing voucher 제공 → 클라이언트가 income 의 30 % 를 rent 로 지불, 나머지는 정부 보조.
- 목적: 저소득 개인이 community 안에서 independent housing 선택·획득 가능하게.
연구 설계 — Randomized factorial:
- 361 명 클라이언트 (severe and persistent mental illness + homeless or at high risk).
- 2 × 2 factorial 무작위 배정:
- Case management: comprehensive vs traditional.
- Section 8 access: yes vs no.
- 측정 시점: baseline, 6 months, 12 months, 24 months.
본 sub-post 는 Section 8 effect 만 다룸 (case management 효과는 별도 분석). 응답 변수:
- 거주 형태 (housing status), 3 범주:
- Street/shelters (1) — 가장 unstable.
- Community housing (2) — 중간 수준 (group home, supervised housing 등).
- Independent housing (3) — 가장 stable, self-sufficient.
→ Ordinal 응답 (개선 정도). Section 8 이 노숙자를 independent housing 으로 이동시키는 효과 측정.
이 데이터는 사회 정책 평가 (policy evaluation) 의 표준 사례 — RCT + longitudinal + ordinal.
2.2 Table 10.6 — Housing Status 비율의 그룹·시점별 패턴
| 그룹 | 상태 | Baseline | 6 month | 12 month | 24 month |
|---|---|---|---|---|---|
| Control (N=180→145) | Street | .555 | .186 | .089 | .124 |
| Community | .339 | .578 | .582 | .455 | |
| Independent | .106 | .236 | .329 | .421 | |
| Section 8 (N=181→158) | Street | .442 | .093 | .121 | .120 |
| Community | .414 | .280 | .146 | .228 | |
| Independent | .144 | .627 | .732 | .652 |
Control 그룹:
- Street: 0.555 (baseline) → 0.124 (24 month) — 큰 감소.
- Community: 0.339 → 0.455 — 증가 (street 환자가 community 로 이동).
- Independent: 0.106 → 0.421 — 점진적 증가 (느림).
- 패턴: street → community → independent 단계적 진행.
Section 8 그룹:
- Street: 0.442 → 0.120 — 큰 감소 (control 와 비슷).
- Community: 0.414 → 0.228 — 감소 (control 와 반대).
- Independent: 0.144 → 0.732 (12 month peak), 0.652 (24 month) — 매우 빠른 증가.
- 패턴: street → directly to independent (community 우회).
핵심 관찰:
- 두 그룹 모두 street 에서 빠르게 빠져나옴.
- 그러나 진행 경로가 다름:
- Control: 단계적 (street → community → independent).
- Section 8: 직접 (street → independent).
→ 이 비대칭이 비례 오즈 위반 의 시각적 단서. 단순 ordinal 분석에서는 “Section 8 가 호전 빠름” 으로만 보이지만, 사실은 “community 단계를 건너뛰고 independent 로 직접 진행”. 임상적으로 매우 다른 의미.
2.3 Attrition + MAR 가정
24 month 시점의 attrition (탈락):
- Control: \(1 - 145/180 = 19.4 \%\).
- Section 8: \(1 - 158/181 = 12.7 \%\).
처리 방식: Full-likelihood + MAR (Missing At Random, Rubin 1976; Laird 1988).
MAR 의 의미: 결측이 관측된 데이터 (모형의 covariate + 관측된 housing outcome) 에만 의존, 관측되지 않은 housing outcome 에는 의존 안 함.
§ 10.2.4 의 marginal MLE (식 10.18) 가 자동으로 MAR 하에서 valid:
- 적분이 random effects 에 대해 평균화 → 결측 시점이 있는 환자도 관측된 시점만으로 우도 contribution.
- 환자별 응답 패턴이 다른 길이여도 처리 가능.
MNAR (Missing Not At Random) 의 우려:
- 만약 결측이 미관측 outcome 에 의존 (예: street 로 돌아간 환자가 측정 안 됨) → MAR 위반.
- 본 분석은 MAR 가정 하에 진행. MNAR 처리는 § Ch.14 에서.
Section 8 그룹의 attrition 이 더 작은 것 (12.7 % vs 19.4 %) 은 그 자체로 의미 있음 — independent housing 가 follow-up 에 도움 (안정된 거주 → 추적 용이).
본 sub-post 는 MAR 가정으로 진행. MAR 가정의 robustness 는 sensitivity analysis (Ch.14) 에서.
2.4 Figure 10.12-10.13 — 두 Cumulative Logit 시각화
3 범주에서는 2 개 cumulative logit:
- Figure 10.12 (첫 cumulative logit): \(\log[P(Y \geq 2) / P(Y = 1)] = \log[P(\text{non-street}) / P(\text{street})]\).
- Figure 10.13 (둘째 cumulative logit): \(\log[P(Y = 3) / P(Y \leq 2)] = \log[P(\text{independent}) / P(\text{community + street})]\).
각 그룹 (control, section 8) 별 시간 추이.
비례 오즈가 만족되면: 두 그래프의 형태가 거의 같아야 함 (단지 y 축 척도 차이만). 두 그룹 간 차이의 패턴이 두 logit 에서 동일.
Figure 10.12-10.13 의 패턴:
- 첫 cumulative logit (non-street): 두 그룹 모두 빠르게 증가, 그룹 차이 작음.
- 둘째 cumulative logit (independent): 두 그룹 차이가 매우 큼, section 8 가 일관되게 위쪽.
→ 두 logit 의 그룹 차이 패턴이 명백히 다름 — 비례 오즈 위반의 시각적 신호.
저자 본문 인용:
“the section 8 group does better more consistently in terms of the second cumulative logit (i.e., independent versus community and street housing). This suggests that the proportional odds model may not be reasonable for these data.”
→ Section 8 의 효과가 두 cumulative logit 에 비대칭으로 작용. 단순 PO 모형이 이 비대칭을 평균화 — 정보 손실.
임상적 인사이트 (시각적):
- Non-street logit: 두 그룹 모두 잘 함 (그룹 차이 작음). 즉 둘 다 street 에서 빠짐.
- Independent logit: section 8 만 잘 함 (큰 그룹 차이). 즉 section 8 가 independent 까지 가는 데 결정적.
이 단계 specific 효과를 정량화하려면 partial PO 모형 필요.
3 Random Intercept Ordinal Model — 두 모형의 적합
3.1 모형 정의
Proportional Odds (PO) 모형:
\[ \log \left[ \frac{P_{ijc}}{1 - P_{ijc}} \right] = \gamma_c - [\beta_0 + \sum_{k=1}^3 \beta_k t_{ijk} + \beta_4 \text{Section8}_i + \sum_{k=1}^3 \beta_{k+4} \text{Section8}_i \cdot t_{ijk} + \upsilon_{0i}] \]
\(c = 1, 2\) (3 범주 → 2 cumulative logit). 모든 회귀 계수 \(\beta\) 가 두 logit 에 동일.
Nonproportional Odds (NPO) 모형 (식 10.7 의 partial PO 의 모든 covariate 위반 버전):
\[ \log \left[ \frac{P_{ijc}}{1 - P_{ijc}} \right] = \gamma_c - [\beta_{0c} + \sum_k \alpha_{kc} \text{covariate}_{ijk} + \upsilon_{0i}] \quad (c = 1, 2) \]
각 cumulative logit 에 별도 회귀 계수 \(\alpha_{kc}\).
표기:
- \(t_{ij1}, t_{ij2}, t_{ij3}\): 시점 dummy (6 month, 12 month, 24 month vs baseline).
- \(\text{Section8}_i\): 그룹 indicator.
- \(\upsilon_{0i} \sim \mathcal{N}(0, \sigma_v^2)\): random intercept.
- 자유 모수 차이: NPO 모형이 PO 보다 7 개 추가 (3 시점 + 1 group + 3 group × time = 7 covariate 가 두 cumulative logit 에 다름).
시간 효과를 sqrt(time) 같은 함수 형태가 아닌 시점 dummy 로 표현한 이유:
- MHRP 의 시간 추이가 단순 함수 형태로 잘 안 맞음 (Figure 10.12-10.13 의 비선형 패턴).
- 시점 dummy 가 가장 유연 — 각 follow-up 마다 별도 효과 추정.
- 단점: 모수 수 증가 (시점 1 개 → 1 개, 시점 dummy → 3 개).
NIMH (§ 10.3) 에서는 sqrt(week) 변환으로 시간 효과 단순화 가능했지만, MHRP 는 패턴 복잡 + 시점 수 적음 (4 개) → dummy 가 자연.
모수 수 비교:
- PO: 1 절편 + 1 threshold + 3 시점 + 1 group + 3 interaction + 1 σ_v = 10 모수.
- NPO: 2 절편 + 6 시점 + 2 group + 6 interaction + 1 σ_v = 17 모수.
- 차이: 7 (LR test 의 자유도).
3.2 Table 10.7 — 두 모형의 결과
| Term | PO Estimate | PO SE | NPO Non-street | NPO SE | NPO Independent | NPO SE |
|---|---|---|---|---|---|---|
| Intercept | -0.220 | 0.203 | -0.322 | 0.218 | ||
| Threshold (\(\gamma_2\)) | 2.744 | 0.110 | 2.377 | 0.279 | ||
| t1 (6 month) | 1.736 | 0.233 | 2.297 | 0.298 | 1.079 | 0.358 |
| t2 (12 month) | 2.315 | 0.268 | 3.345 | 0.450 | 1.645 | 0.336 |
| t3 (24 month) | 2.499 | 0.247 | 2.821 | 0.369 | 2.145 | 0.339 |
| Section 8 | 0.497 | 0.280 | 0.592 | 0.305 | 0.323 | 0.401 |
| Section 8 × t1 | 1.408 | 0.334 | 0.566 | 0.478 | 2.023 | 0.478 |
| Section 8 × t2 | 1.173 | 0.360 | -0.958 | 0.582 | 2.016 | 0.466 |
| Section 8 × t3 | 0.638 | 0.331 | -0.366 | 0.506 | 1.073 | 0.472 |
| Subject SD | 1.459 | 0.106 | 1.457 | 0.112 | 1.457 | 0.112 |
\(-2 \log L\): PO = 2274.39, NPO = 2222.25.
Bold = \(p < 0.05\), italic = \(0.05 < p < 0.10\).
PO 모형의 효과:
- 모든 시점 효과 유의 (시간이 지나면서 두 그룹 모두 호전).
- Section 8 주효과: marginally (p ≈ 0.075).
- Section 8 × t1, t2: 유의 (6, 12 month 에 효과).
- Section 8 × t3: marginally only (24 month 에서 효과 약해짐).
→ “Section 8 가 6, 12 month 에 호전 빠르고, 24 month 에는 두 그룹 비슷” 결론.
문제: PO 모형이 두 cumulative logit 의 효과를 평균. 만약 한 logit 에서는 큰 효과, 다른 logit 에서는 효과 없음 → 평균이 중간 → 잘못된 결론.
NPO 모형이 이 평균을 벗기고 진짜 효과 패턴 드러냄.
3.3 LR Test — 비례 오즈 가정 강하게 거부
\(H_0\): 모든 \(\alpha_{kc}\) 가 \(c\) 에 무관 (PO 모형).
\[ \chi^2_7 = -2 \log L_{\text{PO}} - (-2 \log L_{\text{NPO}}) = 2274.39 - 2222.25 = 52.14 \]
자유도 7 (= 추가된 covariate 모수 수 = 7), \(p < 0.001\).
비례 오즈 가정 강하게 거부.
\(\chi^2_7 = 52.14\) 는 매우 큰 값 (자유도 7 의 .001 quantile ≈ 24.32). 압도적 거부.
NIMH (§ 10.3) 와의 대비:
- NIMH: \(\chi^2_6 = 3.71\) (df 6 의 .05 quantile = 12.59) → 가정 만족.
- MHRP: \(\chi^2_7 = 52.14\) (df 7 의 .001 quantile = 24.32) → 가정 강하게 거부.
→ 두 데이터가 정반대 결과. 같은 framework, 다른 권고 모형.
검정 자유도가 6 (NIMH) vs 7 (MHRP) 인 이유:
- NIMH: 3 covariate × (3 cumulative logit - 1 baseline) = 6.
- MHRP: 7 covariate × (2 cumulative logit - 1 baseline) = 7. (실제로는 시점 dummy 3 개 + group + group × time 3 개 = 7)
각 covariate 가 추가 cumulative logit 에 별도 계수 가지므로 자유도가 covariate × (C-2) 가 일반.
3.4 핵심 임상 발견 — Section 8 효과의 비대칭
Non-street logit (independent + community vs street):
- Section 8 × t1, t2, t3: 모두 비유의 (0.566, -0.958, -0.366).
- 즉 section 8 가 street 에서 빠지는 데는 추가 효과 없음.
- Control 그룹도 결국 street 에서 빠짐 (시점 dummy 효과 큼).
Independent logit (independent vs community + street):
- Section 8 × t1, t2, t3: 모두 강하게 유의 (2.023, 2.016, 1.073).
- 즉 section 8 가 independent 까지 가는 데 결정적 효과.
- 이 효과가 24 month 에도 지속.
Section 8 의 진짜 가치:
- 노숙자를 단순히 street 에서 빼내는 것 (community 로 이동) 에는 추가 가치 적음.
- 그러나 community 단계를 건너뛰고 independent housing 으로 직접 진행 시킴.
이 발견의 정책적 함의:
- Section 8 의 차별적 효과: 일부 클라이언트군 (community 에 안주할 사람) 에게는 효과 미미, 다른 군 (independent 까지 갈 잠재력 있는 사람) 에게는 매우 효과적.
- 자원 배분: independent 까지 갈 잠재력 있는 클라이언트에게 section 8 우선 배분이 비용 효과적.
- 장기 효과: 24 month 에도 효과 지속 — 단기 개입이 아닌 stable 한 변화.
PO 모형만 봤으면 놓쳤을 정보:
- PO 결과: “section 8 효과 6, 12 month 에 있고 24 month 에 약해짐”.
- NPO 결과: “section 8 효과는 independent housing 진행에만, 그 효과는 모든 시점에서 강함”.
전혀 다른 결론. PO 모형의 평균화가 임상적으로 중요한 비대칭 효과를 가림. § 10.2.1 partial proportional odds 가 정책 의사결정의 정확도에 직접 기여.
3.5 ICC = 0.39 — 두 모형 모두
PO 모형: \(\widehat\rho = \dfrac{1.459^2}{1.459^2 + \pi^2/3} = \dfrac{2.129}{2.129 + 3.290} = 0.39\).
NPO 모형: \(\widehat\rho = \dfrac{1.457^2}{1.457^2 + \pi^2/3} = 0.39\).
→ 두 모형의 ICC 가 거의 같음.
PO → NPO 의 변화 (covariate 효과의 c-가변 허용) 가 random intercept 분산에 거의 영향 없음:
- 두 모형 모두 환자 이질성을 random intercept 로 흡수.
- Covariate 효과의 c-가변 추가가 환자 분산에 영향 안 미침.
- → ICC = 0.39 안정.
ICC = 0.39 의 임상적 의미:
- 거주 형태 잠재 변동의 39 % 가 환자 간 차이로 설명.
- 61 % 는 시점 잔차 변동.
- → 환자 이질성이 NIMH (ICC = 0.53) 보다는 작지만 무시할 수 없는 수준.
거주 형태가 환자 의지·동기에 더 영향받음 (정신과 중증도 보다는 환경·정책 요인이 큼) → 환자 간 차이가 NIMH 보다 작은 것이 임상적으로 합리적.
Subject SD constrained equal across logits: NPO 모형에서 random effect 의 분산은 cumulative logit 별로 다르게 추정 안 함. 식 (10.7) 의 partial PO 의 표준 가정. § 10.2.2 의 scaling term 모형에서는 분산도 그룹별로 다를 수 있지만 본 분석에는 적용 안 함.
4 NIMH vs MHRP — 종합 비교
| 항목 | NIMH (§ 10.3) | MHRP (§ 10.4) |
|---|---|---|
| 데이터 | 정신과 중증도 (4 범주) | 거주 형태 (3 범주) |
| 처치 | 약물 (drug vs placebo) | Section 8 certificate |
| 시간 변환 | sqrt(week) | 시점 dummy |
| Random effects | Intercept + trend | Intercept only |
| ICC | 0.53 | 0.39 |
| 비례 오즈 검정 | \(\chi^2_6 = 3.71\) (만족) | \(\chi^2_7 = 52.14\) (강하게 거부) |
| 권고 모형 | Standard PO | Partial PO |
| 핵심 임상 발견 | 약효의 균등성 (모든 단계) | Section 8 효과의 비대칭 (independent 만) |
- 비례 오즈 가정은 데이터에 따라 다름: 한 데이터 (NIMH) 에서 만족, 다른 데이터 (MHRP) 에서 거부. 항상 검정 필수.
- 시각적 진단의 가치: Figure 10.12-10.13 같은 cumulative logit plot 이 위반의 단서 제공. 검정 결과를 미리 예측 가능.
- Partial PO 의 임상적 가치: 단순 PO 가 가리는 비대칭 효과 드러냄. 정책 결정에 결정적.
- 모형 선택의 계층: standard PO → partial PO → location-scale → 명목 모형. 단순한 것부터 시작, 검정으로 복잡화 정당화.
- 두 사례 모두 mixed-effects 의 가치: 환자 이질성 (ICC > 0.3) 이 무시할 수 없음 → random effects 필수.
§ 10.4 가 Hedeker 책의 illustration 으로 선택된 이유 — 비례 오즈 위반의 강한 사례 + partial PO 모형의 임상적 가치 시연 + 사회 정책 평가 응용.
5 응용 분야
| 분야 | 비례 위반 가능성 | 응답 형태 |
|---|---|---|
| 사회 정책 평가 | 높음 — 정책 효과의 비대칭 흔함 | 거주, 고용, 교육 ordinal outcome |
| 의료 자원 배분 | 중간 — 자원 효과가 단계별 다를 수 있음 | 의료 이용 단계 |
| 교육 중재 | 중간 — 학생 군별 다른 효과 | 학업 등급 |
| 마약·알코올 회복 | 높음 — 회복 단계의 비대칭 효과 | 회복 stage |
| 빈곤 탈출 프로그램 | 높음 — 탈출 단계별 다른 메커니즘 | 빈곤 단계 |
| 만성질환 자가 관리 | 중간 | 자가 관리 단계 |
→ “처치/정책의 효과가 응답 단계별로 비대칭” 인 모든 분야.
6 코드 예시
6.1 Step 1: MHRP-like 데이터 시뮬레이션
import numpy as np
import pandas as pd
def simulate_mhrp_like(seed: int = 2026) -> pd.DataFrame:
"""Table 10.6, 10.7 의 추정값을 사용한 MHRP-like 시뮬레이션."""
rng = np.random.default_rng(seed)
# 그룹별 표본
n_control = 180
n_section8 = 181
n_times = 4 # baseline, 6, 12, 24 months
timepoints = [0, 1, 2, 3] # dummy index
# NPO 모형의 추정값 (Table 10.7 NPO 컬럼)
# First cumulative logit (non-street)
intercept_1 = -0.322
t_eff_1 = [2.297, 3.345, 2.821] # t1, t2, t3
section8_eff_1 = 0.592
section8_t_eff_1 = [0.566, -0.958, -0.366]
# Second cumulative logit (independent)
threshold_2 = 2.377
t_eff_2 = [1.079, 1.645, 2.145]
section8_eff_2 = 0.323
section8_t_eff_2 = [2.023, 2.016, 1.073]
sigma_v = 1.457
rows = []
subject_id = 0
for group, N in [("control", n_control), ("section8", n_section8)]:
section8 = 1 if group == "section8" else 0
for i in range(N):
upsilon = rng.normal(0, sigma_v)
for t_idx in timepoints:
# Cumulative logits — NPO 모형
# First (non-street) — 식 (10.7) 의 분자 절반
if t_idx == 0:
eta_1 = -intercept_1 - section8_eff_1 * section8 - upsilon
else:
eta_1 = -(intercept_1 + t_eff_1[t_idx-1] +
section8_eff_1 * section8 +
section8_t_eff_1[t_idx-1] * section8) - upsilon
# Second (independent)
if t_idx == 0:
eta_2 = threshold_2 - section8_eff_2 * section8 - upsilon
else:
eta_2 = threshold_2 - (t_eff_2[t_idx-1] +
section8_eff_2 * section8 +
section8_t_eff_2[t_idx-1] * section8) - upsilon
# Cumulative probabilities
from scipy.special import expit
P_le1 = expit(eta_1)
P_le2 = expit(eta_2)
# Cell probabilities
P_1 = P_le1
P_2 = P_le2 - P_le1
P_3 = 1 - P_le2
# 음수 보정 (NPO 모형의 한계)
P_1 = max(P_1, 0)
P_2 = max(P_2, 0)
P_3 = max(P_3, 0)
total = P_1 + P_2 + P_3
if total > 0:
P_1 /= total
P_2 /= total
P_3 /= total
y = rng.choice([1, 2, 3], p=[P_1, P_2, P_3])
rows.append({"subject": subject_id, "section8": section8,
"time": t_idx, "y": y})
subject_id += 1
return pd.DataFrame(rows)
df = simulate_mhrp_like()
print(f"전체: {len(df)} 행, {df['subject'].nunique()} 환자")
print(f"\n그룹·시점별 응답 비율:")
print(df.groupby(['section8', 'time', 'y']).size().unstack(fill_value=0))NPO 모형은 회귀선 교차 시 음의 확률 가능 (10-1 의 Figure 10.4 caveat). 위 코드는 음수를 0 으로 보정 + 정규화 → 데이터 생성에는 작동하지만 진짜 모형의 정확한 표현은 아님.
실제 NPO 적합에서는 추정 알고리즘이 모수 공간 제약을 어느 정도 처리하지만, 데이터 생성 시뮬레이션에서는 명시적 보정 필요.
MHRP 데이터의 실제 패턴 재현 검증:
- Section 8 그룹의 6, 12 month 시점에 independent 비율이 약 0.6~0.7 으로 높아야 함 (Table 10.6).
- Control 그룹의 independent 비율은 점진적으로 0.1 → 0.4 정도 증가.
6.2 Step 2: PO 모형 적합 (R)
library(ordinal)
# Random intercept proportional odds
fit_po <- clmm(factor(y, ordered = TRUE) ~ factor(time) + section8
+ section8:factor(time) + (1 | subject),
data = df, link = "logit")
summary(fit_po)
# Table 10.7 PO 컬럼과 비교:
# - Threshold: γ_2 ≈ 2.744
# - factor(time)1: t1 ≈ 1.736
# - factor(time)2: t2 ≈ 2.315
# - factor(time)3: t3 ≈ 2.499
# - section8: ≈ 0.497
# - section8:factor(time)1, 2, 3: ≈ 1.408, 1.173, 0.638
# - Subject SD: ≈ 1.459
# ICC
sigma_v_sq <- VarCorr(fit_po)$subject[1, 1]
icc <- sigma_v_sq / (sigma_v_sq + pi^2 / 3)
cat("\nPO ICC =", round(icc, 3), "(논문: 0.39)\n")clmm 의 PO 적합
clmm 은 기본 proportional odds 모형. factor(time) 로 시점 dummy, section8:factor(time) 로 interaction.
논문 결과와 비교: 시뮬레이션이 정확하면 추정값이 Table 10.7 의 PO 컬럼과 거의 일치 (반올림 + 시뮬레이션 표본 변동 내).
6.3 Step 3: NPO 모형 적합 (R VGAM mixed-effects 우회)
# R 의 frequentist 패키지는 mixed-effects partial PO 직접 지원 약함
# Bayesian 우회 — brms 의 cs() (category-specific)
# 또는 단계별 별도 이항 logit 적합 (mixed-effects 없이)
df_logit1 <- df
df_logit1$y_ge2 <- as.numeric(df_logit1$y >= 2) # non-street
df_logit2 <- df
df_logit2$y_ge3 <- as.numeric(df_logit2$y >= 3) # independent
library(lme4)
# 첫 cumulative logit (non-street)
fit_logit1 <- glmer(y_ge2 ~ factor(time) + section8 + section8:factor(time)
+ (1 | subject),
data = df_logit1, family = binomial)
summary(fit_logit1)
# 둘째 cumulative logit (independent)
fit_logit2 <- glmer(y_ge3 ~ factor(time) + section8 + section8:factor(time)
+ (1 | subject),
data = df_logit2, family = binomial)
summary(fit_logit2)
# Section 8 × time 효과 비교
cat("\n=== 두 cumulative logit 의 Section 8 × time 효과 ===\n")
cat("Non-street logit (논문: section 8 × t1, t2, t3 = 0.566, -0.958, -0.366):\n")
cat(" ", round(fixef(fit_logit1)[grep("section8:factor", names(fixef(fit_logit1)))], 3), "\n")
cat("Independent logit (논문: section 8 × t1, t2, t3 = 2.023, 2.016, 1.073):\n")
cat(" ", round(fixef(fit_logit2)[grep("section8:factor", names(fixef(fit_logit2)))], 3), "\n")각 cumulative logit 에 별도 이항 logit 적합 → NPO 모형의 근사. 한계:
- 두 logit 의 random intercept 가 별도 추정 (논문은 same constraint).
- Joint 우도 아님 → LR 검정 직접 어려움.
진정한 mixed-effects partial PO 적합:
- SAS
PROC NLMIXED: 식 (10.7) 직접 코딩. - R
brms:formula = bf(y ~ factor(time) + cs(section8) + cs(section8):factor(time) + (1 | subject)),family = cumulative("logit"). - Stan 직접 코딩.
본 코드의 단계별 적합은 진단·시각화 용도.
6.4 Step 4: LR 검정 (PO vs NPO)
library(VGAM)
# Single-level 비례 오즈 검정 (mixed-effects 없이, 근사)
df_factor <- df
df_factor$y_factor <- factor(df_factor$y, ordered = TRUE)
fit_po_single <- vglm(y_factor ~ factor(time) + section8 + section8:factor(time),
family = cumulative(parallel = TRUE, link = "logitlink"),
data = df_factor)
fit_npo_single <- vglm(y_factor ~ factor(time) + section8 + section8:factor(time),
family = cumulative(parallel = FALSE, link = "logitlink"),
data = df_factor)
# LR test (자유도 = 추가 covariate 수)
lr_result <- lrtest(fit_po_single, fit_npo_single)
print(lr_result)
# 논문: chi^2_7 = 52.14, p<.001논문 결과와 비교:
- \(\chi^2 \approx 52\) 근처면 비례 오즈 강하게 거부.
- 자유도 7 (시점 dummy 3 + group 1 + interaction 3 = 7 covariate 가 추가 logit 에 별도 효과).
Mixed-effects vs single-level 검정 결과 차이:
- Single-level 은 random effects 무시 → SE 가 부정확하지만 통계량 자체는 비슷.
- 본 검정 결과가 약 50 근처면 시뮬레이션이 논문과 일관.
비례 오즈 가정의 실무 결정 절차:
- 시각적 진단 (Figure 10.12-10.13 같은 cumulative logit plot).
- Brant 검정 (
brant::brant(fit_po)) 또는 LR 검정. - 위반 명백하면 partial PO 모형 적합 → 임상적 해석.
- 단순 PO vs partial PO 의 결론 비교.
- 정책·임상 의사결정에 반영.
7 관련 주제
선행 지식
- Ch.10 Overview — Cumulative ordinal framework
- § 10.2 ~ 10.2.1 — Partial proportional odds 의 모형 정의 (식 10.7)
- § 10.2.4 추정 — Cumulative ordinal MLE
- § 10.3 NIMH — 비례 오즈 가정 만족 사례 (대비)
후속 주제 (Ch.10 sub-posts)
- § 10.5 — Ch.10 Summary
관련 개념
- McKinney Homeless Research Project (MHRP) — Hough et al. (1997), Hurlburt et al. (1996)
- Section 8 housing certificate program (HUD)
- Hedeker & Mermelstein (1998) — Mixed-effects partial proportional odds 의 정립
- Peterson & Harrell (1990) — 비례 오즈 위반의 인지
- Rubin (1976), Laird (1988) — MAR 가정과 mixed-effects 의 missing data 처리
- Ch.14 결측 데이터 — MAR 가정의 robustness 검정
- Ch.11 GLMM 명목 — 모든 covariate 의 범주 가변 효과 (NPO 의 극단)