awstri                  package:aws                  R Documentation

_T_h_r_e_e-_d_i_m_e_n_s_i_o_n_a_l _A_d_a_p_t_i_v_e _W_e_i_g_h_t_s _S_m_o_o_t_h_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Performes three-dimensional Adaptive Weigths Smoothing
     (depreciated version, use aws instead)

_U_s_a_g_e:

     awstri(y, lambda=3, gamma=1.3, eta =4, s2hat = NULL, kstar = length(radii),
            rmax=max(radii), weight = c(1,1,1), radii = 
            c((1:4)/2,2.3,(5:12)/2,7:9,10.5,12,13.5), control="dyadic"

_A_r_g_u_m_e_n_t_s:

       y: array of observed values

  lambda: main smoothing parameter (should be approximately 3)

   gamma: allow for increase of variances during iteration by factor
          gamma  (!!'gamma >=1') 

     eta: main control parameter (should be approximately 4)   

   s2hat: initial variance estimate (if available, can be either a
          number (homogeneous case), a matrix of same  dimension  as y
          (inhomogeneous variance) or NULL (a homogeneous variance 
          estimate will be generated in this case)

   kstar: maximal number of iterations to perform, actual number may be
           smaller depending on parameters radii and rmax

  weight: weights used for distances, determining elliptical
          neighborhoods

   radii: radii of circular neighbourhoods used

    rmax: maximal radius of neighborhood to be used, may change kstar

 control: the control step is performed in either a dyadic sceme
          ("dyadic") or using all previous estimates (otherwise)

_V_a_l_u_e:

     A list with components 

    yhat: estimates of the regression function (matrix corresponding to
          the  y's)

    shat: estimated standard deviations of yhat (conditional on the
          chosen  weights)

    args: Main arguments supplied to awstri

_N_o_t_e:

     The function assumes that the data are given on a 3D-grid 
     corresponding to the dimensionality of y.  This function is
     superseded by function aws and will be  removed in the next mayor
     version of the package.

_A_u_t_h_o_r(_s):

     Joerg Polzehl polzehl@wias-berlin.de

_R_e_f_e_r_e_n_c_e_s:

     Polzehl, J. and Spokoiny, V. (2000). _Adaptive Weights Smoothing 
     with applications to image restoration_, J.R.Statist.Soc. B, 62,
     Part 2, pp.335-354

_S_e_e _A_l_s_o:

     'aws', 'awsbi','awsuni'

_E_x_a_m_p_l_e_s:

     xy <- rbind(rep(0:30,31),rep(0:30,rep(31,31)))
     w3 <- array(0,c(31,31,31))
     w3[4:28,4:28,4:28] <- 1
     dim(w3) <- c(961,31)
     w3[((xy[1,]-15)^2+(xy[2,]-15)^2)<=144,16] <- 0
     for(i in 1:12) {
        r2 <- 144-i*i
        w3[((xy[1,]-15)^2+(xy[2,]-15)^2)<=r2,16+c(-i,i)] <- 0
     }
     dim(w3) <- c(31,31,31)
     w3[10:22,10:22,10:22] <- 1
     dim(w3) <- c(961,31)
     w3[((xy[1,]-15)^2+(xy[2,]-15)^2)<=36,16] <- 0
     for(i in 1:6) {
        r2 <- 36-i*i
        w3[((xy[1,]-15)^2+(xy[2,]-15)^2)<=r2,16+c(-i,i)] <- 0
     }
     dim(w3) <- c(31,31,31)
     sigma <- .4
     y <- w3+rnorm(w3,0,sigma)
     #  increase rmax for better results
     yhat <- awstri(y,rmax=2)
     rm(y,yhat,w3,xy)

