DATA Step, Macro, Functions and more

matched data analysis

Accepted Solution Solved
Reply
Contributor
Posts: 61
Accepted Solution

matched data analysis

Hi,

I have a matched data set (shown below). I want to carry out the following analysis:

1. Descriptive table

2. conditional logistic regression unadjusted (outcome is fev)

3. conditional logistic regression adjusted (outcome is fev) 

4. conditional logistic regression with interaction terms (opwo*race) (outcome is fev). Please guide me.

Thanks

 

GroupTypeControl Ididageeduraceparitywthtopwofev
1Case.532910905.211
1Control17032910905.210
1Control299351010905.200
2Case.12351212110501
2Control143351211110500
2Control2101331112110500
3Case.222514301105.401
3Control11252513301105.400
3Control2512812301105.400
4Case.2927122195511
4Control1322912221256.210
4Control231271021955.500
5Case.40281032130611
5Control158281032130600
5Control293271132130610

Accepted Solutions
Solution
‎05-13-2016 09:27 AM
Super User
Posts: 10,020

Re: matched data analysis

You can find some examples relate to conditional logistic in documentation.

Something like :

 

Example 72.11: Conditional Logistic Regression for Matched Pairs Data

 

 



data have;
infile cards expandtabs truncover;
input  Group	Type $	ControlId	id	age	edu	race	parity	wt	ht	opwo	fev;
cards;
1	Case	.	5	32	9	1	0	90	5.2 1 1
1	Control	1	70	32	9	1	0	90	5.2 1 0
1	Control	2	99	35	10	1	0	90	5.2 0 0
2	Case	.	12	35	12	1	2	110	5   0 1
2	Control	1	43	35	12	1	1	110	5   0 0
2	Control	2	101	33	11	1	2	110	5   0 0
3	Case	.	22	25	14	3	0	110	5.4 0 1
3	Control	1	125	25	13	3	0	110	5.4 0 0
3	Control	2	51	28	12	3	0	110	5.4 0 0
4	Case	.	29	27	12	2	1	95	5   1 1
4	Control	1	32	29	12	2	2	125	6.2 1 0
4	Control	2	31	27	10	2	1	95	5.5 0 0
5	Case	.	40	28	10	3	2	130	6  1 1
5	Control	1	58	28	10	3	2	130	6  0 0
5	Control	2	93	27	11	3	2	130	6  1 0
;
run;
proc logistic data=have ;
strata group;
model fev(event='1')= age edu race parity;
run;

View solution in original post


All Replies
Super User
Posts: 11,343

Re: matched data analysis

What should the descriptive "table" contain? Counts, percents, Means, standard deviations, max, min or other statistics of single variables? Combinations of variables? within groups? Correlations?

 

Contributor
Posts: 61

Re: matched data analysis

Thanks; I want to have counts with percents and mean with standard deviations and range.

Super User
Posts: 10,020

Re: matched data analysis

Can you explain 

 

2. conditional logistic regression unadjusted (outcome is fev)

3. conditional logistic regression adjusted (outcome is fev)  

 

What is unadjusted and adusted ?

Did you check the example in documentation ,there are many examples about conditional logistic regression.

 

What is your STRATA(conditional) variable ? GROUP ?

About interaction terms  opwo*race , Couldn't you write as

 

model ....=....  opwo*race ;

strata group;

 

or check EFFECT statement.

 

Contributor
Posts: 61

Re: matched data analysis

Sure.

Unadjusted means univatiate analysis (one variable assessed for the outcome, here fev)

Adjusted means multipvariate, when more than one independent variables are added to the model simultaneously where these variables adjust the effect/association of each other on the response variable.

 

My matching variables are: age, edu, race and parity. I think, not sure, these can be taken as 'strata'.

 

Thanks

Solution
‎05-13-2016 09:27 AM
Super User
Posts: 10,020

Re: matched data analysis

You can find some examples relate to conditional logistic in documentation.

Something like :

 

Example 72.11: Conditional Logistic Regression for Matched Pairs Data

 

 



data have;
infile cards expandtabs truncover;
input  Group	Type $	ControlId	id	age	edu	race	parity	wt	ht	opwo	fev;
cards;
1	Case	.	5	32	9	1	0	90	5.2 1 1
1	Control	1	70	32	9	1	0	90	5.2 1 0
1	Control	2	99	35	10	1	0	90	5.2 0 0
2	Case	.	12	35	12	1	2	110	5   0 1
2	Control	1	43	35	12	1	1	110	5   0 0
2	Control	2	101	33	11	1	2	110	5   0 0
3	Case	.	22	25	14	3	0	110	5.4 0 1
3	Control	1	125	25	13	3	0	110	5.4 0 0
3	Control	2	51	28	12	3	0	110	5.4 0 0
4	Case	.	29	27	12	2	1	95	5   1 1
4	Control	1	32	29	12	2	2	125	6.2 1 0
4	Control	2	31	27	10	2	1	95	5.5 0 0
5	Case	.	40	28	10	3	2	130	6  1 1
5	Control	1	58	28	10	3	2	130	6  0 0
5	Control	2	93	27	11	3	2	130	6  1 0
;
run;
proc logistic data=have ;
strata group;
model fev(event='1')= age edu race parity;
run;
Contributor
Posts: 61

Re: matched data analysis

Thanks, it did work; will explore further. However, I can't take age edu race and parity in the model as they are matching variable and their effect has already been fixed.

Contributor
Posts: 61

Re: matched data analysis

Hi Ksharp,

What code should I use for count (with percents) for parity, race, opwo and for mean (with std deviation) for wt ht acros fev (1 and 0)?

Thanks. 

Super User
Posts: 10,020

Re: matched data analysis

Sorry. I don't know what you are talking about. Maybe you should start a new session to discuss this .
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 341 views
  • 1 like
  • 3 in conversation