Re: [R] Using nlm or optim

2010-07-08 Thread Anita Narwani
___ > > Ravi Varadhan, Ph.D. > Assistant Professor, > Division of Geriatric Medicine and Gerontology > School of Medicine > Johns Hopkins University > > Ph. (410) 502-2619 > email: rvarad...@jhmi.edu > > >

[R] Using nlm or optim

2010-07-07 Thread Anita Narwani
Hello, I am trying to use nlm to estimate the parameters that minimize the following function: Predict<-function(M,c,z){ + v = c*M^z + return(v) + } M is a variable and c and z are parameters to be estimated. I then write the negative loglikelihood function assuming normal errors: nll<-function

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
t; > I'd go for type II, but you're free to test any hypothesis you want. > > Cheers > Joris > > > > On Thu, Jun 3, 2010 at 9:59 PM, Anita Narwani wrote: > >> Thanks for your response Joris. >> >> I was aware of the potential for aliasing, although

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
2.184e-05 *** > Diversity:Zoop 261789 1 0.1095 0.7429356 > Diversity:Zoop:Phyto 61710162 6 4.3021 0.0028790 ** > Residuals 74110938 31 > --- > Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > > > You can check with summary(test) that

Re: [R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
That's aliasing. >> >> Depending on how you stand on type III sum of squares, you could call that >> a "bug". Personally, I'd just not use them. >> >> https://stat.ethz.ch/pipermail/r-help/2001-October/015984.html >> >> Cheers >>

[R] Nested ANOVA with covariate using Type III sums of squares

2010-06-03 Thread Anita Narwani
Thanks for your response Joris. I was aware of the potential for aliasing, although I thought that this was only a problem when you have missing cell means. It was interesting to read the vehement argument regarding the Type III sums of squares, and although I knew that there were different positi

[R] Nested ANOVA with covariate using Type III sums of squares in R

2010-06-02 Thread Anita Narwani
o sums of sq for Diversity and Zoop. This cannot be correct, however when I do the model simplification by dropping terms from the models manually and comparing them using anova(), I get virtually the same results. I would appreciate any suggestions for things to try or pointers as to what I ma

[R] Nested ANOVA with covariate using Type III sums of squares

2010-06-02 Thread Anita Narwani
e same results. I would appreciate any suggestions for things to try or pointers as to what I may be doing incorrectly. Thank you. Anita Narwani. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/m