Learn R Programming

RSiena (version 1.1-232)

includeEffects: Function to include effects in a Siena model

Description

This function provides an interface to set the include column on selected rows of a Siena effects object

Usage

includeEffects(myeff, ..., include = TRUE, name = myeff$name[1],
 type = "eval", interaction1 = "", interaction2 = "", character=FALSE)

Arguments

myeff

a Siena effects object as created by getEffects

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

include

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

name

Name of network for which effects are being included. Defaults to the first in the effects object.

type

Type of effects to be included: "eval", "endow", "creation", or "rate".

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 effect names character strings or not

Value

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

Details

The effects indicated by the arguments …, type, and (if necessary) interaction1 and interaction2 are included or excluded from the model specified by the effects object. The names interaction1 and interaction2 do not refer to interactions between effects, but to dependence of effects on other variables in the data set. The arguments should identify the effects completely.

A list of all effects available in a given effects object (e.g., myeff), including their names of dependent variables, effect names, short names, and values of interaction1 and interaction2 (if any), is obtained by executing effectsDocumentation(myeff).

The function includeEffects operates by providing an interface to set the "include" column on selected rows of the effects object, to the value requested (TRUE or FALSE).

References

See http://www.stats.ox.ac.uk/~snijders/siena/

See Also

getEffects, setEffect, includeInteraction, effectsDocumentation

Examples

Run this code
# NOT RUN {
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 <- includeEffects(myeff, transTrip, balance)
myeff <- includeEffects(myeff, avAlt, name="mybeh", interaction1="mynet1")
myeff
# }

Run the code above in your browser using DataLab