object             package:approximator             R Documentation

_O_p_t_i_m_i_z_a_t_i_o_n _o_f _p_o_s_t_e_r_i_o_r _l_i_k_e_l_i_h_o_o_d _o_f _h_y_p_e_r_p_a_r_a_m_e_t_e_r_s

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

     Returns the likelihood of a set of hyperparameters given the data.
     Functions 'opt1()' and 'opt.gt.1()' find hyperparameters that
     maximize the relevant likelihood for level 1 and higher levels
     respectively.   Function 'object()' returns the expression given
     by equation 9 in KOH2000, which is minimized 'opt1()' and
     'opt.gt.1()'.

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

     object(level, D, z, basis, subsets, hpa)
     opt.1(D, z, basis, subsets, hpa.start, give.answers=FALSE, ...)
     opt.gt.1(level, D, z, basis, subsets, hpa.start, give.answers=FALSE, ...)

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

   level: level

       D: Design matrix for top-level code

       z: Data

   basis: Basis function

 subsets: subsets object

     hpa: hyperparameter object

hpa.start: Starting value for hyperparameter object

give.answers: Boolean, with default 'FALSE' meaning to return just the
          point estimate, and 'TRUE' meaning to return extra
          information from the call  to 'optim()'.

     ...: Extra arguments passed to 'optim()'.  A common one would be
          'control=list(trace=100)'.

_D_e_t_a_i_l_s:

     This function is the object function used in toy optimizers
     'optimal.hpa()'.

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

     Robin K. S. Hankin

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

     M. C. Kennedy and A. O'Hagan 2000. "Predicting the output from a
     complex computer code when fast approximations are available"
     Biometrika, 87(1): pp1-13

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

     'genie'

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

     data(toyapps)
     object(level=4, D=D1.toy , z=z.toy,basis=basis.toy,
        subsets=subsets.toy, hpa=hpa.fun.toy(1:19))
     object(level=4, D=D1.toy , z=z.toy,basis=basis.toy,
        subsets=subsets.toy, hpa=hpa.fun.toy(3+(1:19)))

     # Now a little example of finding optimal hyperpameters in the toy case
     # (a bigger example is given on the genie help page)
     jj <- list(trace=100,maxit=10)

     hpa.toy.level1 <- opt.1(D=D1.toy, z=z.toy, basis=basis.toy, subsets=subsets.toy, hpa.start=hpa.toy,control=jj)

     hpa.toy.level2 <- opt.gt.1(level=2, D=D1.toy, z=z.toy, basis=basis.toy, subsets=subsets.toy, hpa.start=hpa.toy.level1,control=jj)

     hpa.toy.level3 <- opt.gt.1(level=3, D=D1.toy, z=z.toy, basis=basis.toy, subsets=subsets.toy, hpa.start=hpa.toy.level2,control=jj) 

     hpa.toy.level4 <- opt.gt.1(level=4, D=D1.toy, z=z.toy, basis=basis.toy, subsets=subsets.toy, hpa.start=hpa.toy.level3,control=jj)

