Baseline Observation Carry Forward (BOCF)
Page 1 of 1
Baseline Observation Carry Forward (BOCF)
In simple term, Baseline value is a value that you compare with the result.
For example,
Patient with high blood pressure goes to doctor. First thing that doctor will do is measure his blood pressure and record it in patients file (e.g BP =150).
Next step: Doctor will prescribe a medication to Patient and ask him to visit again after one week.
After one week of Medication, patient visits the doctor and doctor again checks his Blood Pressure (e.g 125).
Next: doctor will compare this result (after one week of medication) with the result taken before medication was given (i.e. 150) and will come to the conclusion that “after one week of treatment there is a reduction in the Blood Pressure”.
So, what he did: compare the result with the baseline value and find out the change from baseline
Baseline Value: Last observation taken before giving the medication.
Now, what is BOCF ?
Now, consider this scenario: We have result of one subject. Where visit 2 is baseline value and you need to see the change from baseline after visit 9. How will you do it?
ID Visit Value
101 1 150
101 2 145
101 3 145
101 4 140
101 5 135
101 6 135
101 7 133
101 8 125
101 9 125
So, here you carried forward baseline value (BOCF) till visit 9, and you can measure the change from baseline by subtraction. (Change = value – BOCF)
ID Visit Value BOCF Change
101 1 150 150 0
101 2 145 145 0
101 3 145 145 0
101 4 140 145 5
101 5 135 145 10
101 6 135 145 10
101 7 133 145 12
101 8 125 145 20
101 9 125 145 20
This might give you a better idea
data test;
input ID Visit bp ;
/*here data contains records for two subjects*/
/*kept few missing values so that you can get better idea*/
datalines;
101 1 150
101 2 .
101 3 145
101 4 140
101 5 135
101 6 135
101 7 133
101 8 125
101 9 125
102 1 .
102 2 170
102 3 .
102 4 165
102 5 155
102 6 145
102 7 140
102 8 135
102 9 135
;
Run;
proc print;
Run;
proc sort data = test;
by id;
Run;
/*Performing LOCF*/
data locf;
set test;
/*Need to create new variable for locf*/
retain new_bp;
by id;
if first.id then new_bp = bp;
/*as visit 2 is baseline value*/
if visit < 3 and bp ne . then new_bp = bp;
else if visit >=3 then new_bp = bp;
drop bp;
Run;
proc print;
Run;
data bocf;
set locf;
retain bocf;
by id;
if first.id then bocf=new_bp;
if visit <3 and new_bp ne . then bocf=new_bp;
change = bocf - new_bp;
/*if visit = 9;*/
Run;
proc print;
Run;
For example,
Patient with high blood pressure goes to doctor. First thing that doctor will do is measure his blood pressure and record it in patients file (e.g BP =150).
Next step: Doctor will prescribe a medication to Patient and ask him to visit again after one week.
After one week of Medication, patient visits the doctor and doctor again checks his Blood Pressure (e.g 125).
Next: doctor will compare this result (after one week of medication) with the result taken before medication was given (i.e. 150) and will come to the conclusion that “after one week of treatment there is a reduction in the Blood Pressure”.
So, what he did: compare the result with the baseline value and find out the change from baseline
Baseline Value: Last observation taken before giving the medication.
Now, what is BOCF ?
Now, consider this scenario: We have result of one subject. Where visit 2 is baseline value and you need to see the change from baseline after visit 9. How will you do it?
ID Visit Value
101 1 150
101 2 145
101 3 145
101 4 140
101 5 135
101 6 135
101 7 133
101 8 125
101 9 125
So, here you carried forward baseline value (BOCF) till visit 9, and you can measure the change from baseline by subtraction. (Change = value – BOCF)
ID Visit Value BOCF Change
101 1 150 150 0
101 2 145 145 0
101 3 145 145 0
101 4 140 145 5
101 5 135 145 10
101 6 135 145 10
101 7 133 145 12
101 8 125 145 20
101 9 125 145 20
This might give you a better idea
data test;
input ID Visit bp ;
/*here data contains records for two subjects*/
/*kept few missing values so that you can get better idea*/
datalines;
101 1 150
101 2 .
101 3 145
101 4 140
101 5 135
101 6 135
101 7 133
101 8 125
101 9 125
102 1 .
102 2 170
102 3 .
102 4 165
102 5 155
102 6 145
102 7 140
102 8 135
102 9 135
;
Run;
proc print;
Run;
proc sort data = test;
by id;
Run;
/*Performing LOCF*/
data locf;
set test;
/*Need to create new variable for locf*/
retain new_bp;
by id;
if first.id then new_bp = bp;
/*as visit 2 is baseline value*/
if visit < 3 and bp ne . then new_bp = bp;
else if visit >=3 then new_bp = bp;
drop bp;
Run;
proc print;
Run;
data bocf;
set locf;
retain bocf;
by id;
if first.id then bocf=new_bp;
if visit <3 and new_bp ne . then bocf=new_bp;
change = bocf - new_bp;
/*if visit = 9;*/
Run;
proc print;
Run;
pallav- Posts : 98
Join date : 2012-03-14
Location : Ahmedabad
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon Jun 10, 2013 2:57 pm by Admin
» SAS Enterprise Guide: Explore Data before you start Analysing
Mon Jun 10, 2013 2:53 pm by Admin
» Predictive Analytics
Fri May 31, 2013 3:30 pm by Admin
» Creating Frequency Report and Creating User Defined styles in SAS Add-In for Microsoft Office
Tue Oct 23, 2012 2:11 pm by pallav
» Prompted Reports in BI Dashboard
Thu Oct 11, 2012 4:54 pm by kushal
» Free SAS Webinar : Getting Started with SAS Hash Object
Wed Oct 10, 2012 6:08 pm by pallav
» Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?
Tue Oct 02, 2012 12:47 am by rajin_kumar@yahoo.com
» What is written to SAS Log?
Tue Oct 02, 2012 12:39 am by rajin_kumar@yahoo.com
» SAS Portal and BI Dashboard: Customizing the Tabs
Tue Oct 02, 2012 12:33 am by kushal