Announcement

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

  • repeated time values within the same panel of repeted measures

    Hallo

    have multiple observations of Systolic Blood Pressure and Diastolic Blood Pressure for the same ID and the same monthly lag time since the enrollment (lag==0).

    Example data:

    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double(SBP_V DBP_V) float(Date_V VISIT enrolled_new) long ID float(Date_enrollment lag)
    170 80 21780 0 0 1 21780 0
    120 80 22910 0 0 2 22910 0
    130 80 23098 0 0 3 23098 0
    120 70 23245 1 0 3 23098 4
    175 95 23161 0 0 4 23161 0
    170 95 23209 1 0 4 23161 1
    140 85 23245 2 0 4 23161 2
    140 80 23274 3 0 4 23161 3
    150 90 22342 0 0 5 22342 0
    135 80 23121 0 0 6 23121 0
    end
    format %tdDD/NN/CCYY Date_V
    label values ID ID_encoded
    label def ID_encoded 1 "AdeMdof1943Kip", modify
    label def ID_encoded 2 "AdeMgof1961Kip", modify
    label def ID_encoded 3 "AgnValf1975Kip", modify
    label def ID_encoded 4 "AjeMarf1966Mwa", modify
    label def ID_encoded 5 "AleMtem1976Mga", modify
    label def ID_encoded 6 "AnaMdef1954Isi", modify
    ------------------ copy up to and including the previous line ------------------

    In order to evaluate the change in SBP measurement over subsequent time lags I would choose do xtset and anlalyzing the data this way:

    . xtset ID

    . xi: xtreg SBP_V i.lag
    . xi: xtreg DBP_V i.lag

    I kindly ask if it is appropriate to omit "lag" in the xtset command in this case.

    Mario Saugo


  • #2
    Mario:
    if you omit the time variable in -xtset-, the time-series operator will not work.
    In addition, the -xi:- prefix is redundant with the -fvvarlist- notation.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Originally posted by Mario Saugo View Post
      I kindly ask if it is appropriate to omit "lag" in the xtset command in this case.
      It wouldn't do anything in that case even if you could include it.

      Including a time variable in xtset is useful only if you're going to be using time series operators (lags, leads etc.) or xtreg , pa corr() with a working correlation structure that requires it. The default options for xtreg as you're using it are for the random-effects estimator, which makes no use of the time variable in xtset, and so you might as well omit it from xtset's specification.

      Why are you using the xi: prefix?

      Comment


      • #4
        Dr. Lazzari and Dr. Coveney thanks for your correction. You are right, the xi: prefix is redundant here

        Comment


        • #5
          Mario:
          Carlo is enough. Thanks.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X