title: I am trying to use various transformations of the response variable and fit corresponding these model, and obtain residual plots for each model
body: <pre><code>library(GLMsData)
  data(fluoro)
  lambda &lt;- seq(-2,2,0.5)
  lm.out &lt;- list()
  for(i in length(lambda)){
    if(i != 0){
      y &lt;- (fluoro$Dose^lambda-1)/lambda
    } else {
      y &lt;- log(fluoro$Dose)
    }
    lm.out[[i]] &lt;- lm(y[i]~Time, data = fluoro, na.exclude = T)
  }
  print(lm.out)
  </code></pre>
  <blockquote>
  <p>Error in model.frame.default(formula = y[i] ~ Time, data = fluoro, drop.unused.levels = TRUE) : variable lengths differ (found for 'Time')</p>
  </blockquote>
  <p>I am trying to use various transformations of the response variable and fit these corresponding models, and obtain residual plots for each model.
  I need a help.  Thanks</p>