I am new to R, and I unfortunately don't have a nice, simple dataset. I am trying to figure out how to set up my data and code so that it will give me a way to run a comparison on the following:
Experiment type factor levels ("Experiment"): Control, Heated Competition type factor levels ("Comp"): Inter, Light, Med, Heavy
My goal is to see if there are interactions between temperature (Experiment type factor) and type of competition (Competition type factor) on rates of parasitism ("ParasRate") and rates of survival ("Survival") of the host.
I have tried following this YouTube tutorial.
I think I set something up wrong, since it is asking for numerical values, which my factors of course are not. So I don't think that tutorial by itself is what I need. I need to be able to edit it so I can run it in a meaningful way to look at these interactions. My hypothesis, briefly stated, is that there will be interactions between heat ("Heated") and inter-specific ("Inter") competition.
My data from Excel loads no problem and looks right, so it is not a data file problem.
#fit model using Competition Type and Experiment Type as X-variables
mod_CompExperiment <- (ParasRate ~ Experiment + Level)
summary(mod_CompExperiment)
mod_CompExperiment <- (ParasRate ~ Experiment + Level)
summary(mod_CompExperiment)
Length Class Mode
3 formula call
summary(mod_CompExperiment)
Length Class Mode
3 formula call
cor(ParasRate, Comp, method="pearson")
Error in cor(ParasRate, Comp, method = "pearson") : 'y' must be numeric