checkNorm | R Documentation |
Given an object of class synlik
this routine provides a
graphical check of whether the distribution of the random
summary statistics is multivariate normal.
checkNorm(object, param = object@param, nsim = 1000, observed = NULL,
cex.axis = 1, cex.lab = 1, ...)
object |
An object of class |
param |
A vector of model's parameters at which the summary statistics will be simulated. |
nsim |
number of summary statistics to be simulated if object is of class |
observed |
A vector of observed summary statistics. By default |
cex.axis |
Axis scale expansion factor. |
cex.lab |
Axis label expansion factor. |
... |
additional arguments to be passed to |
The method is from section 7.5 of Krzanowski (1988). The replicate vectors of summary statistic S
are transformed to variables which should be univariate chi squared r.v.s with DoF given by the number of rows of S
.
An appropriate QQ-plot is produced, and the proportion of the data differing substantially from the ideal
line is reported. Deviations at the right hand end of the plot indicate that the tail behaviour of the Normal
approximation is poor: in the context of synthetic likelihood this is of little consequence.
Secondly, s
is transformed to a vector which should be i.i.d. N(0,1) under
multivariate normality, and a QQ plot is produced. Unfortunately this approach is not very
useful unless the dimension of s
is rather large. In simulations, perfectly MVN data produce
highly variable results, so that the approach lacks any real power.
Mainly produces plots and prints output. Also an array indicating proportion of simulated statistics smaller than observed.
Simon N. Wood, maintained by Matteo Fasiolo <matteo.fasiolo@gmail.com>.
Krzanowski, W.J. (1988) Principles of Multivariate Analysis. Oxford.
#### Create Object
data(ricker_sl)
#### Simulate from the object
ricker_sl@data <- simulate(ricker_sl)
ricker_sl@extraArgs$obsData <- ricker_sl@data
#### Checking multivariate normality
checkNorm(ricker_sl)
# With matrix input
checkNorm(matrix(rnorm(200), 100, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.