strand_caterpillar_plot: A function to create a STRAND data object

View source: R/strand_caterpillar_plot.R

strand_caterpillar_plotR Documentation

A function to create a STRAND data object

Description

This function organizes network data and covariates into a form that can be used by STRAND for model fitting. All STRAND model fitting functions require their data to be supplied in the format exported here.

Usage

strand_caterpillar_plot(
  results,
  submodels = NULL,
  normalized = FALSE,
  only_slopes = FALSE,
  only_technicals = FALSE,
  site = "BOB",
  export_as_table = FALSE
)

Arguments

results

The results object from summarize_strand_results.

submodels

Which submodels to plot? Supported: "False positive rate", "Recall of true ties", "Theta: question-order effects", "Focal effects: Out-degree", "Target effects: In-degree", "Dyadic effects", "Other estimates"

normalized

Should effects be normalized? Do not use for correlations and variance terms.

only_slopes

If TRUE then technical parameters are omited, and only slopes and intercepts are plotted.

only_technicals

If TRUE then technical parameters are plotted, and slopes and intercepts are omited

site

A string to indicate group or feildsite.

export_as_table

If TRUE, the data are not plotted, and a data.frame is returned. This is useful for making complex ggplot objects with multiple groups/sites.

Value

A plot or dataframe

Examples

## Not run: 
vis = strand_caterpillar_plot(res, submodel=c("Focal efffects: Out-degree",
                                              "Target effects: In-degree",
                                              "Dyadic effects","Other estimates"), 
                                   normalized=TRUE, 
                                   site="XY", 
                                   only_technicals=TRUE, 
                                   export_as_table=FALSE
                                    )

## End(Not run)


ctross/STRAND documentation built on Nov. 14, 2024, 11:50 p.m.