gamSim                 package:mgcv                 R Documentation

_S_i_m_u_l_a_t_e _e_x_a_m_p_l_e _d_a_t_a _f_o_r _G_A_M_s

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

     Function used to simulate data sets to illustrate the use of 
     'gam' and 'gamm'. Mostly used in help files to keep down  the
     length of the example code sections.

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

     gamSim(eg=1,n=400,dist="normal",scale=2)

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

      eg: numeric value specifying the example required.

       n: number of data to simulate.

    dist: character string which may be used to spcify the distribution
          of the response.

   scale: Used to set noise level.

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

     See the source code for exactly what is simulated in each case. 

_1 Gu and Wahba 4 univariate term example.

_2 A smooth function of 2 variables.

_3 Example with continuous by variable.

_4 Example with factor by variable.

_5 An additive example plus a factor variable.

_6 Additive + random effect.

_7 As 1 but with correlated covariates.

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

     Depends on 'eg', but usually a dataframe, which may also contain
     some information on  the underlying truth. Sometimes a list with
     more items, including a data frame for model fitting. See source
     code or helpfile examples where the function is used for further
     information.

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

     Simon N. Wood simon.wood@r-project.org

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

     'gam', 'gamm'

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

     ## see ?gam

