Time-weighted averages using trapezoid rule

#1
I am completing my dissertation with kids with type 1 diabetes. I have clinical data available (a blood test) about general diabetes control. Each kid will have different time periods between blood draws as well as different number of total time this is being monitored. I have seen in other research publications that it might be possible to calculate a time-weighted average using the trapezoid rule from all the different data points I have. Do you know if this is possible in SPSS? If not, how would I go about it manually?

Below you can see a sample of the data
1538011232406.png

As you can see, there is significant variability between the number of values each participant has as well as the length of time between each value. I was thinking that I could plot the data and estimate the area under the curve, but unsure how to weight each case for time.

Your help is greatly appreciated!
 

hlsmith

Not a robit
#2
For clarification, you want an overall A1c average not averages for each child, correct? And you want to control for time (time span followed)?

Just curious, A1c's represent an approximate 3 month average of glycated hemoglobin. Are you expecting time trend changes in these patients (worsing, etc.) or did they receive any type of study intervention to influence metrics. Also, do you need to control for age differences between patients? I have seen in some diseases better adherence in younger individuals (under parental control) compared to more autonomous youth not as diligent in medication use?
 
Last edited:
#3
For clarification, you want an overall A1c average not averages for each child, correct? And you want to control for time (time span followed)?

Just curious, A1c's represent an approximate 3 month average of glycated hemoglobin. Are you expecting time trend changes in these patients (worsing, etc.) or did they receive any type of study intervention to influence metrics. Also, do you need to control for age differences between patients? I have seen in some diseases better adherence in younger individuals (under parental control) compared to more autonomous youth not as diligent in medication use?
Thank you for your reply! I am hoping to get time weighted averages for each child to use as a predictor for my outcomes (performance on cognitive assessment). Yes, I am expecting some change over time, and did not provide any intervention. Regarding controlling for age, I am not sure. HbA1c was not correlated with age in my sample, though length of diagnosis was. :)
 

hlsmith

Not a robit
#4
Well telling us this was a potential predictor in a model is important. What is your sample size and do you expect to control for any other variables? Also, how will the dependent variable be format (what scale will it be on)?
 
#5
Yes, you are right. This is my first time posting on forums, so I thank you for your patience. For the time-weighted HbA1c, I don't think I will need to control for anything else. Thank you!
 
#6
My sample size is 36 participants and the dependent scale is scaled scores (norm mean=10), standard score (norm mean=100), or seconds top complete a task.
 

hlsmith

Not a robit
#9
Hmm, I will have to looking into that. Though, I will note it comes down to what your hypothesized relationship is. If you think high A1cs are associated with poor cognition - you are using just an average A1c which may not take into account it being really high for awhile causing I guess some type of acute encephalitis and is that worse than chronic low-level elevated A1cs? I don't know but would assume not. I finding these dynamic questions to be tedious. Also, can you convert it to time with an elevated A1c or percentage of time. Maybe run it a couple of ways - exploratory / hypothesis generating. Or is there a proxy to time-series values such as vascular damage in the eye, which may better define disease sequela?
 
Last edited:
#10
Thank you for your help. I think the % of time with elevated A1c would be useful, and way less difficult. In terms of vascular damage, my study is in children and none of them have these complications yet. I really appreciate your time!