[R] termplot intervals - SE or CI?

Eric Goodwin Eric.Goodwin at cawthron.org.nz
Thu Jan 11 20:52:44 CET 2018


Peter,

Thanks very much.  Good spotting, and that confirms what I'd deduced from the code.

I think you're right that it would be useful to either make that explicit in the definition of the se argument (and in the description, which also describes them as standard errors), or expose the ff argument of the se.lines() function, so that it can be set during the call to termplot(), by the user.  The selection of 2.0 as a scaling factor is presumably an approximation of 1.96, to give roughly 95% confidence intervals, but it's possible users might want to specify some other scaling factor.

Cheers,

Eric Goodwin

-----Original Message-----
From: peter dalgaard [mailto:pdalgd at gmail.com] 
Sent: Thursday, 11 January 2018 21:29
To: Eric Goodwin <Eric.Goodwin at cawthron.org.nz>
Cc: Duncan Murdoch <murdoch.duncan at gmail.com>; r-help at R-project.org
Subject: Re: [R] termplot intervals - SE or CI?

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










#####################################################################################

Note:
This message is for the named person's use only.  It may contain confidential, proprietary or legally privileged information.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the 
sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Cawthron reserves the right to monitor all e-mail communications through its networks. Any opinions expressed in this 
message are those of the individual sender, except where the message states otherwise and the sender is authorised to make that statement.

This e-mail message has been scanned and cleared by MailMarshal 
#####################################################################################


More information about the R-help mailing list