Dear Forum
I am having problems choosing the right method for calculating the AUC for my repetitive blood samples in two intervention groups and afterwards testing the difference between the two interventions.
I have a dataset with 160 records.
These patients have undergone intervention A or B.
I have blood sample Results from "admission to hospital", "from reaching their target intervention in the ward", after 6, 12, 18, 24, 30, 36, 42, 48, 72 and 96 hours after "reaching their target intervention in the ward" (of cause a few of the samples are accidentally missing). The blood samples have been drawn up to +/- 2 hours from protocolled time.
I have my SampleTime as double but I have also calculated timestamps with reference to "reaching their target intervention in the ward" which of cause results in some negative time values.
I have tried the PK functions (pkexamine and pksumm) but keep on getting errors like:
-time variables takes on repeated values
-.....fit() is greater than the number of obs. with __000002==6 & __000001
insufficient observations
and I have tried:
integ Result(interventionA) time
integ Result(interventionB) time
twoway (line Result(interventionA) time)(line Result(interventionB) time)(bar ub(interventionA) lb(interventionA) time, black)(bar ub(interventionB) lb(interventionB) time, black), ///
title("xxxx")
This solution gives me a negative AUC in interventionA (as I am using the calculated timestamp as explained in the top)
and I have tried:
sort record_id time
generate area=(Result+Result[_n+1])*(tid1[_n+1]-tid1)/2 if record_id==record_id[_n+1]
collapse (sum) area = area (first) intervention=intervention, by(record_id)
ttest area, by (intervention)
The two last ones run fine but I am in doubt if either of these are the right method???
Could someone help me step by step.
In advance thx a lot.
BR
Anders
I am having problems choosing the right method for calculating the AUC for my repetitive blood samples in two intervention groups and afterwards testing the difference between the two interventions.
I have a dataset with 160 records.
These patients have undergone intervention A or B.
I have blood sample Results from "admission to hospital", "from reaching their target intervention in the ward", after 6, 12, 18, 24, 30, 36, 42, 48, 72 and 96 hours after "reaching their target intervention in the ward" (of cause a few of the samples are accidentally missing). The blood samples have been drawn up to +/- 2 hours from protocolled time.
I have my SampleTime as double but I have also calculated timestamps with reference to "reaching their target intervention in the ward" which of cause results in some negative time values.
I have tried the PK functions (pkexamine and pksumm) but keep on getting errors like:
-time variables takes on repeated values
-.....fit() is greater than the number of obs. with __000002==6 & __000001
insufficient observations
and I have tried:
integ Result(interventionA) time
integ Result(interventionB) time
twoway (line Result(interventionA) time)(line Result(interventionB) time)(bar ub(interventionA) lb(interventionA) time, black)(bar ub(interventionB) lb(interventionB) time, black), ///
title("xxxx")
This solution gives me a negative AUC in interventionA (as I am using the calculated timestamp as explained in the top)
and I have tried:
sort record_id time
generate area=(Result+Result[_n+1])*(tid1[_n+1]-tid1)/2 if record_id==record_id[_n+1]
collapse (sum) area = area (first) intervention=intervention, by(record_id)
ttest area, by (intervention)
The two last ones run fine but I am in doubt if either of these are the right method???
Could someone help me step by step.
In advance thx a lot.
BR
Anders
Comment