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