getEffects {RSiena}R Documentation

Function to create a Siena effects object

Description

Creates a basic list of effects for all dependent variables in the input siena object.

Usage

getEffects(x, nintn = 10, behNintn=4, getDocumentation=FALSE, onePeriodSde=FALSE)

Arguments

x

an object of class 'siena" or 'sienaGroup"

nintn

Number of user-defined network interactions that can later be created.

behNintn

Number of user-defined behavior interactions that can later be created.

getDocumentation

Flag to allow documentation of internal functions, not for use by users.

onePeriodSde

Flag to indicate that the stochastic differential equation (SDE) model dZ(t) = [aZ(t) + b] dt + g dW(t) should be used, instead of the regular SDE with a scale parameter. This is only relevant in case the model includes a continuous dependent variable and one period is studied.

Details

Creates a data frame of effects for use in siena model estimation. The regular way of changing this object is by the functions includeEffects, setEffect, and includeInteraction.

Note that the class of the return object may be lost if the data.frame is edited using fix. See fix and edit.data.frame.

Value

An object of class sienaEffects or sienaGroupEffects: this is a data frame of which the rows are the effects available for data set x.
The effects object consists of consecutive parts, each of which relates to one dependent variable in the input object. The columns are:

name

name of the dependent variable

effectName

name of the effect

functionName

name of the function

shortName

short name for the effect

interaction1

second variable to define the effect, if any

interaction2

third variable to define the effect, if any

type

"eval", "endow", "creation", "rate", or "gmm"

basicRate

boolean: whether a basic rate parameter

include

boolean: include in the model to be fitted or not

randomEffects

boolean: random or fixed effect. Currently not used.

fix

boolean: fix parameter value or not

test

boolean: test parameter value or not

timeDummy

comma separated list of periods, or "all", or "," for none – which time dummy interacted parameters should be included?

initialValue

starting value for estimation, also used for fix and test.

parm

internal effect parameter values

functionType

"objective" or "rate"

period

period for basic rate parameters

rateType

"Structural", "covariate", "diffusion"

untrimmedValue

Used to store initial values which could be trimmed

effect1

Used to indicate effect number in user-specified interactions

effect2

Used to indicate effect number in user-specified interactions

effect3

Used to indicate effect number in user-specified interactions

interactionType

Defines "dyadic" or "ego" or "OK" effects, used in includeInteraction

local

whether a local effect; used for the option localML in sienaAlgorithmCreate

effectFn

here NULL, but could be replaced by a function later

statisticFn

here NULL, but could be replaced by a function later

netType

Type of dependent variable: "oneMode", "behavior", or "bipartite"

groupName

name of relevant group data object

group

sequential number of relevant group data object in total

effectNumber

a unique identifier of the row

The combination of name, shortName, interaction1, interaction2, and type uniquely identifies any effect other than basic rate effects and user-specified interaction effects. For the latter, effect1, effect2 and effect3 are also required for the identification. The combination name, shortName, period and group uniquely identifies a basic rate effect.

The columns not used for identifying the effect define how the effect is used for the estimation.

The columns initialValue and parm should not be confused: initialValue gives the initial value for the parameter to be estimated, indicated in the manual by theta; parm gives the internal value of the parameter defining the effect, indicated in the manual (Chapter 12) by p, and is fixed during the estimation.

A list of all effects 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).

As from version 1.3.24, effects object have a "version" attribute. Effects objects including interaction effects created by includeInteraction are not necessarily compatible between versions of RSiena. Therefore it is recommended, for effects objects including any interaction effects, to create them again when changing to a new version of RSiena. If an effects object including any interaction effects is used from an old version of RSiena, this will lead to a warning when running siena07.

Author(s)

Ruth Ripley

References

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

See Also

sienaDataCreate, sienaGroupCreate, includeEffects, setEffect, includeGMoMStatistics, updateSpecification, print.sienaEffects,effectsDocumentation

Examples

mynet1 <- sienaDependent(array(c(s501, s502, s503), dim=c(50, 50, 3)))
mybeh <- sienaDependent(s50a, type="behavior")
mycovar <- coCovar(rnorm(50))
mydyadcovar <- coDyadCovar(matrix(as.numeric(rnorm(2500) > 2), nrow=50))
mydata <- sienaDataCreate(mynet1, mybeh, mycovar, mydyadcovar)
myeff <- getEffects(mydata)
myeff

[Package RSiena version 1.4.7 Index]