GCMMppc: Posterior predictive check of GCMM model

Description Usage Arguments Value Examples

View source: R/ModelFitFunctions.R

Description

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

Usage

1
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

1
2
3
4
5
 
  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)  

activityGCMM documentation built on June 15, 2021, 1:06 a.m.