My question relates to my previous question about GAMMs (if some of the same people should read this).
I am working in R with the package mgcv and the function gam.
My data:
A lot of bacterial samples (isolates) taken over time from different patients. For each sample/isolate I have some continuous, binomial, factorial data describing different traits of the isolates.
I have tried:
Initially I was only interested in the correlation with time and had a continuous trait as the predictor and time as explanatory with patient as a random smooth with time.
My question is:
For now I want to input this information into a single GAMM for each of the traits to see correlations with time AND all the other traits (I am inputting patients as random smooth together with time).
Do I need to treat my data as time series data or can I simply input time as an explanatory variable together with everything else?
Before I began doubting my method I used the following code:
(trait1 to trait4 are continuous and trait5 and trait 6 are binary -I have more variables than this)
gammTrait1