Learn R Programming

sns (version 1.0.0)

summary.sns: Summarizing "sns" Objects

Description

Methods for summarizing the output of sns.run, and for printing the summary.

Usage

## S3 method for class 'sns':
summary(object, quantiles = c(0.025, 0.5, 0.975)
  , pval.ref = 0.0, nburnin = max(nrow(object)/2, attr(object, "nnr"))
  , end = nrow(object), thin = 1, ess.method = c("coda", "ise"), ...)
## S3 method for class 'summary.sns':
print(x, ...)

Arguments

object
An object of class "sns", typically the output of sns.run.
quantiles
Values for which sample-based quantiles are calculated.
pval.ref
Reference value for state space variables, used for calculating sample-based p-values.
nburnin
Number of initial iterations to discard before calculating the sample statistics. A warning is issued if this number is smaller than the initial iterations run in NR mode.
end
Last iteration to use for calculating sample statistics. Defaults to last iteration.
thin
One out of thin samples are kept for calculating sample statistics. Default is 1, using all samples within specified range.
ess.method
Method used for calculating effective sample size. Default is to call effectiveSize from package coda.
x
An object of class "summary.sns", typically the output of summary.sns.
...
Arguments passed to/from other functions.

Value

  • summary.sns returns a list with these elements:
  • KDimensionality of state space.
  • nnrNumber of NR (Newton-Raphson) iterations performed at the beginning.
  • nburninNumber of burn-in iterations. These are discarded before calculating sample statistics.
  • endLast iteration to use for calculating sample statistics.
  • thinOne out of every thin iterations within the specified range is used for calculating sample statistics.
  • niterTotal iterations, including NR and MCMC modes.
  • nsmpNumber of samples within specified range (before applying thinning).
  • nseqNumber of samples used for calculating sample statistics (after applying thinning).
  • npartNumber of subsets used in state space partitioning. If no partitioning is done, the value is 1.
  • accept.rateAcceptance rate for the MH transition proposals, calculated over nsmp iterations.
  • reldev.meanMean relative deviation from quadratic approximation, defined as difference between actual log-density change and the value predicted from quadratic fit at density maximum, divided by the actual change. The location of density maximum is assumed to be the value at the end of the last NR iteration. Therefore, for this measure to be accurate, users must ensure nnr is sufficiently large to allow for convegrence of the optimization phase.
  • pval.refSame as input.
  • ess.methodSame as input.
  • smpA list with elements mean, sd, ess, quantiles, pval representing sample-based mean, standard deviation, effective size, and quantiles, based on specified range and using thinning (if specified).

See Also

sns, sns.run