[R] anova problem:

Jean Meloche
Fri, 26 Mar 1999 00:19:01 -0000

Hi! I'm running an anova on a lm and I get the message
Error: invalid dimnames given for data frame

Any idea where it comes from?

Many thanks.

Here is the fit and the attempted anova:

> fit

Call:
lm(formula = as.formula(paste(chemical, "a~", cmd, sep =
"")),     singular.ok = TRUE)

Coefficients:
    (Intercept)             Odom         Displace           Weight
     -1.440e+00        2.936e-02        9.276e-01       -2.619e+00
           HC1b             HC2b             CO1b              CO2
      8.974e-01       -1.223e-01       -3.695e-01        2.484e-01
           NOX2           R00001           R00010           R00011
      2.738e-01       -1.498e+00        3.087e-01        3.494e-01
         R00100           R00101           R00110           R00111
     -3.313e+00       -1.041e+00       -2.549e+00       -2.250e+00
         R01000           R01001           R01010           R01011
     -5.381e-01        6.665e+00        5.712e+00        6.441e-01
         R01100           R01101           R01110           R01111
      6.844e-01        4.629e+00       -1.252e+01       -1.915e+00
         R10000           R10001           R10010           R10011
     -9.747e-01        2.326e+00        1.219e+00        3.635e-01
         R10100           R10101           R10110           R10111
      4.551e+01       -7.819e+00        3.359e+00        2.202e+00
         R11000           R11001           R11010           R11011
     -1.436e+00        3.334e-01        2.037e-02        4.746e-01
         R11100           R11101           R11110           R11111
      1.590e+00       -1.842e+00       -9.772e-01       -1.061e+00
  Odom.Displace      Odom.Weight        Odom.HC1b        Odom.HC2b
     -5.542e-03        4.548e-02       -4.472e-03        1.181e-02
      Odom.CO1b         Odom.CO2        Odom.NOX2      Odom.R00001
     -3.934e-05       -4.574e-03       -7.116e-03       -1.900e-02
    Odom.R00010      Odom.R00011      Odom.R00100      Odom.R00101
     -4.103e-03        2.576e-03        1.213e-01        3.849e-02
    Odom.R00110      Odom.R00111      Odom.R01000      Odom.R01001
      6.460e-02       -2.474e-03        6.344e-02       -6.129e-02
    Odom.R01010      Odom.R01011      Odom.R01100      Odom.R01101
      6.875e-03       -1.024e-02       -2.510e-01       -1.674e-01
    Odom.R01110      Odom.R01111      Odom.R10000      Odom.R10001
      5.676e-01       -1.778e-02       -1.871e-02        1.137e-01
    Odom.R10010      Odom.R10011      Odom.R10100      Odom.R10101
     -6.722e-02        4.283e-02       -6.283e-01        3.615e+00
    Odom.R10110      Odom.R10111      Odom.R11000      Odom.R11001
     -2.579e-01       -6.010e-02       -2.747e-03       -8.277e-03
    Odom.R11010      Odom.R11011      Odom.R11100      Odom.R11101
     -2.103e-02       -7.352e-03        3.914e-03        1.305e-01
    Odom.R11110      Odom.R11111  Displace.Weight    Displace.HC1b
      6.304e-02        1.445e-02       -5.371e-02       -5.262e-02
  Displace.HC2b    Displace.CO1b     Displace.CO2    Displace.NOX2
      2.521e-04        2.459e-02        2.911e-03       -8.066e-02
Displace.R00001  Displace.R00010  Displace.R00011  Displace.R00100
     -3.663e-01        7.133e-02       -1.135e-02       -2.396e-02
Displace.R00101  Displace.R00110  Displace.R00111  Displace.R01000
      7.904e-02        5.615e-02       -8.879e-02        3.380e-01
Displace.R01001  Displace.R01010  Displace.R01011  Displace.R01100
      3.119e-01       -2.696e-01       -6.506e-02        6.409e-01
Displace.R01101  Displace.R01110  Displace.R01111  Displace.R10000
      1.336e+00       -5.735e+00        1.181e-01        7.831e-02
Displace.R10001  Displace.R10010  Displace.R10011  Displace.R10100
     -7.714e-01        1.928e-02       -1.786e-01       -1.751e+00
