BookmarkSubscribeRSS Feed
katemcguckin
Fluorite | Level 6


* katemcguckin40@gmail.com;

Hi. I have 60 patients with varying number of patient visits for treatment.
The variable definitions are listed below.
This is a repeated measures study in which there are 1666 observations among the 60 patients.


I also printed out just the first 6 patient data to keep it short.
My name is Kate. I am new to longitudinal analyses.

I hope someone can help me.


* variables:
id = subject id
dob=date of birth
q_visitdate = visit date for therapy
visits = visit number
diff_bg= difference between pre and post-treatment blood sugar
q_pre_gluc = sugar level before treatment
q_post_gluc = sugar level after treatment
q_oxytime = time they spent in the treatment
q_oxyconcent = oxygen concentration for each treatment
visits= visit number


What do I need to calculate?
1. Using the structure I have, I want to just get the mean of each person (id's)
(1) diff_bg (difference between pre- and post-treatment dugar levels) ,
(2) pre-gluc (pretreatment sugar level)
(3) post_gluc (post-treatment sugar level,
(4) q_oxytime

So if I went through 20 treatments, I want the mean of those 4 variables in (1). I tried the lag
function,and it did not work.

  1. Using the structure I have (see attachment), I want to calculate the number of months or days between treatments
    (It's not set up in the datalines to follow Cody's book)
  2. To describe the change in sugar level differences, would I need to use the moving average of each person for analyses?
    Or what would I use?

 

The attachment did not go through (don't know why) but I copied several IDs with their values.

 

I apologize for the variables not being in straight columns. 

 

What kind of attachments am I allowed? I tried .doc  .lst 

 

Kate 🙂

 

2 REPLIES 2

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 591 views
  • 0 likes
  • 2 in conversation