toy                 package:emulator                 R Documentation

_A _t_o_y _d_a_t_a_s_e_t

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

     A matrix consisting of 10 rows and 6 columns corresponding to 10
     points in  a six-dimensional space.

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

     data(toy)

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

          data(toy)
          real.relation <- function(x){sum( (1:6)*x )}

          d <- apply(toy, 1, real.relation)

          # Supply some scales:
          fish <- rep(2,6)

          # Calculate the A matrix:
          A <- corr.matrix(toy,scales=fish , power=1.5)
          Ainv <- solve(A)

          # Now add some suitably correlated noise:
          d.noisy <- as.vector(rmvnorm(n=1,mean=d, 0.1*A))

          # Choose a point:
          x.unknown <- rep(0.5,6)

          # Now use interpolant:
          interpolant(x.unknown, d.noisy, toy, Ainv, scales=fish, g=FALSE)

          # Now verify by checking the first row of toy:
          interpolant(toy[1,], d.noisy, toy, Ainv, scales=fish, g=FALSE)
          # Should match d.noisy[1].