Displace.R10101  Displace.R10110  Displace.R10111  Displace.R11000
     -1.957e+01       -5.951e-01       -5.551e-01       -3.396e-02
Displace.R11001  Displace.R11010  Displace.R11011  Displace.R11100
      4.170e-02        1.474e-01       -1.397e-02        2.759e-01
Displace.R11101  Displace.R11110  Displace.R11111      Weight.HC1b
     -9.458e-02        1.677e-01        7.475e-02        1.182e-01
    Weight.HC2b      Weight.CO1b       Weight.CO2      Weight.NOX2
     -1.382e-01       -1.401e-01        2.049e-03        3.386e-01
  Weight.R00001    Weight.R00010    Weight.R00011    Weight.R00100
      1.922e+00       -1.066e+00        1.406e-01        5.440e-02
  Weight.R00101    Weight.R00110    Weight.R00111    Weight.R01000
      5.308e-01       -3.094e-01       -1.345e-01       -1.114e+00
  Weight.R01001    Weight.R01010    Weight.R01011    Weight.R01100
     -3.039e+00        5.010e-01        4.675e-01               NA
  Weight.R01101    Weight.R01110    Weight.R01111    Weight.R10000
     -2.645e+00        2.421e+01       -5.437e-01       -7.593e-01
  Weight.R10001    Weight.R10010    Weight.R10011    Weight.R10100
             NA       -1.218e+00        2.485e-01        2.733e+00
  Weight.R10101    Weight.R10110    Weight.R10111    Weight.R11000
      9.743e+01        6.910e-01        3.830e-01        2.572e-02
  Weight.R11001    Weight.R11010    Weight.R11011    Weight.R11100
     -6.385e-01       -7.364e-01       -1.475e-01       -1.114e+00
  Weight.R11101    Weight.R11110    Weight.R11111        HC1b.HC2b
      4.468e-01       -1.532e+00       -2.825e-01       -4.422e-02
      HC1b.CO1b         HC1b.CO2        HC1b.NOX2      HC1b.R00001
      1.017e-02        3.807e-03       -1.403e-03        2.943e-01
    HC1b.R00010      HC1b.R00011      HC1b.R00100      HC1b.R00101
      8.849e-02       -2.419e-02        4.977e-01        1.441e-01
    HC1b.R00110      HC1b.R00111      HC1b.R01000      HC1b.R01001
      3.273e-01        2.017e-01               NA        1.881e-01
    HC1b.R01010      HC1b.R01011      HC1b.R01100      HC1b.R01101
     -1.191e+00        1.535e-01               NA       -9.744e-01
    HC1b.R01110      HC1b.R01111      HC1b.R10000      HC1b.R10001
     -1.824e+00        2.633e-01        8.743e-02               NA
    HC1b.R10010      HC1b.R10011      HC1b.R10100      HC1b.R10101
     -6.240e-02       -8.778e-02       -1.114e+00               NA
    HC1b.R10110      HC1b.R10111      HC1b.R11000      HC1b.R11001
      2.985e-01       -3.946e-01        2.413e-01       -9.309e-02
    HC1b.R11010      HC1b.R11011      HC1b.R11100      HC1b.R11101
     -3.060e-01       -5.010e-02       -1.175e-01        1.069e-01
    HC1b.R11110      HC1b.R11111        HC2b.CO1b         HC2b.CO2
      2.451e-01       -5.193e-02        1.339e-02       -7.425e-03
      HC2b.NOX2      HC2b.R00001      HC2b.R00010      HC2b.R00011
      2.740e-02        3.221e-01        7.016e-02        1.975e-01
    HC2b.R00100      HC2b.R00101      HC2b.R00110      HC2b.R00111
     -7.090e-02       -2.132e-01       -2.788e-01        2.474e-01
    HC2b.R01000      HC2b.R01001      HC2b.R01010      HC2b.R01011
             NA       -1.475e+00        1.987e+00       -1.295e-01
    HC2b.R01100      HC2b.R01101      HC2b.R01110      HC2b.R01111
             NA        1.016e+00        5.327e+00        3.949e-02
    HC2b.R10000      HC2b.R10001      HC2b.R10010      HC2b.R10011
     -2.722e-01               NA        4.471e-01        1.796e-01
    HC2b.R10100      HC2b.R10101      HC2b.R10110      HC2b.R10111
     -6.203e+00               NA               NA        5.803e-01
    HC2b.R11000      HC2b.R11001      HC2b.R11010      HC2b.R11011
      7.736e-02        2.949e-01        3.902e-01        1.926e-01
    HC2b.R11100      HC2b.R11101      HC2b.R11110      HC2b.R11111
      2.655e-02        2.583e-01       -2.378e-01        2.385e-01
       CO1b.CO2        CO1b.NOX2      CO1b.R00001      CO1b.R00010
     -9.754e-03        2.626e-02        9.601e-02       -1.243e-02
    CO1b.R00011      CO1b.R00100      CO1b.R00101      CO1b.R00110
      1.683e-01       -1.333e-01        2.602e-02       -5.194e-02
    CO1b.R00111      CO1b.R01000      CO1b.R01001      CO1b.R01010
     -6.174e-02               NA        4.065e-02        2.181e-01
    CO1b.R01011      CO1b.R01100      CO1b.R01101      CO1b.R01110
     -1.967e-02               NA        8.134e-01        2.571e+00
    CO1b.R01111      CO1b.R10000      CO1b.R10001      CO1b.R10010
     -4.356e-02        1.729e-02               NA        1.478e-01
    CO1b.R10011      CO1b.R10100      CO1b.R10101      CO1b.R10110
      3.397e-01               NA               NA               NA
    CO1b.R10111      CO1b.R11000      CO1b.R11001      CO1b.R11010
     -2.221e-02        1.800e-02        6.551e-02        6.061e-02
    CO1b.R11011      CO1b.R11100      CO1b.R11101      CO1b.R11110
      4.588e-02       -4.491e-02       -9.165e-02        1.781e-02
    CO1b.R11111         CO2.NOX2       CO2.R00001       CO2.R00010
      3.766e-02       -1.477e-02       -3.468e-01       -1.633e-01
     CO2.R00011       CO2.R00100       CO2.R00101       CO2.R00110
     -1.278e-01        3.728e-02        1.056e-01        9.126e-02
     CO2.R00111       CO2.R01000       CO2.R01001       CO2.R01010
     -1.980e-01               NA        6.395e-01       -5.089e-01
     CO2.R01011       CO2.R01100       CO2.R01101       CO2.R01110
     -4.762e-02               NA       -8.561e-02       -5.041e+00
     CO2.R01111       CO2.R10000       CO2.R10001       CO2.R10010
     -6.141e-02        3.470e-01               NA       -2.737e-01
     CO2.R10011       CO2.R10100       CO2.R10101       CO2.R10110
     -2.037e-01               NA               NA               NA
     CO2.R10111       CO2.R11000       CO2.R11001       CO2.R11010
     -2.968e-01        1.433e-02       -7.736e-02       -1.954e-01
     CO2.R11011       CO2.R11100       CO2.R11101       CO2.R11110
     -8.868e-02       -1.478e-01       -1.319e-01       -2.267e-02
     CO2.R11111      NOX2.R00001      NOX2.R00010      NOX2.R00011
     -1.203e-01       -1.333e-01       -1.260e-01       -1.507e-01
    NOX2.R00100      NOX2.R00101      NOX2.R00110      NOX2.R00111
     -9.195e-02        5.419e-02        1.839e-01       -2.230e-02
    NOX2.R01000      NOX2.R01001      NOX2.R01010      NOX2.R01011
             NA        6.623e-02       -1.166e+00       -7.185e-02
    NOX2.R01100      NOX2.R01101      NOX2.R01110      NOX2.R01111
             NA       -6.743e-01               NA        4.137e-03
    NOX2.R10000      NOX2.R10001      NOX2.R10010      NOX2.R10011
      3.158e-01               NA       -2.448e-01       -1.086e-01
    NOX2.R10100      NOX2.R10101      NOX2.R10110      NOX2.R10111
             NA               NA               NA       -2.328e-01
    NOX2.R11000      NOX2.R11001      NOX2.R11010      NOX2.R11011
     -2.008e-03       -1.292e-01       -5.854e-02       -1.307e-01
    NOX2.R11100      NOX2.R11101      NOX2.R11110      NOX2.R11111
     -2.891e-01       -2.792e-01       -1.055e-02       -5.174e-02

> anova(fit)
Error: invalid dimnames given for data frame


--
Jean Meloche
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._