Dear all, Has anyone written functions to compute (and ideally project / plot onto a plane) confidence ellipsoids for q linear model parameters, q > 2 ? Greetings and best wishes, Renaud -- Dr Renaud Lancelot, v?t?rinaire CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) Programme Productions Animales http://www.cirad.fr/presentation/programmes/prod-ani.shtml ISRA-LNERV tel (221) 832 49 02 BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD) Senegal e-mail renaud.lancelot at cirad.fr -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Jesus Maria Frias Celayeta
2002-Jan-02 10:05 UTC
[R] confidence ellipsoid for model parameters
Dear Renaud, Have a look to the package ellipse at the CRAN repository, and particularly to ellipse.lm(). This function produces the ellipsoidal outline of a pairwise condence region for a linear model t. Usage ellipse(x, which = c(1, 2), level = 0.95, t = sqrt(2 * qf(level, 2, x$df.residual)), ...) You can produce pairwise regions for any two parameters in a linear fit that you can plot afterwards. Is that what you want?. Happy new year to all the R-helpers, IOsu Jesus Maria Frias Celayeta, PhD. Process Engineering Department University College Cork. Ireland phone: 353-21-4903097 fax: 353-21-4270249 http://www.ucc.ie/acad/departments/processeng/staff/friasj.html On Tue, 1 Jan 2002, Renaud Lancelot wrote:> Dear all, > > Has anyone written functions to compute (and ideally project / plot onto > a plane) confidence ellipsoids for q linear model parameters, q > 2 ? > > Greetings and best wishes, > > Renaud > > -- > Dr Renaud Lancelot, v?t?rinaire > CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) > Programme Productions Animales > http://www.cirad.fr/presentation/programmes/prod-ani.shtml > > ISRA-LNERV tel (221) 832 49 02 > BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD) > Senegal e-mail renaud.lancelot at cirad.fr > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Jesus, Thanks for your reply. I was aware of the ellipse functions in package car but not in this one. However, ellipsoid is limited to 2-dimension problems in both packages. In the model I have to deal with, there are 3 parameters corresponding to 2 continuous explanatory variables and their interaction (in a binary logistic regression). Main effects parameters are negatively correlated (r = -0.6) while the interaction is positively correlated (r = 0.3) with one of the main effect. Therefore, I need to account for all these correlations in estimating a confidence ellipsoid for the 3 parameters: pairwise confidence regions will be too narrow. Best regards, Renaud Jesus Maria Frias Celayeta wrote:> > Dear Renaud, > Have a look to the package ellipse at the CRAN repository, and > particularly to ellipse.lm(). > > This function produces the ellipsoidal outline of a pairwise condence > region for a linear model t. > > Usage > > ellipse(x, which = c(1, 2), level = 0.95, t = sqrt(2 * qf(level, 2, > x$df.residual)), ...) > > You can produce pairwise regions for any two parameters in a > linear fit that you can plot afterwards. Is that what you want?. > > Happy new year to all the R-helpers, > > IOsu > > Jesus Maria Frias Celayeta, PhD. > Process Engineering Department > University College Cork. Ireland > phone: 353-21-4903097 > fax: 353-21-4270249 > http://www.ucc.ie/acad/departments/processeng/staff/friasj.html > > On Tue, 1 Jan 2002, Renaud Lancelot wrote: > > > Dear all, > > > > Has anyone written functions to compute (and ideally project / plot onto > > a plane) confidence ellipsoids for q linear model parameters, q > 2 ? > >-- Dr Renaud Lancelot, v?t?rinaire CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) Programme Productions Animales http://www.cirad.fr/presentation/programmes/prod-ani.shtml (Fran?ais) http://www.cirad.fr/presentation/en/program-eng/prod-ani.shtml (English) ISRA-LNERV tel (221) 832 49 02 BP 2057 Dakar-Hann fax (221) 821 18 79 (CIRAD) Senegal e-mail renaud.lancelot at cirad.fr -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Renaud, At 10:51 PM 1/1/2002 +0000, Renaud Lancelot wrote:>Dear all, > >Has anyone written functions to compute (and ideally project / plot onto >a plane) confidence ellipsoids for q linear model parameters, q > 2 ?(I also read the subsequent messages on this topic. I'm not sure that I understand why you want to do what you suggest, but if I interpret the question properly, you should be able to proceed as follows.) The confidence ellipse for a pair of coefficients is just (with an adjustment for size) the perpendicular shadow of the joint ellipsoid, in the same sense that the confidence intervals for individual coefficients are shadows of the joint ellipsoid or ellipse. The usual confidence ellipse for 2 of q coefficients uses qf(.95, 2, df.error) to scale the ellipse; if you want to scale the ellipse as a literal shadow of the joint confidence region for all q coefficients, use qf(.95, q, df.error) instead (which produces a smaller ellipse). You can do this by simply editing confidence.ellipse.lm in car. I hope that this helps. John ----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._