Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • point estimators and confidence intervals

    Hi,

    I have a data set that looks at the effect of different treatments separately for heart rate and systolic blood pressure.

    These are the problems I am trying to solve:
    1. Provide separate point-estimates and 95% confidence intervals for the changes in heart rate and blood pressure for the subjects randomized to nifedipine and propranolol, respectively (1 point).

    2. Provide separate point-estimates and 95% confidence intervals for the variance of changes in heart rate and blood pressure for the subjects randomized to nifedipine and propranolol, respectively.

    Thanks for your help!

    CODE:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte id str1 trtgrp int(bashrtrt lv1hrtrt lv2hrtrt lv3hrtrt bassys lv1sys lv2sys lv3sys)
    1 "P" 60 70 64 999 128 110 120 999
    2 "N" 52 64 98 999 180 156 160 140
    3 "P" 100 94 999 999 190 140 999 999
    4 "N" 84 88 96 112 136 126 122 110
    5 "P" 56 70 61 64 230 150 130 150
    6 "P" 105 120 999 999 142 150 999 999
    7 "N" 116 116 999 999 210 230 999 999
    8 "N" 68 68 72 84 170 150 150 156
    9 "P" 85 88 90 92 150 134 140 154
    10 "N" 64 60 999 999 140 120 999 999
    11 "N" 76 90 999 999 160 164 999 999
    12 "N" 88 125 140 999 150 140 140 999
    13 "P" 88 78 80 72 130 120 108 118
    14 "P" 96 114 999 88 152 144 999 158
    15 "P" 54 60 52 58 100 100 92 110
    16 "P" 60 62 68 60 170 180 206 188
    17 "N" 56 58 56 60 110 112 102 110
    18 "N" 56 60 999 999 120 120 999 999
    89 "N" 54 60 78 76 125 120 118 118
    20 "N" 60 60 999 999 230 170 999 999
    21 "P" 60 54 60 64 100 120 130 116
    22 "N" 92 100 100 100 124 134 146 180
    23 "P" 72 84 84 999 168 178 140 999
    24 "N" 100 96 999 999 110 116 999 999
    25 "P" 100 90 113 999 150 130 128 999
    26 "N" 52 74 88 66 164 144 128 140
    27 "N" 76 76 999 999 170 170 999 999
    28 "P" 75 75 75 88 152 152 150 150
    29 "P" 58 58 58 58 999 999 999 999
    30 "N" 56 54 999 59 106 124 999 120
    31 "P" 70 60 999 999 160 180 999 999
    32 "N" 51 66 999 999 150 136 999 999
    33 "P" 90 98 999 999 180 180 999 999
    34 "N" 90 86 999 999 160 140 999 999
    end

  • #2
    You might end up using mixed on the change scores.

    ÿversionÿ15.1

    .ÿ
    .ÿclearÿ*

    .ÿ
    .ÿquietlyÿinputÿbyteÿidÿstr1ÿtrtgrpÿint(bashrtrtÿlv1hrtrtÿlv2hrtrtÿlv3hrtrtÿbassysÿlv1sysÿlv2sysÿlv3sys)

    .ÿ
    .ÿ*
    .ÿ*ÿBeginÿhere
    .ÿ*
    .ÿquietlyÿtabulateÿtrtgrp,ÿgenerate(trt)

    .ÿ
    .ÿgenerateÿintÿdeltaÿ=ÿlv1hrtrtÿ-ÿbashrtrt

    .ÿ
    .ÿmixedÿdeltaÿibn.trt2,ÿnoconstantÿ||ÿ,ÿnolrtestÿresiduals(independent,ÿby(trt2))ÿnolog

    Mixed-effectsÿMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿ34
    Groupÿvariable:ÿ_allÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿÿÿ1

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿ34
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿ34.0
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿ34

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(2)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ7.83
    Logÿlikelihoodÿ=ÿ-125.76877ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0199

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿdeltaÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿtrt2ÿ|
    ÿÿÿÿÿÿÿÿÿÿ0ÿÿ|ÿÿÿ6.111111ÿÿÿ2.443041ÿÿÿÿÿ2.50ÿÿÿ0.012ÿÿÿÿÿ1.322839ÿÿÿÿ10.89938
    ÿÿÿÿÿÿÿÿÿÿ1ÿÿ|ÿÿÿÿÿÿ2.875ÿÿÿ2.289369ÿÿÿÿÿ1.26ÿÿÿ0.209ÿÿÿÿ-1.612081ÿÿÿÿ7.362081
    ------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -----------------------------+------------------------------------------------
    _all:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(empty)ÿ|
    -----------------------------+------------------------------------------------
    Residual:ÿIndependent,ÿÿÿÿÿÿÿ|
    ÿÿÿÿbyÿtrt2ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ0:ÿvar(e)ÿ|ÿÿÿ107.4321ÿÿÿ35.81071ÿÿÿÿÿÿÿ55.8985ÿÿÿÿ206.4752
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ1:ÿvar(e)ÿ|ÿÿÿ83.85938ÿÿÿ29.64877ÿÿÿÿÿÿ41.93788ÿÿÿÿÿ167.686
    ------------------------------------------------------------------------------

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .


    But with 999 beats per minute and 999 mm Hg, I sure hope the U.S. FDA doesn't approve those drugs!

    Comment


    • #3

      But with 999 beats per minute and 999 mm Hg, I sure hope the U.S. FDA doesn't approve those drugs!
      I'm willing to bet that the "999"s are all missing values, which should have been coded as such before analysis.
      Code:
      mvdecode _all, mv(999)
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        Originally posted by Steve Samuels View Post
        I'm willing to bet that the "999"s are all missing values
        Aw shucks, and here I was, gettin' all excited and everythin'.

        Comment

        Working...
        X