Mike, That's amazing, you nailed it, finally. Great!
Yes, I didn’t have all levels of stages that match all levels of Locations, and because of this, I am getting such error messages. Thanks a lot indeed, for educating and enlightening me, on these aspects. I do have some other factors with equal levels (Sex, Location). However, the sample size may not be 147 but will have 51 observations altogether!. Let me try this and I will let you know, probably give some more troubles on the trajectory as well, so catch you soon. Thanks a lot indeed, Mike Truly Mahen On Fri, May 18, 2018 at 4:25 PM, Mike Collyer <mlcoll...@gmail.com> wrote: > Mahen, > > I think the issue is because you might not have all levels of Location > matched with all Levels of Stages. It appears you have 5 stages and 2 > locations. For the model that worked, you will notice 5 rows in your ANOVA > table. In the one that didn’t, it was attempting to create a table with 9 > rows, which would include the 4 interactions created by your new model. > (Sorry I did not catch this before.) The error implies that the the > number of SS items and df items do not match, which suggests to me that two > of the interactions do not work, based on your sample. > > You might consider the following, > > model.matrix( ~ Csize * ind$Stages * ind$Location) > > This will be a large matrix. Check the matrix for columns of all 0s. If > you find that, it suggests that you are missing some factor interactions. > If this is not the issue, then maybe you could send me your data and R > script and I’ll try to figure out if there is a different problem. > > Best, > Mike > > On May 18, 2018, at 2:56 AM, mahendiran mylswamy <mahenr...@gmail.com> > wrote: > > My sample size is 147 not either 9 or 7 in any case. I agree that the > computer displays these numbers! don't know why? > > Nevertheless, in this analysis the number of specimens (dependent shape > variable) is 147, obviously, with the equal number of observations for each > independent variables (here, we used two factors ind$Stages and > ind$Location ). > > It is interesting to note that I am getting good results using single > factor Manova; dependent shape variable over, either ind$stages or > ind$location, at a given time, though with/without interactions as well. > Even, > it works fine with more factors if I model without any effect of > interaction, and the results are given below > > > Paint<-procD.lm(coords ~ Csize + ind$Stages + ind$Location, data = > > Paintgeo147, iter = 9999, RRPP = FALSE, print.progress = FALSE, int.first = > > FALSE) > > > Paint3factor > > > > Call: > > procD.lm(f1 = coords ~ Csize + ind$Stages + ind$Location, iter = 9999, > > RRPP = FALSE, int.first = FALSE, data = Paintgeo147, print.progress = > FALSE) > > > > > > > > Type I (Sequential) Sums of Squares and Cross-products > > Randomization of Raw Values used > > 10000 Permutations > > > > Df SS MS Rsq F Z Pr(>F) > > Csize 1 0.04688 0.046880 0.064257 13.4431 7.9867 1e-04 *** > > ind$Stages 4 0.17575 0.043938 0.240899 12.5994 8.3726 1e-04 *** > > ind$Location 1 0.01871 0.018713 0.025650 5.3662 3.2145 0.0042 ** > > Residuals 140 0.48822 0.003487 > > Total 146 0.72956 > > --- > > Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > > > > The main issue, here, is that somehow I don’t know how to use the proper > command to quantify effects of interaction, say for example ind$Stages: > ind$Location, Csize: ind$Stages, Csize: ind$Locations... etc. ???? > > Thanks for spending your time and effort! > > Looking forward > > Truly > > Mahen > > > On Fri, May 18, 2018 at 12:05 AM, Mike Collyer <mlcoll...@gmail.com> > wrote: > >> OK, this error is indicating you have variables of different size - one >> with 9 and one with 7. This does not appear to be because of the int.first >> issue, but rather that you introduced a new variable with a different >> number of observations. Also, I’m not sure what kind of result you expect >> with such a complex model and so few observations. It might not work, >> anyway, because the number of independent variables exceeds the number of >> observations. Just a warning. >> >> Mike >> >> >> On May 17, 2018, at 2:19 PM, mahendiran mylswamy <mahenr...@gmail.com> >> wrote: >> >> Hi Mike >> >> >> Thanks indeed for the quick response. >> error messages are given below >> >> >> > PSfact<-procD.lm(coords ~ Csize * ind$Stages * ind$Location, data = >> rough, iter = 99, RRPP = FALSE, int.first = TRUE, print.progress = FALSE) >> Error in data.frame(df, SS, MS, Rsq = R2, F = Fs) : >> arguments imply differing number of rows: 9, 7 >> In addition: Warning message: >> In SS/df : longer object length is not a multiple of shorter object length >> >> >> >> >> >> >> On Thu, May 17, 2018 at 6:22 PM, Mike Collyer <mlcoll...@gmail.com> >> wrote: >> >>> Mahen, >>> >>> Can you be specific with the error statement? It might not me related >>> to the int.first use but more so how you set up your formula. If >>> ind$Stages and ind$Location are in the data frame, you are asking R to >>> create a model matrix from dat in an environment within another >>> environment. This might cause some problems. >>> >>> Please let us know what the error says, and we can see if it is obvious. >>> >>> Cheers! >>> Mike >>> >>> On May 17, 2018, at 8:22 AM, mahendiran mylswamy <mahenr...@gmail.com> >>> wrote: >>> >>> Dear All. >>> >>> I did a single and multi-factor Manova, through Geomorph package in R, >>> using the following commands given below, it is working fine! >>> >>> *Paint1factor <-procD.lm (coords ~ Csize*indep1$Stages, data = >>> Paintgeo147, iter = 9999, RRPP = FALSE, print.progress = FALSE)* >>> >>> *Paint3factor<-procD.lm(coords ~ Csize + ind$Stages + ind$Location, data >>> = Paintgeo3fac, iter = 99, RRPP = FALSE, print.progress = FALSE, int.first >>> = FALSE)* >>> >>> HOWEVER, when I did the multifactor Manova to check the interaction >>> effects, using the command, though i inserted int.first = false, somehow >>> it’s not working often shows error >>> >>> *Paint3factor<-procD.lm(coords ~ Csize * ind$Stages * ind$Location, data >>> = Paintgeo3fac, iter = 99, RRPP = FALSE, print.progress = FALSE, int.first >>> = FALSE)* >>> >>> >>> apart from changing, + to *, inserting int.first, any other stuff to be >>> added? >>> >>> Please help me :( >>> >>> Thanks in Advance! >>> >>> Truly >>> >>> Mahen >>> >>> >>> -- >>> *************************************** >>> M Mahendiran, Ph D >>> Scientist - Division of Wetland Ecology >>> Salim Ali Centre for Ornithology and Natural History (SACON) >>> Anaikatti (PO), Coimbatore - 641108, TamilNadu, India >>> Tel: 0422-2203100 (Ext. 122), 2203122 (Direct), Mob: 09787320901 >>> Fax: 0422-2657088 >>> http://www.sacon.in/staff/dr-m-mahendiran/ >>> >>> P Please consider the environment before printing this email >>> >>> -- >>> MORPHMET may be accessed via its webpage at http://www.morphometrics.org >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "MORPHMET" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to morphmet+unsubscr...@morphometrics.org. >>> >>> >>> >> >> >> -- >> *************************************** >> M Mahendiran, Ph D >> Scientist - Division of Wetland Ecology >> Salim Ali Centre for Ornithology and Natural History (SACON) >> Anaikatti (PO), Coimbatore - 641108, TamilNadu, India >> Tel: 0422-2203100 (Ext. 122), 2203122 (Direct), Mob: 09787320901 >> Fax: 0422-2657088 >> http://www.sacon.in/staff/dr-m-mahendiran/ >> >> P Please consider the environment before printing this email >> >> >> > > > -- > *************************************** > M Mahendiran, Ph D > Scientist - Division of Wetland Ecology > Salim Ali Centre for Ornithology and Natural History (SACON) > Anaikatti (PO), Coimbatore - 641108, TamilNadu, India > Tel: 0422-2203100 (Ext. 122), 2203122 (Direct), Mob: 09787320901 > Fax: 0422-2657088 > http://www.sacon.in/staff/dr-m-mahendiran/ > > P Please consider the environment before printing this email > > > -- *************************************** M Mahendiran, Ph D Scientist - Division of Wetland Ecology Salim Ali Centre for Ornithology and Natural History (SACON) Anaikatti (PO), Coimbatore - 641108, TamilNadu, India Tel: 0422-2203100 (Ext. 122), 2203122 (Direct), Mob: 09787320901 Fax: 0422-2657088 http://www.sacon.in/staff/dr-m-mahendiran/ P Please consider the environment before printing this email -- MORPHMET may be accessed via its webpage at http://www.morphometrics.org --- You received this message because you are subscribed to the Google Groups "MORPHMET" group. To unsubscribe from this group and stop receiving emails from it, send an email to morphmet+unsubscr...@morphometrics.org.