[R] termplot intervals - SE or CI?

peter dalgaard pdalgd at gmail.com
Thu Jan 11 09:29:00 CET 2018


From ?termplot:

col.se, lty.se, lwd.se: color, line type and line width for the
          ‘twice-standard-error curve’ when ‘se = TRUE’.

...which is findable, but might usefully also be made explicit in the definition of the se= argument.

-pd

> On 10 Jan 2018, at 23:27 , Eric Goodwin <Eric.Goodwin at cawthron.org.nz> wrote:
> 
> Thanks for your prompt reply Duncan.  
> 
> I had indeed assumed they were what the help file says until observation raised doubts, which is why I queried it.
> 
> From reading the code for termplot(), it seems that either the predict() function doesn't return the 1x standard error, or the curves plotted by the termplot() function are not 1x standard errors.  If they're not 1x standard errors, it seems misleading to call them (e.g. in the help file) "standard errors".
> 
> The "se.fit" returned by a call in termplot() to predict() is multiplied by 2 (in termplot's function se.lines()) before it is plotted as a curve described as "standard errors" by the help file.
> 
> Thus, again, it seems that either termplot() is not plotting standard errors, or predict() is not returning standard errors in se.fit.
> 
> Cheers,
> 
> Eric
> 
> -----Original Message-----
> From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] 
> Sent: Wednesday, 29 June 2016 12:02
> To: Eric Goodwin <Eric.Goodwin at cawthron.org.nz>; r-help at R-project.org
> Subject: Re: [R] termplot intervals - SE or CI?
> 
> On 28/06/2016 4:53 PM, Eric Goodwin wrote:
>> Hello,
>> 
>> A reviewer queried what the intervals were on the termplot I provided in a report.  The help file for termplot() suggests they're standard errors (se=T), but in the code the se.fit values from predict() are multiplied by 2, suggesting it's a rough 95% confidence interval, is that right?
> 
> I would assume they are what the help file says, but if I wasn't sure, I'd work them out for a simple case from first principles, and compare to what the code gives.
> 
> Duncan Murdoch
> 
> 
>> Many thanks,
>> 
>> Eric Goodwin
>> Scientific data analyst | Coastal and Freshwater Group Cawthron 
>> Institute Phone +64 (0)3 548 2319 | Mobile 027 439 1141 
>> eric.goodwin at cawthron.org.nz<mailto:eric.goodwin at cawthron.org.nz> | 
>> www.cawthron.org.nz<http://www.cawthron.org.nz/>
>> 
>> 
>> ######################################################################
>> ###############
>> 
>> Note:
>> This message is for the named person's use only.  It=2...{{dropped:30}}
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list