Hi guys,
I am currently attempting to run some circadian rhythm analysis with the cosinor package in R-studio, and I have hit a roadblock. I have a rather large data set, with columns of "Treatment" (having one of three treatments), "Time" (formatted as HH:MM:SS, ranging from 00:00:00 to 23:59:59), "Bird", "Activity" and "Sex": data format
I am trying to analyze how the cosine function of my "Activity" variable will change over time depending upon the "Treatment" variable by using the cosine.lm function, and I keep getting the same error:
orexin.fit = cosinor.lm(Activity ~ time(Time) + Treatment, data=Orexin.Collapsed, period = 24, na.action = na.omit)
summary(orexin.fit)
Error: Error in indexmat %*% vmat : non-conformable arguments
Additionally, when I try to analyze the data using the cosinor_analyzer tool I get the following error: variable 'Treatment' was fitted with type "character" but type "numeric" was supplied.
I am a beginner, so the solution may be rather simple, but I am blocked trying to figure this out by myself. Is there anybody who can help me?