From p.dalgaard@biostat.ku.dk  Mon Apr 16 21:44:35 2001
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 16 Apr 2001 22:44:35 +0200
Subject: [Rd] PR#896
In-Reply-To: Torsten Hothorn's message of "Mon, 9 Apr 2001 18:19:10 +0200 (MEST)"
References: <Pine.LNX.4.21.0104091809580.10969-100000@artemis.imbe.med.uni-erlangen.de>
Message-ID: <x24rvo7ex8.fsf@blueberry.kubism.ku.dk>

Torsten Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de> writes:

> > c(3.770684,4.654342,3.496403,1.772743,1.624953,2.645835,3.0994
> > 77,1.706758,3.507709,1.982924)
> > y<-c(-0.8161288,0.1632923,0.6421997,1.9270846,-
> > 0.4668112,0.3587806,0.3312529,-0.5393900,
> > 0.1057892,1.7963575)
> 
> `wdiff' is used for the computation of asymptotic confidence intervals for
> samples with m,n > 50. I simulated the type I error rate and it works for
> such large sample sizes. So maybe the problems are due to n.x = n.y = 10 ?
> 
> Torsten

I think the real problem is here:

> > ol<-optimize(wdiff,c(mumin,mumax),zq=qnorm(0.05))$minimum
> > om<-optimize(wdiff,c(mumin,mumax),zq=qnorm(0.5))$minimum
> > ou<-optimize(wdiff,c(mumin,mumax),zq=qnorm(0.95))$minimum
> > 
> > abline(v=ol)
> > abline(v=om,lty=4)
> > abline(v=ou,lty=7)

Optimize() is a gradient algorithm and wdiff is not smooth, so the
algorithm terminates at a stationary non-optimal point. Using optim()
with the default Nelder-Mead instead seemed to work better, although
not perfectly. (I played with this before going on Easter holiday, and
I'm not going to reconstruct exactly what I did then just now....)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] PR#896
Peter Dalgaard BSA