Hi everyone,
I am working on R to run cosinor analysis using the GLMM package. So far, the package has been extremely helpful for me to understand cosinor analysis. However, I am stuck on the Autoplot function to create a time-response plot. I have been running a mixed model analysis using SBP (systolic blood pressure) as my outcome variable and Dipping Status as my group. The time has been converted to Relative Clock Time based on the core body temperature minimum.
The following is the code I used to run the model:
multimod <- cglmm(
SBP ~ 0 + Dipping.Status + amp_acro(time_col = Relative.Clock.Time, n_components = 2, period = c(24, 12), group = c("Dipping.Status", "Dipping.Status")) + (1 | ID),
na.action = na.omit,
data = merged_scnbp,
family = gaussian()
)
summary(multimod)
autoplot(multimod, x_str = "Dipping.Status", superimpose.data = TRUE, xlims = c(0,24))
When I run the autoplot function, I see the following error: Error in seq.default(xlims[1], xlims[2], length.out = pred.length.out) : 'length.out' must be a non-negative number
Please help me.