SANtest                 package:mgcv                 R Documentation

_E_x_a_m_p_l_e _o_f _s_i_m_p_l_e _a_d_d_i_t_i_v_e _G_A_M _u_s_i_n_g _p_e_n_a_l_i_z_e_d _r_e_g_r_e_s_s_i_o_n _s_p_l_i_n_e_s.

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

     Provides an example of the use of `mgcv()' and `GAMsetup()' for 
     simple GAM modelling with penalized regression splines. Truth is
     simulated as the sum of  3 univariate functions of 3 covariates:
     normal errors are added to produce simulated  data. A GAM is then
     fitted using `mgcv()' (including one spurious covariate).  Scatter
     plots of data against the 4 covariates and plots of true and
     reconstructed  functions are produced. 

     Of little interest for practical analysis (see `gam' instead).

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

     SANtest(n=100, sig2=-1)

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

       n: `n' is the number of data to simulate. 

    sig2: The magnitude of `sig2' gives the error variance to use for 
          simulation of data. If `sig2' is greater than zero the UBRE
          is used with the error  variance, sigma^2, given by  `sig2',
          otherwise GCV is used.

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

     An estimate of the error variance used for simulation (GCV), or
     the error variance  (UBRE).

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

     Simon N. Wood snw@st-and.ac.uk

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

     `mgcv' `gam'

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

     SANtest(300,-1) # use GCV with 300 data point example, variance 1
     SANtest(300,0.5) # use UBRE 300 data, variance 0.5

