wxyz                package:agricolae                R Documentation

_C_o_m_p_l_e_t_i_n_g _m_i_s_s_i_n_g _d_a_t_a _o_f _a _m_a_t_r_i_x _a_c_c_o_r_d_i_n_g _t_o _a _m_o_d_e_l

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

     It generates an information matrix z=f(x, y). It uses a linear
     model to complete the cells without information.

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

     wxyz(model, x, y, z)

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

   model: obtained by 'lm' 

       x: vector 'x' 

       y: vector 'y' 

       z: vector 'z' relation of 'x' e 'y' 

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

   model: obtained by 'lm' 

       x: Numeric 

       y: Numeric 

       z: Numeric 

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

     Felipe de Mendiburu

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

     'grid3p '

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

     library(agricolae)
     x<-c(1,3,5,2,3,1)
     y<-c(2,5,4,3,2,3)
     z<-c(4,10,NA,6,7,NA)
     modelo<-lm(z~x+y)
     zz<-wxyz(modelo,x,y,z)
     # The response surface
     x<-as.numeric(rownames(zz))
     y<-as.numeric(colnames(zz))
     #startgraph
     persp(x,y,zz, cex=0.7,theta = -20, phi = 30,shade= 0.2,nticks = 6, col = 'green' ,
     ticktype = 'detailed',xlab = 'X', ylab = 'Y', zlab = 'Response')
     #endgraph

