       Re: LinearModelFit regression estimated variance error

• To: mathgroup at smc.vnet.net
• Subject: [mg102348] Re: LinearModelFit regression estimated variance error
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Thu, 6 Aug 2009 06:31:42 -0400 (EDT)

```On 8/5/09 at 5:43 AM, parita.patel at gmail.com (Parita) wrote:

>I want to run linear regression in Mathematica and am using
>LinearModelFit for the same. Following is the code that I am using.
>data1 contains the 10 columns. The first 9 columns contains the data
>through which I want to run regression and the last column contains
>the response value.

>model = LinearModelFit [data1, {a, b, c, d, e, f, g, h, i}, {a, b,
>c, d, e, f, g, h, i}]; Print[model["BestFit"]];

<error messages snipped>

>I am getting the coefficients for the regression model bu the
>standard error, p-values and R-squared are indeterminate. Any ideas
>what this error means and how can I go around it?

You have not provided enough information for me to be certain
what is causing the error messages. I would guess the source of
the problem is collinearity between some subsets of the
independent variables and/or a lack of variation in the
dependent variables. I suggest looking for relationships between
the independent variables.

I find a useful way to quickly look for dependencies among what
are supposed to be independent variables is PairwiseScatterPlot
which is found in the package StatisticalPlots. Given a data
matrix with n columns, this function produces a n x n array of
plots showing each column plotted against every other column in
the data matrix. Any of these plots showing something that
doesn't look like a scatter diagram when the columns plotted are
your independent variables is a potential issue when doing
linear regression analysis. If one or more of this looks like a
line, that is telling you those particular columns are
essentially equal predictors for your dependent variable and one
of them should be omitted before using LinearModelFit.

```

• Prev by Date: Re: Finding positive / non-complex solutions (newbie)
• Next by Date: Re: LinearModelFit regression estimated variance error
• Previous by thread: Re: LinearModelFit regression estimated variance error
• Next by thread: Re: LinearModelFit regression estimated variance error