Announcement

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

  • Average Real Variability (ARV) and Variability Independent of Mean Blood Pressure

    Hi everyone,

    I'm Med Student and new using STATA. Currently, For a systolic blood pressure visit to visit (long term) variability analysis study, I have a database with the repeated measurements of blood pressure in a considerably large sample. Each individual has a record of approximately 7 visits that were performed at different times. I am currently at a "bottleneck" due to not being able to calculate Average Real Variability (ARV). The ARV is defined as the average of the absolute differences between all consecutive BP measurements. The ARV formula is as follows:

    where k ranges from 1 to n-1, and n is the number of blood pressure readings.

    I do not know how I could run this formula considering the number of subjects and the number of repeated blood pressure measurements, I would greatly appreciate your help.

  • #2
    To the same sample, I must find the VIM. I first used the regression formula taking SD as the y-axis and mean pressure as the x-axis for all individuals in the cohort. then, ln(SD)= j+p*ln(mean X) was applied, where the parameters "j" (Beta 0) and "p" are estimated from the regression.
    With the estimated parameters, the VIM was then calculated as follows:
    [ATTACH=CONFIG]n1594355[/ATTACH]
    I also used different ways to calculate the VIM, taking into account the following link https://stats.stackexchange.com/ques...f-the-mean-vim, but I am not sure if it is a correct calculation of this index.

    I would like to know if I have done the procedure correctly, thank you very much for your help.

    Comment


    • #3

      . generate ln_sdsbp= ln(sdsbp)
      (3 missing values generated)

      . generate ln_meansbp= ln(meansbp)

      . regress ln_sdsbp ln_meansbp

      Source | SS df MS Number of obs = 129
      > ,484
      -------------+---------------------------------- F(1, 129482) = 265
      > 8.10
      Model | 348.931825 1 348.931825 Prob > F = 0.
      > 0000
      Residual | 16997.2223 129,482 .131270928 R-squared = 0.
      > 0201
      -------------+---------------------------------- Adj R-squared = 0.
      > 0201
      Total | 17346.1541 129,483 .133964722 Root MSE = .3
      > 6231

      --------------------------------------------------------------------------
      > ----
      ln_sdsbp | Coef. Std. Err. t P>|t| [95% Conf. Inter
      > val]
      -------------+------------------------------------------------------------
      > ----
      ln_meansbp | .7015822 .0136079 51.56 0.000 .6749108 .728
      > 2535
      _cons | -1.001897 .0660918 -15.16 0.000 -1.131435 -.872
      > 3578
      --------------------------------------------------------------------------
      > ----

      . generate VIM = 100*ln_sdsbp/(ln_meansbp^ .7015822)
      (3 missing values generated)

      . generate VIM_second = sdsbp/(-1.001897 * meansbp^.7015822)
      (1 missing value generated)

      . generate VIM_third = 100*sdsbp/(meansbp^.7015822)
      (1 missing value generated)

      . generate VIM_fourth = sdsbp/(meansbp^.7015822)
      (1 missing value generated)

      Comment


      • #4
        In response to #1:
        Code:
        //  CREATE A TOY DATA SET TO ILLUSTRATE THE METHOD
        clear*
        set obs 10
        gen pat_id = _n
        
        expand 7
        by pat_id, sort: gen visit_num = _n
        
        isid pat_id visit_num, sort
        
        gen bp = rnormal(120, 10)
        
        //  METHOD
        xtset pat_id visit_num
        gen bp_diff = D1.bp
        by pat_id, sort: egen ARV = mean(bp_diff)
        In the future, it is helpful if you post example data. The code I wrote creates a data set that may or may not be similar to what you have. If it's not, the code will not work without extensive modification, and we will both have wasted our time. So, always, when asking for assistance with code, show example data. And use the -dataex- command to do so. If you are running version 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

        Concerning your requests in #2 and #3, the VIM formula you intended to show did not actually appear in your post. So I think you'll need to try asking that question again. Before posting, click on the Preview button to see how it will appear. If the formula doesn't show up or doesn't look readable, re-edit the post and keep trying until it works. If there is something about the source material you are trying to post that just won't work with the Forum software, then you may have to type the formula in by hand instead.

        Comment

        Working...
        X