Skip to content

confidence / prediction ellipse

4 messages · Giuseppe Amatulli, Rolf Turner, David Winsemius +1 more

#
Hi Rolf,
sorry for this late answer and thanks for your kind explanation and
relative R code. I really appreciate.
In reality the concept that I'm trying to address is a bit more complex.
I'm fitting a model y vs 6 predictors with MARS / RandomForest /
Multiple Linear Regression Models having 140 observations.
I have the prediction of each model and would like to delineate the
prediction ellipses for 3 models, for the 95% probability, and
plotting them together with the observation vs prediction.
I think that the prediction-ellipses code that you provide to me is
valid also for predictions derived by not-linear model (such as MARS
and RF).
Is it correct? or should i use an alternative solution ?

Moreover, I was expecting that the  abline (lm(b,a)) would be
correspond to the main axis of the prediction ellipse, but is not this
the case.
why?

Thanks in advance
Giuseppe
On 28 January 2013 19:04, Rolf Turner <rolf.turner at xtra.co.nz> wrote:
--
Giuseppe Amatulli
Web: www.spatial-ecology.net
#
Please see in-line below.
On 02/08/2013 05:20 AM, Giuseppe Amatulli wrote:
Probably not.  The degrees of freedom will very likely be
         wrong.  You need to consult a suitable book on multivariate
         analysis --- quite possibly Seber's book "Multivariate 
Observations"
         would help.
At the very least some adjustment will be required I think.
Why do you expect that?
No idea.  What are "b" and "a"?  In general if a and b are
         jointly Gaussian you can

             (i) regress b on a and plot the fitted regression line, which
             is what abline(lm(b~a)) will do, or

             (ii) form the prediction ellipse for (a,b) .

         The major axis of this prediction ellipse will NOT be the 
regression
         line.  I have a vague recollection that this major axis is the 
line which
         minimizes the sum of squares of the *orthogonal* distances of the
         points to the line (whereas the regression line minimizes the 
sum of
         squares of the *vertical* distances).

         But none of this seems to me to have much if anything to do with
         what you are trying to accomplish.


         At any rate this discussion has nothing to do with R.  You 
should ask
         about it on some statistics discussion forum, or consult with 
an expert
         on multivariate statistics.

     cheers,

             Rolf Turner
#
On Feb 7, 2013, at 8:20 AM, Giuseppe Amatulli wrote:

            
Well, if a method provides a probability estimate or even if it only provides a rankable order,  could always use color change to highlight the the "most predicted" 95%. I say "most predicted" rather than "most probable", since it's not clear that these are probability or credibility estimates.
Presumably you meant lm(b~a)? You might have also expected ( ... also incorrectly) that the line for lm(a~b) would be along the major axis. Perhaps reading some material on orthogonal regression (AKA total least squares regression, AKA Deming regression) would be of interest. The major axis should "split the difference" between those two estimates.
1 day later
#
Hi Giuseppe
You've posted a series of questions on this topic, never with any code 
you've tried or data, and usually with some undefined references to
'a' and 'b'.  In spite of this, a variety of people have tried to
give you helpful replies, intuiting what it is you might have meant.

This is wasteful of everyone's time. If you want help from R-help,
please make your effort to formulate a precise question, preferably with 
code and data. Otherwise, you might post to
R-mindreaders if it ever gets established.
On 2/7/2013 11:20 AM, Giuseppe Amatulli wrote: