cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
PepperStar
Level I

How do I calculate change from baseline based on multiple measurements from a single subject?

I have data collected at baseline (t = 0) and after various different treatments for a number of subjects. What is the best way to calculate a change from baseline without copying and pasting baseline data for each participant? As an example, I have data for different participants with different treatments that are collected daily. I'm struggling to figure out how to automatically return the baseline column data (shown in blue font) below so that I can calculate a change from the baseline. Any ideas on how to do this? 

 

SubjectTreatmentDayEndpoint measurementEndpoint Baseline (mean) Endpoint change from baseline

M1

Baseline15354-1
M1Baseline255541
M1Tx13705416
M1Tx14725418
M1Tx253254-22
M1Tx263554-19

M2

Baseline15052.5-2.5

M2

Baseline25552.52.5

M2

Tx1310052.547.5

M2

Tx149052.537.5
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I calculate change from baseline based on multiple measurements from a single subject?

The formula for the Endpoint Baseline (mean) column is:

Col Mean( If( :Treatment == "Baseline", :Endpoint measurement, . ), :Subject )

The formula for the Endpoint change from baseline is

:Endpoint measurement - :"Endpoint Baseline (mean)"n

txnelson_0-1661128386913.png

 

Jim

View solution in original post

2 REPLIES 2
Craige_Hales
Super User

Re: How do I calculate change from baseline based on multiple measurements from a single subject?

Your question got stuck in the spam filter, not sure why.

Craige
txnelson
Super User

Re: How do I calculate change from baseline based on multiple measurements from a single subject?

The formula for the Endpoint Baseline (mean) column is:

Col Mean( If( :Treatment == "Baseline", :Endpoint measurement, . ), :Subject )

The formula for the Endpoint change from baseline is

:Endpoint measurement - :"Endpoint Baseline (mean)"n

txnelson_0-1661128386913.png

 

Jim