" $% " * +, " --. / ",, 2 ", $, % $ 4 %78 % / "92:8/- 788;<= obese >?5"= "8= < < @ "A57 57 "χ 2 = -value=. 5 OR =, OR = = = + OR B " B Linear ang Logistic Regression: Note.
= + OR 2 women - % β β = + woman = β, % = β + β. C β = β = OR β β = + woman OR β = OR vs % logor ORD? < 2 " % = = =.5 = = 2 logit logit = 7 robability.8..4-5 -4 - - 2 4 5 logit= 8 β β $ logit logit = + woman β β = + woman E = + ex β β woman = + + ex β + β woman 9 / 2,, logit β β char sex[omit] xi: logit obese i.sex = = + woman i.sex _Isex_ naturally coded; _Isex_ omitted Iteration : log lielihood = -795.547 Iteration : log lielihood = -79.7 Logit estimates Number of obs = 49 LR chi2 =.5 Prob > chi2 =. Log lielihood = -79.7 Pseudo R2 = 9 --------+------------------------------------------------------------- _Isex_2 88784.898972.9..8.478 _cons.8.752 9.59. 2485 -.94878 Linear ang Logistic Regression: Note. 2
logit ˆ β = OR β β = = + woman 75= OR --------+------------------------------------------------------------- _Isex_2 88784.898972.9..8.478 _cons.8.752 9.59. 2485 -.94878 88784 OR = ex =. 75= ;.59. OR= OR= " ;ex.8=4.4.975;47. 75= :.8;.425. logit β β = = + woman, xi: logit obese i.sex,or i.sex _Isex_ naturally coded; _Isex_ omitted Iteration : log lielihood = -795.547 Iteration : log lielihood = -79.7 Logit estimates Number of obs = 49 LR chi2 =.5 Prob > chi2 =. Log lielihood = -79.7 Pseudo R2 = 9 obese Odds Ratio Std. Err. z P> z [95% Conf. Interval] --------+-------------------------------------------------------------- _Isex_2 22.977.9..74.58895 % D 2 2 F logit β β = = + age,age β "age;8 age;5 = = β + β age logit 45 5 = = β + β age logit 45 β 5 β % exβ % % % D % @ *,, gene age45=age-45 logit obese age45 = = β + β age logit 45 Iteration : log lielihood = -795.547 Iteration : log lielihood = -772.89 Logit estimates Number of obs = 49 LR chi2 = 4 Prob > chi2 =. Log lielihood = -772.89 Pseudo R2 = 9 ------+---------------------------------------------------------------- age45.482.529.78. 47484.4485 _cons -.985922.4594-42.84..7785 -.89559 = = β + β age logit 45 β.985 2.77;.895 +,.7 5;.5 +, 7.4;.7 age? < Linear ang Logistic Regression: Note.
logit = = β + β age 45 β.48 47;.449.54 5;.459 % 2 +",.54 4.5 5 4.5 ;.459 4.5 =.7 ;2 2,, logit obese age45,or @. obese Odds Ratio Std. Err. z P> z [95% Conf. Interval] ------+---------------------------------------------------------------- age45.545.5.78. 557.45877 7 log - -.5.5 =.98 + 48 age. 45 5 4 45 5 55 5 7 8 ex 45 revalence = + ex + 45 revalence 5.5..98 +.48 age.98.48 age - = β + β age 45, 4 / egen agegr7=cutage, at,5,4,45,5,55,,2 label 8.5 5 4 45 5 55 5 7 table agegr7,cmin age max age count obese sum obeserow ---------------------------------------------------------- agegr7 minage maxage Nobese sumobese ----------+----------------------------------------------- - 4 52 2 5-5 9 97 5 4-4 44 885 9 45-45 49 799 95 5-5 54 7 5 55-55 59 95-5 75 Total 4,9 ----------------------------------------------------------, ds α od = + α agei i= agei i i - = α + αi agei i= α ; α i % i ; char agegr7[omit] xi: logit obese i.agegr7 -- -------------+----------------------------------------------------------- _Iagegr7_.548 95 29 2.79.7 _Iagegr7_2.58 49 2.4.44455.992787 _Iagegr7_.57 479 2.72.7.8757.57 _Iagegr7_4.979 89 4...5742.4425 _Iagegr7_5.944 4284.97..488494.444 _Iagegr7_.477 528 5..92278.922 _cons.5 57.4. -.8288 789 -- Linear ang Logistic Regression: Note. 4
- = α + β agei 5 i= xi: logit obese i.agegr7,or -- obese Odds Ratio Std. Err. z P> z [95% Conf. Interval] ------------+------------------------------------------------------------ _Iagegr7_.75.482 29 2.82857 2.7557 _Iagegr7_2.7977.474 2.4.4547 2.98747 _Iagegr7_.9274.47295 2.72.7 72.522 _Iagegr7_4 2.82.45592 4...822 44759 _Iagegr7_5 284.78.97. 98 42258 _Iagegr7_ 4254.497 5. 2.595.7825 -- i @ 2.;42 9 22, D - ds α od = + α agei * /H " testarm _Iagegr*. / _Iagegr7_ = 2 _Iagegr7_2 = _Iagegr7_ = 4 _Iagegr7_4 = 5 _Iagegr7_5 = _Iagegr7_ = chi2 = 55 Prob > chi2 =. I i= i char agegr7[omit] J 57 xi: logit obese i.agegr7,or -- obese Odds Ratio Std. Err. z P> z [95% Conf. Interval] ------------+----------------------------------------------------------- _Iagegr7_.58 524.72.7 2524.8247 _Iagegr7_.8944.482 -.7.47.759 778 _Iagegr7_2.8775.475 -.9.9.4245.78 _Iagegr7_4.7898 574 2.5. 94.84785 _Iagegr7_5.597 297.9.5 5.845927 _Iagegr7_ 2.752.482 4.45..52995 2.988 -- @ +, $+..;.85 9 85 ", D? ˆ α - -.5 + ˆ α4.5 αˆ - 5 4 45 5 55 5 7 log - 5.5..5 5 4 45 5 55 5 7 < revalence log - - model model2 -.5.5-5 4 45 5 55 5 7 revalence 5 model model2.5..5 5 4 45 5 55 5 7 7 * / / = β + β woman + β age 45 2 8 Linear ang Logistic Regression: Note. 5
* = β + β woman + β age 45 2 β 5 β % β 2 % % β 2 K age % % age * 45 = β + β woman + β age 2,, xi:logit obese i.sex age45 i.sex _Isex_ naturally coded; _Isex_ omitted Iteration : log lielihood = -795.547 Iteration : log lielihood = -77.79 Logit estimates Number of obs = 49 LR chi22 = 55.8 Prob > chi2 =. Log lielihood = -77.79 Pseudo R2 =.55 ---------------------------------------------------------------------- --------+-------------------------------------------------------------- _Isex_2 74977.985.4.9775.45458 age45.4472.554.7. 4472.44574 _cons.475.7298 9.74. 885.555 sex age $58= 5 * 45 = β + β woman + β age 2 xi:logit obese i.sex age45, or obese Odds Ratio Std. Err. z P> z [95% Conf. Interval] --------+-------------------------------------------------------------- _Isex_2.578.888.4 22.57 age45.57.555.7. 477.45544 @ % L.;.57 2. ;.59. @ L.4 ;.5 2.4.;.5 D log - -.5.5 * = β + β woman + β age 45 - men women 2 5 4 45 5 55 5 7 revalence 5.5..5 men women 5 4 45 5 55 5 7 * -, = α + α age = γ + γ age 45 45 2 L " = β + β woman + β age + β woman age 45 45 2 α = β α = β 2 γ = β + β γ = β + β 2 β = γ α β = γ α 5 * = β + β woman + β2 age 45 + β woman age 45 xi: logit obese i.sex*age45 -- -------------+----------------------------------------------------------- _Isex_2.797.954 9 -.947. age45 -.5849.872 -.8.497 95.725 _IsexXage4~2.58.74...44747.88588 _cons.84.74 9.49. 249 -.94458 > obese Odds Ratio Std. Err z P> z [95% Conf. Interval] -------------+----------------------------------------------------------- _Isex_2 89.8 9.92898.5997 age45.994.82 -.8.497.97847.78 _IsexXage4~2.8.47...457.974 -- Linear ang Logistic Regression: Note.
* = β + β woman + β age 45 + β woman age 45 log -.5 - -.5.5-2.4 men men women 5 4 45 5 55 5 7? revalence.. women 5 4 45 5 55 5 7 * tab cancer age - age cases controls [95% Conf. Interval] ------+------------------------------------------------------------- 25-4 2.724.42.97 5-44 9 9.477 427.9244 45-54 4 7 7545.9875.875 55-4 7.4578.4899. 5-74 55.5887.74.784 >=75.495 944.88 ---------------------------------------------------------------------- ; + tab cancer age, or - age Odds Ratio chi2 P>chi2 [95% Conf. Interval] ------+------------------------------------------------------------- 25-4..... 5-44 2.7478.7.84.579474 5 45-54 5.9748 24.8..5889 742 55-4 2.55427 4.4. 5.8478 2.85 5-74.944 4.99. 78745 44482 >=75 24258 29.4. 4.4242 4.827 - < * tab cancer age - age cases controls [95% Conf. Interval] ------+------------------------------------------------------------- 25-4 2.724.42.97 5-44 9 9.477 427.9244 45-54 4 7 7545.9875.875 55-4 7.4578.4899. 5-74 55.5887.74.784 >=75.495 944.88 ---------------------------------------------------------------------- * +; + tab cancer age, or base -- age Odds Ratio chi2 P>chi2 [95% Conf. Interval] ------+--------------------------------------------------------------- 25-4 594 24.8..4 78 5-44.798 25.8..79.725 45-54..... 55-4 27 5.54.8.8844 2.548952 5-74.887 7.8.889 89 >=75.52244. 54.74799.545 -- 7 * char age [omit] xi:logit cancer i.smoer i.age,or i.smoer _Ismoer_- naturally coded; _Ismoer_ omitted i.age _Iage_- naturally coded; _Iage_ omitted Iteration : log lielihood = -49.5582 Iteration : log lielihood = -47.55 Iteration 2: log lielihood = -429.87 Iteration : log lielihood = -428.998 Iteration 4: log lielihood = -428.9447 Iteration 5: log lielihood = -428.9442 Iteration : log lielihood = -428.9442 Logit estimates Number of obs = 977 LR chi2 = 5 Prob > chi2 =. Log lielihood = -428.9442 Pseudo R2 = -- cancer Odds Ratio Std. Err. z P> z [95% Conf. Interval] -----------+------------------------------------------------------------ _Ismoer_ 2.5.458 4.45..42.424472 _Iage_2 2.82 248..89.5995.798 _Iage_.58 2.778.82..9228 9.9422 _Iage_4 27.89 274 4.57..95 5 _Iage_5 4.79 25.5929 4.8. 85 47.74 _Iage_ 27.7 2.8927 4. 5.89878.59 -- 8 * char age [omit] xi:logit cancer i.smoer i.age,or i.smoer _Ismoer_- naturally coded; _Ismoer_ omitted i.age _Iage_- naturally coded; _Iage_ omitted Iteration : log lielihood = -49.5582 Iteration : log lielihood = -47.55 Iteration 2: log lielihood = -429.87 Iteration : log lielihood = -428.998 Iteration 4: log lielihood = -428.9447 Iteration 5: log lielihood = -428.9442 Logit estimates Number of obs = 977 LR chi2 = 5 Prob > chi2 =. Log lielihood = -428.9442 Pseudo R2 = -- cancer Odds Ratio Std. Err. z P> z [95% Conf. Interval] -----------+------------------------------------------------------------- _Ismoer_ 2.54.45 4.45..4.42449 _Iage_..44277 -.8..45 54278 _Iage_2.78.5297-4...87999.977 _Iage_4.82.788 2.7.8.927 2.5895 _Iage_5 2.984.54282.8 5.98 _Iage_.7 7774.7.7.854.48999 -- 2 4 % D Linear ang Logistic Regression: Note. 7
% 4, 2,, / LR chi2 = 5 Prob > chi2 =. / % %/ % / B B % 4 2,, xi:logit cancer i.smoer i.age estimates store model xi:logit cancer i.smoer estimates store model2 lrtest model model2 lielihood-ratio test LR chi25 = 2.82 Assumtion: model2 nested in model Prob > chi2 =. /D = + β x = β " $ " " β " " x x2 x = OR OR OR 2 5 β 2 x x % x 2 x 2 M x x = β x, % " = + β x = = + β x = β 2 x x % x 2 x 2 M x x x x2 OR = OR OR OR 2? x exβ + β x = = Pr[ Y = ] = + exβ + β x = Y =/ x %x 2 Mx - / N + %% / / $ 5. %" = + β x = β < Linear ang Logistic Regression: Note. 8
% % * % % * H 7 Linear ang Logistic Regression: Note. 9