getEffects: Function to create a Siena effects object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/effects.r

Description

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

Usage

1
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", or "rate"

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).

Author(s)

Ruth Ripley

References

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

See Also

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

Examples

1
2
3
4
5
6
7
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

Example output

Warning message:
no DISPLAY variable so Tk is not available 
  name   effectName                      include fix   test  initialValue parm
1 mynet1 constant mynet1 rate (period 1) TRUE    FALSE FALSE    4.69604   0   
2 mynet1 constant mynet1 rate (period 2) TRUE    FALSE FALSE    4.32885   0   
3 mynet1 outdegree (density)             TRUE    FALSE FALSE   -1.46770   0   
4 mynet1 reciprocity                     TRUE    FALSE FALSE    0.00000   0   
5 mybeh  rate mybeh (period 1)           TRUE    FALSE FALSE    0.70571   0   
6 mybeh  rate mybeh (period 2)           TRUE    FALSE FALSE    0.84939   0   
7 mybeh  mybeh linear shape              TRUE    FALSE FALSE    0.32237   0   
8 mybeh  mybeh quadratic shape           TRUE    FALSE FALSE    0.00000   0   

RSiena documentation built on Sept. 24, 2020, 3 p.m.