pine trees comas and migraines asymptotic and other
play

Pine Trees, Comas and Migraines: Asymptotic and other functions of - PowerPoint PPT Presentation

Pine Trees, Comas and Migraines: Asymptotic and other functions of time Non-linear Longitudinal Models with SAS PROC NLMIXED Georges Monette York University georges@yorku.ca www.math.yorku.ca/~georges Summer Programme in Data Analysis June


  1. �� ������������������������ � � ������ ����� � �� ��������������� � � � � � � � � �� �

  2. �� ������������������������ � � ������ ����� � �� � � � � � � � � �� �

  3. �� ������������������������ � � ������ ����� � �� � � � � � � � � �� �

  4. �� ������������������������ � � ������ ����� � �� � � �� � � � � � � �� �

  5. �� ������������������������ � � ������ ����� � �� � � �� � � � � � � �� �

  6. �� ������������������������ � � ������ ����� � �� � � �� � � � � � � �� �

  7. �� ������������������������ � � ������ ����� � �� � �������� × ���� � �� � � � � � � �� �

  8. �� ������������������������ � � ������ ����� � �� � �������� × ���� ������ � �� � � � � � � �� �

  9. �� ������������������������ � � ������ ����� � �� � �������� × ���� ������ ������������������������������������ � �� � � � � � � �� �

  10. �� ������������������������ � � ������ ����� � �� � �������� × ���� ������ ������������������������������������ � �� � � � � � � �� �

  11. �� ������������������������ � � ������ ������ ����� � �� � �������� × ���� ������ ������������������������������������ � �� � � � � � � �� �

  12. �� ������������������������ � � ������ �������������� × � ��� ������ ����� � �� �� � �������� × ���� ������ ������������������������������������ � �� � � � � � � �� �

  13. �� β � ������������������������ � β �� �� β � � � α � � β � ��� β � � α � ������ ������������������������������������ � �� � � � � � � �� �

  14. �� ������������� ���� �����������

  15. �� β � � β �� �� β � � � α � � β � � � � � � � � � �� �

  16. �� β � � β �� �� β � � � α � � � β � �� � � � � � � � �� �

  17. �� β � � β �� �� β � � � α � � � β � �� � � � � � � � �� �

  18. �� β � � β �� �� β � � � α � � � β � �� � � � � � � � �� �

  19. �� β � � β �� �� β � � � α � � � β � �� � ������ α � � � � � � �� �

  20. �� β � � β �� �� β � � � α � � = β �� �� β � � �� × ������� η � β � �� � ������ α = η ������������������ � � � � � � �� �

  21. �� ������� � ���������� ������ ����� ������

  22. �� ��� ��� �� �� �� �� � � �� �� �� ����

  23. �� � � � � � � � � ���� � �� � � � � � � � ����������� � �� � � � �

  24. PROC NLMIXED DATA = IQ; * PARMS Statement: names and initial values of basic parameters; PARMS b0 = 100 b1 = - 15 a = .1 Ls = 100 ; /* for log variance of IQ */ * Programming statements; EV = b0 + b1 * exp(-a * time); s2 = exp(Ls); /* ensures variance is positive */ * MODEL Statement (within-subject random model); MODEL IQ ~ normal(EV, s2); * RANDOM Statement: (between-subject random model); * NONE YET; run ;

  25. �� ��� ��� �� �� �� �� � � �� �� �� ����

  26. �� ��� ��� Formula: IQ ~ b0 + b1 * exp( - a * time) �� �� Value Std. Error t value b0 101.190000 2.98566 33.89190 b1 -14.225100 2.15232 -6.60922 �� a 0.244462 0.12388 1.97337 �� � � �� �� �� ����

  27. �� �������� �� �� ���� ����

  28. �� ����� ��� ����� �� ��� ��� �� ���� ��� ���� ���� �� ��� ������ �� �� � ��� ��� ��� ��� ��� ��� � �� ��� ��� ��� ��� ��� ��� ��� ��� ������������������������ ������������������������ ������ ��� ��� ��� ����� ��� ��� ��� ��� ���� ���� ���� ���� ��� �� �� ���� �� �� �� � ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ������������������������ ������������������������ ������������������������

  29. �� ��� ��� ��� �� �� � ���� ���� ���� ���� ����� ����� ������

  30. �� ��� ��� ��� �� �� � ���� ���� ���� ���� ����� ����� ������

  31. �� ������� �� ���� ����� ������

  32. �� ��� ��� ��� �� �� � ��� ��� ��� ��� ���� ������

  33. �� ��� ��� ��� �� �� � ��� ��� ��� ��� ���� ������

  34. �� ��� ��� ��� �� �� � ��� ��� ��� ��� ���� ������

  35. �� ��� ��� ��� �� �� � ��� ��� ��� ��� ���� ������

  36. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } DAYSPC it hrt it

  37. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it Parameters Predictors and carriers Unobserved Random variables ∼ 2 (0, ) u N g i ε σ ∼ 2 (0, ) N i t

  38. for th Subject PIQ i on th Occasion t = β + β + PIQ DC OMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it

  39. Asymptotic recovery level for i th Subject = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it

  40. Asymptotic recovery level for population given DCOMA = 0 = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it

  41. Asymptotic recovery level for population given value of DCOMA = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it

  42. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it Initial relative deficit

  43. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it Half recovery time

  44. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it Between subject ‘true’ variance ∼ 2 (0, g ) u N i Within-subject variance ε σ ∼ 2 (0 , ) N i t

  45. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it ∼ 2 (0, ) 2 u N g g i Test-retest reliability = + σ 2 ε σ 2 ∼ 2 (0, ) g N i t

  46. = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it = ∼ 2 2 (0, ) exp( ) 2 u N g g L g g i Test-retest reliability = + σ 2 ε σ σ = 2 ∼ 2 2 (0, ) exp( ) g N L s it

  47. Recap = β + β + PIQ DCOMA u 0 it sd i i + β × β + ε 1 exp{ln(1/ 2) / } D AYSPC it h r t it = ∼ 2 2 2 (0, ) exp( ) u N g g L g g i Test-retest reliability = σ 2 + ε σ σ = 2 ∼ 2 2 g (0, ) exp( ) N L s it Basic parameters Computed parameters Predictors and carriers Unobserved random variables Things we’d like to estimate

  48. Using PROC NLMIXED PROC NLMIXED DATA = IQ QMAX = 300 corr ecorr ecov eder; * PARMS Statement: names and initial values of basic parameters; PARMS b0 = 100 bsd = -2.5 b1 = - 18 bhrt = 100 Lg = 2 Ls = 1; * Programming statements: Define all computed variables and parameters; EV = b0 + bsd*SQRTDCOMA + u + b1 * exp(-0.6931 * DAYSPC / bhrt); g2 = exp(Lg); s2 = exp(Ls); * MODEL Statement: Level 1 Distribution of response conditional on random effects; MODEL PIQ ~ normal(EV, s2);

  49. * RANDOM Statement: Randomness at Level 2; RANDOM u ~ normal(0, g2) SUBJECT = ID; * ESTIMATE Statements: Uses Delta method to estimate functions of parameters; ESTIMATE 'IQ at SQRTDCOMA=20 DAYSPC = 365' b0 + bsd * sqrt(20) + b1 * exp(-0.6931 * 365/bh); ESTIMATE 'Between Sub SD' sqrt(g2); ESTIMATE 'Within Sub SD' sqrt(s2); ESTIMATE 'Total SD' sqrt( g2 + s2 ); ESTIMATE 'Reliability' g2/( g2 + s2 ); * PREDICT Statements: generate BLUPs; PREDICT EV OUT=OUTDS; run;

  50. PROC NLMIXED OUTPUT The N The NLMIXED Procedure MIXED Procedure Specifications Specifications Data Set Data Set WORK.IQ WORK.IQ Dependent Variable Dependent Variable PIQ PIQ Distribution for De Distribution for Dependent Variable pendent Variable Normal Normal Random Effects Random Effects u u Distribution for Random Distribution for Random Effects Effects Normal Normal Subject Variable Subject Variable ID ID Optimization Techniqu Optimization Technique e Dual Dual Quasi-Newton Quasi-Newton Integration Method Integration Method Adaptive Gaussian Adaptive Gaussian Quadrature Quadrature

  51. Dimensions Dimensions Obse Observations Used rvations Used 331 331 Obse Observations Not Used rvations Not Used 0 0 Tota Total Ob l Observat servations ions 331 331 Subjec Subjects ts 200 200 Max Max Ob Obs s Per Su Per Subject bject 5 5 Parame Paramete ters rs 7 7 Quad Quadra ratu ture Poi re Points ts 1 1 Parameters Parameters b0 b0 bsd bsd b1 b1 bhrt bhrt Lg Lg Ls Ls bh bh NegLogLike NegLogLike 100 -2 100 -2.5 .5 -18 -18 100 100 2 2 1 1 1 3980.10189 1 3980.10189

  52. It Iteration History eration History Iter Calls Iter Calls NegLog NegLogLi Like Diff ke Diff MaxGrad MaxGrad Slope Slope 1 2 1 2 1573.2904 2406.811 1573.2904 2406.811 264.0361 264.0361 -50897.3 -50897.3 2 4 2 4 13 1316.837 16.83773 25 73 256.4527 6.4527 57.36039 57.36039 -157.085 -157.085 3 6 3 6 1294.2055 22.63224 1294.2055 22.63224 3.743795 3.743795 -23.4729 -23.4729 4 4 8 8 12 1293.89347 93.89347 0. 0.312031 312031 2.446502 2.446502 -0.21904 -0.21904 5 10 5 10 1 1293.65 93.6521 0. 1 0.241366 241366 0.94097 -0.14775 0.94097 -0.14775 6 12 6 12 1293.6239 0.028198 1293.6239 0.028198 0.711704 0.711704 -0.02241 -0.02241 7 13 7 13 1293.58195 0.041954 1293.58195 0.041954 0.859061 -0.01146 0.859061 -0.01146 8 15 8 15 1293.2629 0.319051 1293.2629 0.319051 2.305337 2.305337 -0.06682 -0.06682 9 17 9 17 12 1293.040 93.04005 0. 05 0.222842 222842 0.156794 0.156794 -0.2422 -0.2422 10 10 19 12 19 1293.039 93.03937 0.000 37 0.000684 0.16487 684 0.164873 -0.00071 3 -0.00071 11 22 11 22 12 1292.969 92.96984 0. 84 0.069533 069533 0.996174 0.996174 -0.0007 -0.0007 12 12 24 24 12 1292.951 92.95152 0. 52 0.0183 018315 15 0.056738 0.056738 -0.02862 -0.02862 13 13 26 26 12 1292.951 92.95148 0. 48 0.0000 000047 47 0.043026 0.043026 -0.00007 -0.00007 14 14 30 30 1 1292.93 92.9368 0. 8 0.0146 014676 76 1.084556 1.084556 -0.00003 -0.00003 15 33 15 33 12 1292.528 92.52879 0. 79 0.408005 408005 0.199777 0.199777 -0.0283 -0.0283 16 35 16 35 12 1292.521 92.52165 0 65 0.00714 00714 0.090852 0.090852 -0.0112 -0.0112 17 17 37 37 12 1292.521 92.52132 0. 32 0.0003 000332 32 0.005506 0.005506 -0.00069 -0.00069 18 18 39 39 12 1292.521 92.52132 1. 32 1.671E 671E-6 0.00039 -6 0.000394 -3.45E-6 4 -3.45E-6 NOTE: GC NOTE: GCON ONV V conv convergence criterio ergence criterion satisfied. n satisfied.

  53. Fit Statistics Fit Statistics -2 -2 Log Li Log Like keliho lihood od 2585.0 2585.0 AIC (s AIC (sma maller i ller is better better) ) 2599.0 2599.0 AICC ( AICC (smaller is bette ller is better) ) 2599.4 2599.4 BIC (s BIC (sma maller i ller is better better) ) 2622.1 2622.1 Para Parameter Es meter Estimates timates Standard Standard Parameter Estima Parameter Estimate Error D te Error DF t Value Pr > |t| t Value Pr > |t| Alpha Lower Alpha Lower Upper Gradient Upper Gradient b0 b0 100.77 100.77 1.9841 1.9841 199 199 50.79 <.0001 50.79 <.0001 0.05 0.05 96.858 96.8584 4 104.68 -0.00002 104.68 -0.00002 bsd - bsd -1.9208 1.9208 0.4147 0.4147 199 -4.6 199 -4.63 <.0001 0.05 3 <.0001 0.05 -2.7386 -1.1 -2.7386 -1.1030 030 -0.00008 -0.00008 b1 - b1 -19.6329 19.6329 1.8 1.8593 93 19 199 -1 9 -10.56 0.56 <.0001 0.05 <.0001 0.05 -23. -23.2994 -15.9 2994 -15.9663 -0.0 663 -0.00001 0001 bhrt bhrt 122.60 122.60 2 26.6 .6733 19 733 199 4. 9 4.60 <.0001 60 <.0001 0.05 70.0006 0.05 70.0006 175.20 -1.37E-6 175.20 -1.37E-6 Lg Lg 5.1436 5.1436 0.1 0.1242 19 42 199 9 41.40 <.0001 41.40 <.0001 0.05 4.898 0.05 4.8986 5.3886 0.000394 5.3886 0.000394 Ls Ls 3.8322 3.8322 0.1 0.1261 19 61 199 9 30.39 <.0001 30.39 <.0001 0.05 3.5835 0.05 3.5835 4.0809 0.000307 4.0809 0.000307

  54. Additional Estimates Additional Estimates Standa Standard rd Label Label Es Estimate timate Err Error DF r DF t Value Pr > t Value Pr > |t |t| | Alpha Alpha Lower Lower IQ at SQRTDCOMA IQ at SQRTDCOMA=20 DAYSPC = 365 =20 DAYSPC = 365 92.180 92.1809 1.6019 199 9 1.6019 199 57.54 <.0001 57.54 <.0001 0.05 89.0220 0.05 89.0220 Between Sub SD Between Sub SD 13.0891 0.8131 19 13.0891 0.8131 199 16.10 <.0001 9 16.10 <.0001 0.05 11.4858 0.05 11.4858 Within Sub SD Within Sub SD 6.7945 6.7945 0.42 0.4284 84 199 15.86 199 15.86 <.0001 0. <.0001 0.05 5.9496 05 5.9496 Total SD Total SD 14.7475 14.7475 0.7033 0.7033 199 199 20.97 <.00 20.97 <.0001 0.05 13.3607 01 0.05 13.3607 Reliability Reliability 0.7877 0.7877 0.03281 0.03281 199 24.01 <.0001 199 24.01 <.0001 0.05 0.05 0.72 0.7230 30 Additional Estimates Additional Estimates Label Label Upper Upper IQ at SQRTDCOMA=20 DA IQ at SQRTDCOMA=20 DAYSPC = 365 YSPC = 365 95.3399 95.3399 Betwee Between Su n Sub S b SD D 14.6925 14.6925 Within Within Su Sub SD b SD 7.6393 7.6393 Total SD Total SD 16.1344 16.1344 Reliab Reliability ility 0.8524 0.8524

Recommend


More recommend