Regression weighting based on the DOF of speed estimates

45 views
Skip to first unread message

Mark Le Pla

unread,
Apr 11, 2025, 2:18:25 AM4/11/25
to ctmm R user group
Hi everyone, 

I have a bit of a niche question that will hopefully be an easy one to answer. 

I'm estimating daily distances moved, incorporating HMM behaviour segmentation to condition the times at which speed is estimated for each day. This all works well and results in somewhere between 60 and 80 daily distance moved estimates alongside their respective confidence intervals for each individual. 

For each animal, I then conduct a univariate GLS regression (to account for autocorrelation in estimates within the time series) and explore associations between climate and health related covariates. Eventually, I would then like to carry forward these slope estimates from each individuals dataset into a broader meta analysis as the telemetry datasets arise from different regions. 

Within each regression, I would like to account for the variance associated with each day's distance estimate via weighting, similar to that done by Brown et al (2023). However, there is a discrepancy between the weighting formula presented in the paper and that in the code (see attached). Its probably just a typo in the print but regardless, would you be able to provide some clarity on the appropriate formula to use when weighting speed estimates? 

Also, in Brown et al (2023), the numerator for the weighting formula is 1/4 - is this because there were 4 fixes per day (every 6 hours for each giraffe)? Or is this value chosen for some other reason? 

Thanks!

Mark 
image (27).png

Christen Fleming

unread,
May 17, 2025, 11:02:57 PM5/17/25
to ctmm R user group
Hi Mark,

Sorry for the delayed response.

The good news is that there is a function that does this for you now. See help("Log").
The 1/4 there comes from the asymptotics of a 2D chi process, given the 2D chi^2 degrees of freedom. You don't need to worry about the number of fixes per day.

Best,
Chris
Reply all
Reply to author
Forward
0 new messages