title: Tukey HSD for mixed continuous and categorical variables, error: "no factors"
body: <p>I'm trying to run a Tukey test on mortality data, where I want to test whether mortality is influenced by the amount of copper (in an one-way ANOVA) and the combination of copper and temperature (in a two-way ANOVA). These are my formulas: </p>
  
  <pre><code>lm2&lt;-lm(Mortality~Cu) 
  anova(lm2) 
  TukeyHSD(aov(Mortality~Cu)) 
  
  lm2&lt;-lm(Mortality~Cu+Temp+Cu:Temp) 
  anova(lm2) 
  TukeyHSD(aov(Mortality~Cu+Temp+Cu:Temp)) 
  </code></pre>
  
  <p>The ANOVA is no problem, but for both Tukey's, I get the following error message: </p>
  
  <pre><code>    Error in TukeyHSD.aov(aov(Mortality ~ Cu + Temp + Cu:Temp)) : 
        no factors in the fitted model 
      In addition: Warning messages: 
      1: In replications(paste("~", xx), data = mf) : non-factors ignored: Cu 
      2: In replications(paste("~", xx), data = mf) : non-factors ignored: Temp 
      3: In replications(paste("~", xx), data = mf) : 
        non-factors ignored: Cu, Temp 
  </code></pre>
  
  <p>I've read on other posts that there should be a factor somewhere, but all my data are numbers! I'm quite baffled and have no idea what to do next. </p>
  
  <p>Thanks in advance for your help! </p>
  
  <p>Lundill </p>