Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

includeGMoMStatistics

Function to include GMoM statistics in a Siena model


Description

This function can be used for including one or more GMoM statistics by modifying a Siena effects object.

Usage

includeGMoMStatistics(myeff, ..., include=TRUE, name=myeff$name[1],
                        interaction1="", interaction2="",
                        character=FALSE, verbose=TRUE)

Arguments

myeff

a Siena effects object as created by getEffects

...

short names to identify the GMoM statistics which should be included or excluded.

include

Boolean; default TRUE, but can be switched to FALSE to turn off an effect.

name

Name of dependent variable (network or behavior) for which statistics are being included. Defaults to the first in the effects object.

interaction1

Name of siena object where needed to completely identify the effects e.g. covariate name or behavior variable name.

interaction2

Name of siena object where needed to completely identify the effects e.g. covariate name or behavior variable name.

character

Boolean: are the statistic names character strings or not.

verbose

Boolean: should the print of altered statistic be produced.

Details

The names interaction1 and interaction2 refer to the dependence of the GMoM statistics on other variables in the data set. The arguments should identify the GMoM statistic completely. The type does not have to be specified, as it is gmm for all GMoM statistiscs in the effects object.
The short names must not be set between quotes, unless you use character=TRUE.

The function includeGMoMStatistics operates as an interface setting the "include" column on selected rows of the effects object, to the value requested (TRUE or FALSE).

Value

An updated version of the input effects object, with the include column for one or more rows updated. Details of the rows altered will be printed.

Author(s)

Viviana Amati.

References

See Also

Examples

mynet1 <- sienaDependent(array(c(s501, s502, s503), dim=c(50, 50, 3)))
  mybeh  <- sienaDependent(s50a, type="behavior")
  mydata <- sienaDataCreate(mynet1, mybeh)
  myeff <- getEffects(mydata)
  myeff <- includeGMoMStatistics(myeff, egoX_gmm, interaction1="mybeh")
  myeff

RSiena

Siena - Simulation Investigation for Empirical Network Analysis

v1.3.0
GPL-2 | GPL-3 | file LICENSE
Authors
Tom A.B. Snijders [cre, aut] (<https://orcid.org/0000-0003-3157-4157>), Ruth Ripley [aut], Christian Steglich [aut, ctb] (<https://orcid.org/0000-0002-9097-0873>), Johan Koskinen [aut, ctb] (<https://orcid.org/0000-0002-6860-325X>), Nynke Niezink [aut, ctb], Viviana Amati [aut, ctb] (<https://orcid.org/0000-0003-1190-1237>), Christoph Stadtfeld [ctb] (<https://orcid.org/0000-0002-2704-2134>), James Hollway [ctb] (IHEID, <https://orcid.org/0000-0002-8361-9647>), Per Block [ctb], Robert Krause [ctb], Charlotte Greenan [ctb], Josh Lospinoso [ctb], Michael Schweinberger [ctb] (<https://orcid.org/0000-0003-3649-5386>), Mark Huisman [ctb], Krists Boitmanis [ctr], Felix Schoenenberger [ctb], Mark Ortmann [ctb], Marion Hoffman [ctb], Robert Hellpap [ctb], Alvaro Uzaheta [ctb]
Initial release
2021-05-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.