       Re: NonlinearModelFit and "ANOVATable" and "ParameterConfidenceIntervalTable"

• To: mathgroup at smc.vnet.net
• Subject: [mg121311] Re: NonlinearModelFit and "ANOVATable" and "ParameterConfidenceIntervalTable"
• From: Darren Glosemeyer <darreng at wolfram.com>
• Date: Fri, 9 Sep 2011 05:50:19 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201109070939.FAA21479@smc.vnet.net>

```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:= 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:= nlm[{"ANOVATable", "ParameterConfidenceIntervalTable"}]
>
> During evaluation of In:= 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:= error = Total[nlm["FitResiduals"]^2]

Out= 4.60397

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

Out= 5.4758

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

Out= 0.76984

In:= model = uncorrected - error

Out= 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