[R] help with using last observation carried forward analysis for a clinical trial please

maspitze matthewjspitzer at gmail.com
Sun Oct 9 02:43:51 CEST 2011


Hi,
I have a series of id's with multiple visits and questionnaire scores.  This
is a clinical trial that will be analyzed using the last observation carried
forward method.  In other words, in order to comply with intent to treat
analysis when many subjects withdraw, data points for the last visit must be
generated and filled in with the last observation.  The ultimate goal is to
tabulate the difference in qustionnaires between the start of the trial and
the end of trial.  I am lost at about how to do this.  
Each subject had multiple visits, up to 13.  In general, they took a
questionnaire at each visit.  However, if a questionnaire was not completed
or the visit is missing, the data point does not exist.  To explain, I
created a table as analogy.

My goal is to take something that looks like the following:

ID	Visit	score
1	1	10
2	1	12
2	3	15
3	1	1
3	2	6
4	1	16
4	2	1
4	3	7
4	4	17

I think I then need to change to this in order to perfrom locf in zoo:
ID	Visit	score
1	1	10
1	2	na
1	3	na
1	4	na
2	1	12
2	2	na
2	3	15
2	4	na
3	1	1
3	2	6
3	3	na
3	4	na
4	1	16
4	2	1
4	3	7
4	4	17

then change to:
ID	Visit	score
1	1	10
1	2	10
1	3	10
1	4	10
2	1	12
2	2	12
2	3	15
2	4	15
3	1	1
3	2	6
3	3	6
3	4	6
4	1	16
4	2	1
4	3	7
4	4	17

I would then like to take visit 4 and subtract visit 1 to create the
difference in the questionnaire scores during the clinical trial.  I will
then compare this score by t.test between placebo and drug groups.

Would anyone please have some guidance about how to do this in r?  I would
be grateful for assistance.
Regards, Matt  


--
View this message in context: http://r.789695.n4.nabble.com/help-with-using-last-observation-carried-forward-analysis-for-a-clinical-trial-please-tp3886396p3886396.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list