[R] Missing Variables? Singularities?

Benjamin Zuckerberg bzuckerb at syr.edu
Wed Nov 1 18:00:41 CET 2006


Hello,

I am running into trouble with an ANCOVA model I am attempting to  
develop.  The model includes 2 categorical variables (BHCODE and  
MHCODE), 2 continuous variables (LOGWGT,LOG1980), and an interaction  
term (BHCODE:MHCODE).  There are seven levels of the BHCODE (ForestG,  
ForestO, Generalist, Grassland, Scrub, Urban, Wetland) and three  
levels of MHCODE (Neo, Res, Short).  The model is written as follows:

lm7 <- lm(LOGIT1980~BHCODE+MHCODE+LOGWGT+LOG1980+BHCODE:MHCODE,data = data80)

When I attempt to use the summary(lm) function, I receive the  
following output.  Two terms are missing from all of my analyses,  
ForestG (from the BHCODE variable) and Neo (from the MHCODE variable).  
  They are not constant and change throughout the data set.  In  
addition, the singularity warning does not seem to relate to these  
missing levels but to the NA findings below  
(BHCODEGeneralist:MHCODERes and BHCODEScrub:MHCODERes).  I know that  
ForestG is represented by the (Intercept) term, but it is not found  
again in any interaction terms and Neo is just plain gone.  Any  
thoughts??  Thanks!

Coefficients: (2 not defined because of singularities)
                              Estimate Std. Error t value Pr(>|t|)
(Intercept)                  -0.19623    0.14485  -1.355   0.1795
BHCODEForestO                -0.44754    0.18855  -2.374   0.0201 *
BHCODEGeneralist             -0.06299    0.17215  -0.366   0.7154
BHCODEGrassland              -0.47554    0.25435  -1.870   0.0653 .
BHCODEScrub                  -0.05577    0.21577  -0.258   0.7967
BHCODEUrban                  -0.35241    0.18748  -1.880   0.0639 .
BHCODEWetland                -0.04488    0.14080  -0.319   0.7508
MHCODERes                     0.37879    0.17125   2.212   0.0299 *
MHCODEShort                  -0.23582    0.16185  -1.457   0.1492
LOGWGT                        0.19212    0.09511   2.020   0.0469 *
LOG1980                       0.77477    0.06480  11.957   <2e-16 ***
BHCODEForestO:MHCODERes       0.26818    0.44155   0.607   0.5454
BHCODEGeneralist:MHCODERes         NA         NA      NA       NA
BHCODEGrassland:MHCODERes    -0.99372    0.47383  -2.097   0.0393 *
BHCODEScrub:MHCODERes              NA         NA      NA       NA
BHCODEUrban:MHCODERes        -0.73341    0.31685  -2.315   0.0233 *
BHCODEWetland:MHCODERes      -0.79203    0.40175  -1.971   0.0523 .
BHCODEForestO:MHCODEShort     0.53082    0.30627   1.733   0.0871 .
BHCODEGeneralist:MHCODEShort  0.48821    0.27064   1.804   0.0752 .
BHCODEGrassland:MHCODEShort   0.38084    0.31552   1.207   0.2311
BHCODEScrub:MHCODEShort       0.25202    0.31288   0.805   0.4230
BHCODEUrban:MHCODEShort       0.44703    0.27947   1.600   0.1138
BHCODEWetland:MHCODEShort     0.24110    0.23742   1.016   0.3130


-- 
Benjamin Zuckerberg
Doctoral Candidate
State University of New York
College of Environmental Science and Forestry
Illick 244A, 1 Forestry Drive
Syracuse, New York 13210
Tele: (315) 470-6985
E-mail: bzuckerb at syr.edu



More information about the R-help mailing list