38 lines
644 B
Fortran
38 lines
644 B
Fortran
|
|
SUBROUTINE ebayesthresh(m,x,stdest,muhat)
|
|
implicit none
|
|
|
|
integer :: m
|
|
real*8 :: x(m),stdest,muhat(m)
|
|
|
|
real*8 :: minstd,temp_stdest(m),tempx(m),weight,pi
|
|
integer :: maxiter
|
|
|
|
maxiter = 50
|
|
minstd = 1.0e-9
|
|
pi = 3.1415926
|
|
if(stdest<minstd) then
|
|
temp_stdest = minstd
|
|
else
|
|
temp_stdest = stdest
|
|
end if
|
|
|
|
tempx = x/temp_stdest
|
|
call weightfromdata(m,tempx,30,weight)
|
|
call postmedcauchy(m,tempx,weight,maxiter,muhat)
|
|
|
|
muhat = muhat*temp_stdest
|
|
|
|
end subroutine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|