Learn R Programming

activityGCMM (version 1.1.1)

GCMMppc: Posterior predictive check of GCMM model

Description

Conduct posterior predictive check (PPC) by simulating data from fitted GCMM model and plotting against observed data

Usage

GCMMppc(model, YExp = NULL, clustID = NULL)

Arguments

model

Object of class GCMM with output from GCMM function; if YExp and clustIDs are not provided as vectors, the GCMM model must contain this information using the arguments saveYExp=TRUE and saveclustIDs=TRUE

YExp

Vector of YExp values from GCMM function; see also GCMM

clustID

Vector of clustID values from GCMM function; see also GCMM

Value

Returns vector of simulated values and prints plot of simulated and raw values

Examples

Run this code
# NOT RUN {
  FoxGCMMPPC<-GCMM(data=redfoxsample$Radians, RE1=redfoxsample$CameraTrapID, family="vonmises", 
    saveclustIDs=TRUE, saveYExp=TRUE,
    scale=c("2pi"), autorun=FALSE, adapt=0, sample=300, burnin=300, thin=1) 
  FoxPPC<-GCMMppc(FoxGCMMPPC)  
# }

Run the code above in your browser using DataLab