summaryGspline1            package:glmmAK            R Documentation

_S_u_m_m_a_r_y _f_o_r _a _u_n_i_v_a_r_i_a_t_e _G-_s_p_l_i_n_e (_p_e_n_a_l_i_z_e_d _G_a_u_s_s_i_a_n _m_i_x_t_u_r_e)

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

     This function is primarily designed to work out the MCMC output
     from functions 'cumlogitRE' and 'logpoissonRE' in which a
     distribution of the univariate random effect was specified as a
     G-spline. It computes posterior pointwise mean and quantiles for a
     G-spline density based on the MCMC output.

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

     summaryGspline1(x, mu, sigma,
        standard=TRUE, intcpt, scale,
        probs, values=FALSE,
        dir=getwd(), wfile="logweight.sim", header=TRUE, logw=TRUE,
        skip=0, nwrite)

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

       x: grid of values at which we want to evaluate the G-spline
          density

      mu: a vector with G-spline knots (means of basis G-splines)

   sigma: basis standard deviation(s). If a single number is supplied
          then it is assumed that all basis G-splines have the same
          standard deviation. Alternatively a vector of the same length
          as 'mu' can be given in which case the basis G-splines do not
          necessarily have the same standard deviations

standard: logical, if 'TRUE' then the standardized (zero-mean,
          unit-variance) G-spline densities are computed and summarized

  intcpt: a vector with sampled intercept values. If not supplied it is
          assumed that all intercepts are equal to zero.    

          It does not have to be supplied if 'standard=TRUE'. 

   scale: a vector with sampled values of the G-spline scale (in most
          of my papers denoted by tau) If not supplied it is assumed
          that all scale values are equal to one.

          It does not have to be supplied if 'standard=TRUE'. 

   probs: probabilities for which the (pointwise) sample quantiles of
          the G-spline density should be computed.

          If not given only average (and values) of the G-spline are
          computed

  values: if 'TRUE' also values of the G-spline at each (MCMC)
          iteration are returned.

          If 'FALSE' only sample mean (and quantiles) of the G-spline
          are returned

     dir: character giving the directory where the file with (sampled)
          G-spline (log-)weights is stored

   wfile: character giving the name of the file with (sampled) G-spline
          (log-)weights

  header: logical indicating whether the file 'wfile' contains a header

    logw: logical indicating whether the file 'wfile' contains
          logarithms of the weights

    skip: number of data rows that should be skipped at the beginning
          of the file 'wfile'

  nwrite: frequency with which is the user informed about the progress
          of computation (every 'nwrite'th iteration count of
          iterations change)

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

     A list with the following components (component 'values' is
     present only when the argument 'values' was 'TRUE'): 

 summary: a 'data.frame' with the following columns (the description
          below applies to the situation when 'probs=0.5'):

            'x'     a grid of values at which the G-spline density is evaluated
            'Mean'  pointwise posterior mean of the G-spline density
            '50%'   pointwise posterior 50% quantile of the G-spline density.
                    There is one column of this type for each 'probs' value

  values: a matrix with one column for each 'x' value and number of
          rows equal to the length of the MCMC. In each row, there is a
          G-spline density evaluated at one MCMC iteration.

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

     Arno&#353t Kom&#225rek arnost.komarek[AT]mff.cuni.cz

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

     ### See ex-Toenail.pdf, ex-Toenail.R
     ### and ex-Epileptic.pdf, ex-Epileptic.R
     ### available in the documentation
     ### to the package

