From: Michael Todd on 29 Apr 2010 19:56 I am trying to fit something like a linear mixed model with a Gaussian response variable, a single random grouping factor (i.e., experiment participant) and 10 continuous predictors. I want to infer whether the continuous predictors have an effect in the population from which the 30 participants were sampled. So, one might use lme or lmer for this problem in R, for example. I have two questions about doing this analysis in Matlab. First, is 'anovan' the best way to do this in Matlab? I was surprised that there wasn't a more basic function, such as lme, given that Matlab includes nlme. Second, assuming that anovan is the correct function for this in Matlab, how does it fit the above model? That is, when I specify a random factor and a collection of continuous predictors, how does anovan estimate the parameters and confidence intervals? What model is it fitting exactly? The documentation is extremely sparse. I know that anovan did not used to implement ReML. However, it didn't used to support continuous predictors either, and now it does. So, what is it doing? Another way of saying the above is, I got a nice result out of anovan, but I don't know how to report it, because anovan doesn't give sufficient information to understand what it's doing. Any clarification would be *greatly* appreciated. -Mike
From: Tom Lane on 3 May 2010 10:53 Michael, currently there's not a good answer here. The anovan function does support random effects and it allows you to specify a continuous predictor, but it doesn't display the things one would ordinarily expect from a regression program: coefficients, residuals, and so on. If you do use anovan, the fitting method is least squares with the variance components computed by what is often called the "anova method." Here the observed sums of squares are computed, the expected sums of squares are computed as a functions of the variances, and the estimates are the values that make the expected and observed values equal. You could use nlmefit, but as you point out the function would not be taking advantage of the linearity of the model. -- Tom "Michael Todd" <mttodd(a)princeton.edu> wrote in message news:hrd6al$fs7$1(a)fred.mathworks.com... >I am trying to fit something like a linear mixed model with a Gaussian >response variable, a single random grouping factor (i.e., experiment >participant) and 10 continuous predictors. I want to infer whether the >continuous predictors have an effect in the population from which the 30 >participants were sampled. So, one might use lme or lmer for this problem >in R, for example. I have two questions about doing this analysis in >Matlab. > > First, is 'anovan' the best way to do this in Matlab? I was surprised that > there wasn't a more basic function, such as lme, given that Matlab > includes nlme. > Second, assuming that anovan is the correct function for this in Matlab, > how does it fit the above model? That is, when I specify a random factor > and a collection of continuous predictors, how does anovan estimate the > parameters and confidence intervals? What model is it fitting exactly? The > documentation is extremely sparse. I know that anovan did not used to > implement ReML. However, it didn't used to support continuous predictors > either, and now it does. So, what is it doing? > > Another way of saying the above is, I got a nice result out of anovan, but > I don't know how to report it, because anovan doesn't give sufficient > information to understand what it's doing. Any clarification would be > *greatly* appreciated. > > -Mike >
From: Michael Todd on 3 May 2010 13:40 Hi, Tom, thanks for the response. It would be immensely helpful if you could provide a canonical statistical citation for the "anova method" as implemented by 'anovan', or better yet links to a detailed description of the precise computations that 'anovan' is performing in the case that I initially described. As I said, 'anovan' is providing me with great test results, but these are worthless if I cannot report how they were generated in standard jargon. To press on this a little, this seems to be a weak spot in the Matlab documentation, and indeed in the statistical library. First, people who use ANOVA-like analyses often need to report the results in extemely standardized jargon, and the anovan documentation for continuous predictors does not permit this type of reporting, making this potentially valuable functionality useless. Second, it's surprising that there is an nlme function but no lme function. I really don't like having to go to R (or really, in this case, SPSS, which is expensive) to do linear analyses that are very standard in my field, when Matlab has the capacity to handle much bulkier nonlinear analogs. Thanks again for the response, Tom. -Mike "Tom Lane" <tlane(a)mathworks.com> wrote in message <hrmo11$2i9$1(a)fred.mathworks.com>... > Michael, currently there's not a good answer here. The anovan function does > support random effects and it allows you to specify a continuous predictor, > but it doesn't display the things one would ordinarily expect from a > regression program: coefficients, residuals, and so on. > > If you do use anovan, the fitting method is least squares with the variance > components computed by what is often called the "anova method." Here the > observed sums of squares are computed, the expected sums of squares are > computed as a functions of the variances, and the estimates are the values > that make the expected and observed values equal. > > You could use nlmefit, but as you point out the function would not be taking > advantage of the linearity of the model. > > -- Tom > > "Michael Todd" <mttodd(a)princeton.edu> wrote in message > news:hrd6al$fs7$1(a)fred.mathworks.com... > >I am trying to fit something like a linear mixed model with a Gaussian > >response variable, a single random grouping factor (i.e., experiment > >participant) and 10 continuous predictors. I want to infer whether the > >continuous predictors have an effect in the population from which the 30 > >participants were sampled. So, one might use lme or lmer for this problem > >in R, for example. I have two questions about doing this analysis in > >Matlab. > > > > First, is 'anovan' the best way to do this in Matlab? I was surprised that > > there wasn't a more basic function, such as lme, given that Matlab > > includes nlme. > > Second, assuming that anovan is the correct function for this in Matlab, > > how does it fit the above model? That is, when I specify a random factor > > and a collection of continuous predictors, how does anovan estimate the > > parameters and confidence intervals? What model is it fitting exactly? The > > documentation is extremely sparse. I know that anovan did not used to > > implement ReML. However, it didn't used to support continuous predictors > > either, and now it does. So, what is it doing? > > > > Another way of saying the above is, I got a nice result out of anovan, but > > I don't know how to report it, because anovan doesn't give sufficient > > information to understand what it's doing. Any clarification would be > > *greatly* appreciated. > > > > -Mike > > >
From: Tom Lane on 3 May 2010 14:41 > Hi, Tom, thanks for the response. It would be immensely helpful if you > could provide a canonical statistical citation for the "anova method" as > implemented by 'anovan', or better yet links to a detailed description of > the precise computations that 'anovan' is performing in the case that I > initially described. As I said, 'anovan' is providing me with great test > results, but these are worthless if I cannot report how they were > generated in standard jargon. Mike, one reference is the book "Analysis of Messy Data," vol. 1, by Milliken and Johnson, 1992. They introduce this method on page 233 under the name "method of moments." They sketch out the method and they provide other references. > To press on this a little, this seems to be a weak spot in the Matlab > documentation, and indeed in the statistical library. First, people who > use ANOVA-like analyses often need to report the results in extemely > standardized jargon, and the anovan documentation for continuous > predictors does not permit this type of reporting, making this potentially > valuable functionality useless. Second, it's surprising that there is an > nlme function but no lme function. I really don't like having to go to R > (or really, in this case, SPSS, which is expensive) to do linear analyses > that are very standard in my field, when Matlab has the capacity to handle > much bulkier nonlinear analogs. Thanks, it's good to have this feedback. -- Tom
|
Pages: 1 Prev: HELP!!!Resize axes according to the image size!!! Next: Return digits of a number as a list |