Dear R users,
I have posted this question several days ago and received not a single
suggestion. I believe I have provided sufficient information for at
least some help. Here I repost the question with several modifications.

I want to run nested fixed-factor Anova in R on different experiments.
I have 48 levels of the main factor x1 and 242 levels of the nested
factor z1, and continuous response variable y1 with around 15.000 data
points. There is no interaction between specification of the main factor
and nested factor levels.

When I run lm on using nested design
anov1=lm(c(as.vector(y1))~as.factor(x1)+  as.factor(x1)/as.factor(z1))

I get a warning

summary(anov1)

Coefficients: (..  not defined because of singularities). I obtain
interaction between factors that should not be included because of the
nested design. Furthermore, the running time takes more than 7 hours!

Why R includes the interactions that are not part of the model? Is it
because R solves anova via least squares that requires matrix inversion?
Is there any way to specify the model so that only matrices for each
level of the first factor are inverted so that no computations


Many thanks for your help in advance!


Extract:
Coefficients: (... not defined because of singularities)

                              Estimate Std. Error t value Pr(>|t|)

(Intercept)                    -0.1759     0.3226  -0.545   0.5869

as.factor(x1)2                 -0.1276     0.4473  -0.285   0.7762

as.factor(x1)3                  0.6461     0.4785   1.350   0.1802

as.factor(x1)1:as.factor(z1)2   0.1049     0.4473   0.234   0.8151

as.factor(x1)2:as.factor(z1)2       NA         NA      NA       NA

as.factor(x1)3:as.factor(z1)2       NA         NA      NA       NA

as.factor(x1)1:as.factor(z1)3       NA         NA      NA       NA

as.factor(x1)2:as.factor(z1)3   1.1520     0.4473   2.575   0.0116 *

as.factor(x1)3:as.factor(z1)3       NA         NA      NA       NA

as.factor(x1)1:as.factor(z1)4       NA         NA      NA       NA

as.factor(x1)2:as.factor(z1)4       NA         NA      NA       NA

as.factor(x1)3:as.factor(z1)4       NA         NA      NA       NA

as.factor(x1)1:as.factor(z1)5       NA         NA      NA       NA

as.factor(x1)2:as.factor(z1)5       NA         NA      NA       NA



----------------------------------------------
Sergii Ivakhno

PhD student

Computational Biology Group
Cancer Research UK Cambridge Research Institute
Li Ka Shing Centre
Robinson Way
Cambridge CB2 0RE
England

+44 (0)1223 404293 (O)
+44 (0)1223 404128 (F)

http://www.compbio.group.cam.ac.uk
<BLOCKED::http://www.compbio.group.cam.ac.uk/> /




This communication is from Cancer Research UK. Our website is at www.cancerresearchuk.org. We are a charity registered under number 1089464 and a company limited by guarantee registered in England & Wales under number 4325234. Our registered address is 61 Lincoln's Inn Fields, London WC2A 3PX. Our central telephone number is 020 7242 0200.

This communication and any attachments contain information which is confidential and may also be privileged.   It is for the exclusive use of the intended recipient(s).  If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful.  If you have received this communication in error, please notify the sender and delete the email and destroy any copies of it.

E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept liability for any such matters or their consequences.  Anyone who communicates with us by e-mail is taken to accept the risks in doing so.

	[[alternative HTML version deleted]]


