Announcement

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

  • Create a continuous variable for blood pressure using two variables

    Dear List,

    I wonder if any of you know how to make a continuous blood pressure variable from two variables? I have continuous variables for systolic and diastolic pressure: systolic_bp and diastolic_bp. These are expressed by the following ratio: systolic over diastolic pressure (for instance 145/83). I want to create a continuous variable, bp, that looks like this (example):
    systolic_bp diastolic_bp bp
    180 95 180/95
    140 90 140/90
    137 75 137/75
    etc...
    Any suggestions?

    Best regards,
    Sigrid

  • #2
    Sigrid:
    if you want to have the -bp- variable in numeric format, this is, I fear, unfeasible, unless you were comfortable with something like:
    Code:
    gen bp_ratio=systolic_bp/diastolic_bp
    I think that the only chance to accomplish what you're after is something along the line of the following toy-example:
    Code:
    . set obs 1
    number of observations (_N) was 0, now 1
    
    . g sbp=120
    
    . g dbp=80
    
    . egen sbp_dbp_ratio=concat( sbp dbp), p(/)
    
    . list
    
         +----------------------+
         | sbp   dbp   sbp_db~o |
         |----------------------|
      1. | 120    80     120/80 |
         +----------------------+
    
    .
    Obviously, the derivated variable does not support any calculation.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your reply, Carlos. That's what I was afraid of, I will have to use the two variables separately then.

      Comment


      • #4
        FWIW, I've been doing epidemiology since 1985, and blood pressure plays a role in a large proportion of the projects I work on. Blood pressure is, in my experience, almost always represented as separate numeric variables for systolic and diastolic. It is never used as a string variable containing a slash character: that's clinical notation that's fast to write by hand. But it's useless for analysis. The only circumstances I can recall where a single numeric variable for blood pressure is used is when they calculate (or approximate) a time weighted average of systolilc and diastolic blood pressure, sometimes called mean blood pressure. I've seen that in a few physiology oriented studies, never in clinically based research.

        Comment


        • #5
          Dear Clyde,
          Thank you for valuable input. I would completely agree with you. I'm doing some cluster analysis where I need two versions of the blood pressure variable, one dichotomous (normal/high) and one continuous. I'm replicating results from another study, and cannot wrap my head around how they've created their variables. I will take your feedback with me when working with the analyses.

          Comment

          Working...
          X