turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- PROC GENMOD setup data

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-18-2010 02:12 PM

I'm not sure how I should set up my data for this problem which involves a longitudinal dataset with up to 20 measurements per subject.

The outcome variable is the difference between “variable Y” at time 20 and “variable Y” at time 1. My exposure of interest does not vary with time (i.e.: sex), but some of the covariates to be included in the model do change over time (i.e.: stress and time).

I have used a dataset with multiple lines per subject (one line per measurement period). In this dataset, I have created an outcome variable (change_in_Y) that represents the difference between “variable Y” at time 20 and “variable Y” at time 1. Therefore, for a given subject, the value of this variable does not change from one line to another.

This doesn’t seem right to me. How should I rearrange my dataset or outcome variable?

Here is an example of the syntax I am using:

PROC GENMOD data=A;

CLASS id ;

MODEL change_in_Y = gender stress time /dist=normal;

REPEATED sub=id/type=CS corrw;

RUN;

QUIT;

Thanks in advance

The outcome variable is the difference between “variable Y” at time 20 and “variable Y” at time 1. My exposure of interest does not vary with time (i.e.: sex), but some of the covariates to be included in the model do change over time (i.e.: stress and time).

I have used a dataset with multiple lines per subject (one line per measurement period). In this dataset, I have created an outcome variable (change_in_Y) that represents the difference between “variable Y” at time 20 and “variable Y” at time 1. Therefore, for a given subject, the value of this variable does not change from one line to another.

This doesn’t seem right to me. How should I rearrange my dataset or outcome variable?

Here is an example of the syntax I am using:

PROC GENMOD data=A;

CLASS id ;

MODEL change_in_Y = gender stress time /dist=normal;

REPEATED sub=id/type=CS corrw;

RUN;

QUIT;

Thanks in advance