vpc: Variance partition coefficient

Description Usage Arguments Details Value

View source: R/analysis_functions.R

Description

Reports the proportion of variance attributable to the latent Gaussian process.

Usage

1
vpc(lg, covariates, rr = FALSE)

Arguments

lg

Output from a call to lgcp

covariates

A spatialPolygonsDataFrame covering the area of interest and containing the covariate and population density data. Typically the same object as specified in the covariates argument in the call to lgcp.

rr

Whether to report the VPC for the log relative risk (TRUE) or for the log incidence (FALSE)

Details

The total variance in either the log incidence or log relatve risk can be partitioned into observed and latent components. It is assumed that the log incidence and log relative risk are normally distributed so that the VPC is equal to the variance of the latent Gaussian field over the total variance. The variance depends on the intensity of the Poisson process so vpc reports quantiles of the distribution of the variance partition coeffient across the predicted values.

Value

Prints the quantiles of the VPC. An object called outl is exported to the global environment which contains the samples from the model. Used to reduce loading time of samples. This object is large so remove if no further analysis required.


realTimeSurv documentation built on May 18, 2021, 9:07 a.m.