MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NonlinearModelFit and "ANOVATable" and "ParameterConfidenceIntervalTable"

On 9/7/2011 4:39 AM, HansChristopf wrote:
> Dear friends,
> I'm a Mathematica beginner and use in the course of a small project at my college in Germany. I'm using NonlinearModelFit in order to do fit a model to experimental data. I post the code in the following:
> ----------------------------------------------------------------------------------
> In[1]:= data = {{1., 0.75}, {2., 0.89}, {3., 0.42}, {4., 0.99}, {5.,0.84}, {6., 0.34}, {7., 0.83}, {8., 0.93}, {9., 0.76}, {10.,0.11}};
> nlm = NonlinearModelFit[data, {Exp[a + b x^2], b<  -1/2}, {{a, 0}, {b, -1}}, x]
> In[2]:= nlm[{"ANOVATable", "ParameterConfidenceIntervalTable"}]
> During evaluation of In[9]:= FittedModel::constr: The property values {ANOVATable,ParameterConfidenceIntervalTable} assume an unconstrained model. The results for these properties may not be valid, particularly if the fitted parameters are near a constraint boundary.>>
> ----------------------------------------------------------------------------------
> Now my questions to my problem:
> I cannot interpret these results ?
> 1. Are the results from the ANOVATable the same as the results from the ANOVA (Analysis of Variance) ?
> 2. Which formulas uses Mathematica to obtain these results ?
> 3. How Mathematica calculates the ANOVATable EXACTLY ???????
> Greatings, Hans

For question 1, if you're asking about the Analysis of Variance model 
(linear model with categorical predictors), the answer is that they are 
conceptually similar but the models are different. The ANOVATable of 
nonlinear models decomposes the sources of variation in the data as does 
the ANOVA table for an Analysis of Variance model.

Here are the formulas for the terms in the SS (sum of squares) column:

In[10]:= error = Total[nlm["FitResiduals"]^2]

Out[10]= 4.60397

In[11]:= uncorrected = Total[nlm["Response"]^2]

Out[11]= 5.4758

In[12]:= corrected = Total[(nlm["Response"] - Mean[nlm["Response"]])^2]

Out[12]= 0.76984

In[13]:= model = uncorrected - error

Out[13]= 0.871827

For the DF (degrees of freedom) terms, the model DF is the number of 
parameters in the model, uncorrected DF is the number of data points, 
and the error DF is their difference. The corrected DF is reduced by 1 
because of the correction by the mean estimate. The MS (mean square) 
values are obtained by dividing the SS terms by the associated DF values.

Darren Glosemeyer
Wolfram Research

  • Prev by Date: Re: applying a real texture in Mathematica
  • Next by Date: Alignment problem with Row[ ]
  • Previous by thread: NonlinearModelFit and "ANOVATable" and "ParameterConfidenceIntervalTable"
  • Next by thread: PlotMarkers Documentation inconsistency