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)

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.

Details

Creates a data frame of effects for use in siena model fits. 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, each part of which relates to one dependent variable in the input object, with columns

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

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.

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, sienaDataCreate, includeEffects, setEffect, print.sienaEffects

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

RSiena documentation built on Dec. 6, 2018, 3:01 p.m.