+ Reply to Thread
Results 1 to 4 of 4

Thread: SAS GLIMMIX subject specific estimates

  1. #1
    Points: 14, Level: 1
    Level completed: 27%, Points required for next Level: 36

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    SAS GLIMMIX subject specific estimates




    I am trying to analyze a dataset where each subject has 12 repeated measures (quarterly, over 3 years). I want to extract subject specific estimates of the time slope to evaluate if the subjects are changing significantly over time.

    The code I currently have consistently suggests that each subject is demonstrating a highly significant increase over time. This seems unlikely but I'm not sure how to adjust my syntax to run a more accurate model. Does anyone know how/why this model would find the slope coefficient for time significant for ALL subjects?

    A quick description of the study: We are creating a trending report which should flag procedure codes (subjects) that are showing a significant increase in the number of times it was billed over the time period being analyzed (3 years, by quarter). The outcome variable is being treated as a count (bounded at 0 but not necessarily whole numbers).


    %macro Zeroes(numzeroes);

    %local i;
    %do i = 1 %to %eval(&numzeroes-1);
    0
    %end;
    1;
    %mend;



    %macro EstimateStatement(numsubjects=);

    %local i;


    proc glimmix data=procdata;
    class subject;
    model billing_count=period_count / dist=NB link=log
    solution ddfm=betwithin;
    random intercept period_count / sub=subject type=AR(1);
    random _residual_;

    %do i = 1 %to &numsubjects;

    estimate "Slope for Code &i" period_count 1 | period_count 1 / subject %Zeroes(&i);

    %end;

    ods output estimates=sscoeff;
    run;
    %mend;

    %EstimateStatement(numsubjects=&num_codes)




    Any help on making this model more accurate and efficient would be greatly appreciated!



    Thanks!
    Last edited by aisley; 07-08-2015 at 10:12 AM.

  2. #2
    Omega Contributor
    Points: 38,410, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,003
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: SAS GLIMMIX subject specific estimates

    I probably wont be much help, but if period_count is significant and its test statistic value is positive - isn't that evidence of a positive trend? Because you could rename the variable time and it would mean the same thing, correct.


    Have you plotted the subjects as well, count value at each time point. Not sure how many subjects you have, but many times you can also see the positive trend with these plots.
    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    aisley (07-08-2015)

  4. #3
    Points: 14, Level: 1
    Level completed: 27%, Points required for next Level: 36

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: SAS GLIMMIX subject specific estimates

    It is evidence of a positive trend but I think it is unlikely that ALL of my subjects demonstrate a significant increase over time.

    I have a very large number of subjects so evaluating the slope individually isn't very feasible.

    I've modified my original post to make my question clearer. Thanks for your feedback!

  5. #4
    Omega Contributor
    Points: 38,410, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,003
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: SAS GLIMMIX subject specific estimates


    Hmm, I haven't work much with longitudinal data nor longitudinal data via glimmix.


    How do you define "demonstrating a highly significant increase over time"? Would a slope not equal to zero with a positive test statistic work? If so, I wonder if you can add an estimate or contrast statement to your code comparing a subject to a null value?
    Stop cowardice, ban guns!

+ Reply to Thread

           




Tags for this Thread

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