+ Reply to Thread
Results 1 to 5 of 5

Thread: repeated measures - need to confirm sas code

  1. #1
    Points: 4,865, Level: 44
    Level completed: 58%, Points required for next Level: 85

    Location
    IL
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    repeated measures - need to confirm sas code




    i have a data set that includes repeated measurements on 50 subjects. for each subject, i have their gender, type of treatment received, and ecg over a 24-hour interval at baseline (0), day 5 and day 28.
    for day 0 - each subject's ecg was measured at time 0, 1, 2,...,24 hours.
    for day 5 and day 28 - each subject's ecg was measured at time 4, 8, 12, 16, 20, 24

    this trial has a parallel design

    so here's roughly what the data looks like:
    subject trt gender day hour ecg
    1 a f 0 1 398
    1 a f 0 2 345
    .
    .
    1 a f 28 24 412
    .
    .
    50 b m 24 2.0 434

    im trying to study the treatment difference (3 treatments including placebo) and not combine analysis for day 5 and 28.
    ecg is the dependent variable. i'm taking gender, trt, day, hour as independent variables with gender, trt, day as discrete variables and hour as continuous.

    im thinking my sas code to analyze this data should look something like the following:

    proc mixed;
    class sub trt day gender ;
    model ecg=trt trt*day gender hour;
    repeated/type=un/cs/etc subject=sub;
    run;

    does the above code look acceptable? im confused because of the multiple ecg readings in a given day as opposed to a single reading and im not quite sure how to deal with this.

    any input will be appreciated.
    Last edited by uihiba; 04-28-2009 at 08:35 AM.

  2. #2
    Points: 2,368, Level: 29
    Level completed: 46%, Points required for next Level: 82

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Did you find an answer?

    Hi,

    Did you figure out the answer to this? I'm having a similar problem, with repeated measures over both day and year.

    Cheers,
    Jenn

  3. #3
    Points: 4,865, Level: 44
    Level completed: 58%, Points required for next Level: 85

    Location
    IL
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    repeated measures

    I did get help and I 'think' I understand how to tackle this issue now. Can you describe your dataset and tell me what you're trying to do so I don't give you unwanted information?

  4. #4
    Points: 2,368, Level: 29
    Level completed: 46%, Points required for next Level: 82

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Thanks for replying and for being willing to help.

    The dataset I was given consists of counts of birds flying past a radar station, on a given day in a given year. Each station corresponds to a study site. What we’d like to know is whether there are significant year and day effects on the number of birds observed flying past each station. The model would therefore look something like this:

    IBijk = Yeari + Day(Yeari)j + Eijk

    where IBijk = the number of Incoming Birds in year i on day j at site k. As you’ll note, there is no “treatment effect”, as this is simply a time-series analysis.

    The tricky part is that the data are unbalanced: Not all sites were surveyed in all years, with some sites surveyed in more years than others. Likewise, not all sites were surveyed on the same day, with some sites surveyed on more days than others. Therefore, with missing data and unequal time intervals, my only option for analysis is a mixed model (ANOVA and GLM are out). Where I’m stuck is how to specify a day (i.e., Julian date) and year time period in the repeated statement (i.e., the “repeated-effect”). Right now I have:

    PROC mixed DATA = dataset;
    CLASS SiteName Year JulDay;
    MODEL IB= Year JulDay(Year);
    REPEATED <repeated-effect> /subject= SiteName type=un;
    run;

    But I don’t know what to put in the <repeated-effect>.

    Any thoughts would be much appreciated. Please let me know if you need more details.

    Cheers,
    Jenn

  5. #5
    Points: 4,865, Level: 44
    Level completed: 58%, Points required for next Level: 85

    Location
    IL
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hi Jenn,

    I think for your repeated effect you'd put julday as that's where your measurements are repeating.

    For my program, my repeated statement looked like the following:
    repeated hours/type=un sub=patient.

    Let me know if this works. If need be, I'll dig through my class notes to see if I can find some more useful information for you.

+ Reply to Thread

           




Similar Threads

  1. GLM repeated measures?
    By Carolina in forum SPSS
    Replies: 0
    Last Post: 01-20-2011, 06:32 PM
  2. help with SAS code for repeated measures ANOVA
    By yla in forum Psychology Statistics
    Replies: 2
    Last Post: 10-06-2010, 11:23 PM
  3. GLM repeated measures?
    By heather_s in forum Statistics
    Replies: 0
    Last Post: 03-01-2010, 07:06 PM
  4. help please - repeated measures
    By Whizzy in forum Statistics
    Replies: 3
    Last Post: 04-15-2009, 12:01 PM
  5. repeated measures
    By loutoth in forum Statistics
    Replies: 0
    Last Post: 11-29-2007, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats