strand_VPCs: Organize Stan output and provide summaries of variance...

View source: R/strand_VPCs.R

strand_VPCsR Documentation

Organize Stan output and provide summaries of variance parameters

Description

This is a function to organize Stan output and provide summaries of key model parameters

Usage

strand_VPCs(
  input,
  n_partitions = 4,
  HPDI = 0.9,
  include_reciprocity = FALSE,
  mode = "cor",
  include_samples = FALSE,
  plot_pairs = FALSE,
  plot_type = "vpcs",
  plot_layer = NULL,
  verbose = FALSE
)

Arguments

input

A STRAND model object with social relations model parameters.

n_partitions

Should variance on latent scale be partioned into 3 factors (focal, target, dyadic+error) as in amen? Or 4 factors (focal, target, dyadic, error)?

HPDI

Highest Posterior Density Interval. Ranges in (0,1).

include_reciprocity

Should reciprocity estimates be returned?.

mode

Should the dyadic correlation "cor" be computed, or the dyadic covariance "cov", or the adjusted dyadic+error correlation "adj".

include_samples

An indicator for the user to specify if raw samples, or only the summary statistics should be returned. Samples can take up a lot of space.

plot_pairs

A Boolean to plot pairs of the variance terms.

plot_type

Should the raw variances be plotted: "raw", or should the variance partition coefficients: "vpcs"?

plot_layer

The name of the layer to plot.

verbose

If TRUE prints the results.

Value

A STRAND results object.

Examples

## Not run: 
res = strand_VPCs(input=fit)

## End(Not run)


ctross/STRAND documentation built on Dec. 15, 2024, 6:02 a.m.