Description Usage Arguments Model terms for tnam References See Also

The function `tnam`

is used to fit (temporal) network
autocorrelation models.

The function `tnamdata`

can be used alternatively to
create a data frame containing all the data ready for estimation.
This may be useful when a non-standard model should be estimated,
like a tobit model or a model with zero inflation, for example.

Both functions accept a formula containing several model terms.
The model terms are themselves functions which can be called
separately. For example, one model term is called `netlag`

.
This model term can be part of the formula handed over to the
`tnam`

function, or `netlag`

can be called directly
in order to create a single variable.

This help page describes the different model terms available in
(temporal) network autocorrelation models. See the
`tnam`

help page for details on the model.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ```
attribsim(y, attribute, match = FALSE, lag = 0,
normalization = c("no", "row", "column"), center = FALSE,
coefname = NULL)
centrality(networks, type = c("indegree", "outdegree", "freeman",
"betweenness", "flow", "closeness", "eigenvector",
"information", "load", "bonpow"), directed = TRUE, lag = 0,
rescale = FALSE, center = FALSE, coefname = NULL, ...)
cliquelag(y, networks, k.min = 2, k.max = Inf, directed = TRUE,
lag = 0, normalization = c("no", "row", "column"),
center = FALSE, coefname = NULL)
clustering(networks, directed = TRUE, lag = 0, center = FALSE,
coefname = NULL, ...)
covariate(y, lag = 0, exponent = 1, center = FALSE,
coefname = NULL)
degreedummy(networks, deg = 0, type = c("indegree", "outdegree",
"freeman"), reverse = FALSE, directed = TRUE, lag = 0,
center = FALSE, coefname = NULL, ...)
interact(x, y, lag = 0, center = FALSE, coefname = NULL)
netlag(y, networks, lag = 0, pathdist = 1, decay = pathdist^-1,
normalization = c("no", "row", "column", "complete"),
reciprocal = FALSE, center = FALSE, coefname = NULL, ...)
structsim(y, networks, lag = 0, method = c("euclidean",
"minkowski", "jaccard", "binary", "hamming"), center = FALSE,
coefname = NULL, ...)
weightlag(y, networks, lag = 0, normalization = c("no", "row",
"column"), center = FALSE, coefname = NULL)
``` |

`attribute` |
A vector, list of vectors or data frame with the same dimensions as |

`center` |
Should the model term be centered? That is, should the mean of the variable be subtracted from the actual value at each time step? |

`coefname` |
An additional name that is used as part of the coefficient label for easier identification in the summary output of the model. |

`decay` |
For each value in |

`deg` |
The degree (e.g., |

`directed` |
Is the input matrix or network a directed network? |

`exponent` |
The exponent of a covariate. For example, |

`k.max` |
Maximal clique size. |

`k.min` |
Minimal clique size. |

`lag` |
The temporal lag. The default value 0 means there is no lag. A value of 1 would specify a single-period lag, that is, current behavior is modeled conditional on previous influence. A value of 2 would specify a two-period lag, that is, current behavior is modeled conditional on pre-previous influence, etc. |

`match` |
If |

`method` |
The distance function used for computing structural similarity. Possible values are |

`networks` |
The network(s) for computing the peer influence, also known as the weight matrix. This can be a matrix or a network object (for a single time step) or a list of matrices or network objects (for multiple time steps). |

`normalization` |
Possible values: If If If If |

`pathdist` |
An integer or a vector of integers. For example, if |

`reciprocal` |
If |

`rescale` |
Should the centrality index be rescaled between 0 and 1? |

`reverse` |
Reverse the selection of degrees. For example, when |

`type` |
The type of centrality measure. Possible values are |

`x` |
A variable that should be interacted with |

`y` |
The outcome or behavior variable. Either a vector (for a single time step) or a list of vectors with named elements in each vector (for multiple time steps) or a data frame with row names where each column is one time step (for multiple time steps). |

`...` |
Additional arguments to be handed over to subroutines. |

`tnam`

- attribsim
*Spatial lag based on attribute similarity*The`attribsim`

model term computes a similarity matrix based on the`attribute`

argument and uses this similarity matrix to construct a spatial lag by multiplying the similarity matrix and the outcome vector`y`

. The intuition behind this model term is that node i's behavior may be influenced by node j's behavior if nodes i and j are similar on another dimension. For example, if i and j both smoke while k does not smoke, j's alcohol consumption may affect i's alcohol consumption to a larger extent than node k's alcohol consumption. In this example, the`y`

outcome variable is alcohol consumption and the`attribute`

argument is smoking. If`match = FALSE`

, the absolute similarity between i and j is computed by subtracting j's attribute value from i's attribute value and taking the absolute value to construct the similarity matrix. If`match = TRUE`

, the function computes a matrix containing values of 1 if i and j have the same attribute value and 0 otherwise. A scenario where the`attribsim`

model term makes sense is degree assortativity: if i and j have the same degree centrality, they may be inclined to learn from each other's behavior, even in the absence of a direct connection between them.- centrality
*Node centrality*The`centrality`

model term computes a centrality index for the nodes in a network or matrix. This can capture important structural effects because being central often implies certain constraints or opportunities more peripheral nodes do not have. For example, central nodes in a network of employees might be able to perform better.- cliquelag
*Spatial lag of k-clique co-members*The`cliquelag`

model term computes a clique co-membership matrix and multiplies this matrix with the outcome variable. The intuition behind this is that in some settings individuals may be influenced to a particularly strong extent by peers in the same cliques. A clique is defined as a maximal connected subgraph of size k. For example, a deviant behavior of a person may be conditioned by the deviant behavior of the person's friends – but only if these friends are tied to each other as well so that a clique among these persons exists. A minimal and a maximal`k`

may be defined, where`k`

is the size of the cliques. In the clique co-membership matrix, all cliques with`k.min <= k <= k.max`

are included.- clustering
*Local clustering coefficient*, or*transitivity*The`clustering`

model term computes the local clustering coefficient, which is also known as transitivity. This index has high values if the direct neighborhood of a node is densely interconnected. For example, if one's friends are friends with each other, this may have repercussions on ego's behavior.- covariate
*Exogenous nodal covariate*The`covariate`

model term adds an exogenous nodal covariate to the model. For example, when performance of employees is modeled, a covariate could be seniority of these employees. It is possible to add lagged covariates to model the effect of past nodal attributes on current behavior. Similarly, this model term can be used to add autoregressive terms, that is, the effect of previous behavior on current behavior.- degreedummy
*Dummy variable for degree centrality values*The`degreedummy`

model term controls for specific degree centralities or ranges of degree centrality. For example, do nodes with a degree of 0 (isolates) show different behavior than nodes who are connected? Or do nodes with a degree centrality larger than three exert different behavior?- interact
*Interactions between other model terms*The`interact`

model term adds an interaction effect between two other model terms by multiplying the result vectors of these two model terms. When using interaction terms, centering the result is recommended. Note that only the interaction term is created; the main effects must be introduced to the model using the other model terms.- netlag
*Spatial network lag*The`netlag`

model term captures the autocorrelation inherent in networks. For example, when political actors are members of a policy network, their success of achieving policy outcomes is not independent from each other. Most likely, being connected to policy winners increases the success rate. In many settings, indirect effects may be important as well: how does the behavior of my friends' friends affect my own behavior? In some contexts, spatio-temporal lags are useful: how does the past behavior of my friends affect my current behavior? The`netlag`

model term is designed for binary networks because things like indirect effects, restriction to reciprocal dyads, decay of indirect relations etc. is possible. For weighted networks, the`weightlag`

term is recommended. If no other arguments are specified and loops are absent and a binary matrix is used, both model terms produce the same results.- structsim
*Structural similarity*The`structsim`

model term computes the structural similarity with other nodes in the network and multiplies this similarity matrix with the outcome variable. The intuition is that behavior is sometimes affected by comparison with structurally similar nodes. For example, a worker may be impressed by the performance of other workers who are embedded in the same team or who report to the same bosses. As with the other model terms, temporal lags are possible.- weightlag
*Weighted spatial lag*The`weightlag`

model term captures spatial autocorrelation in weighted networks. For example, the GDP per capita of a country may be affected by the GDP of proximate other countries or by the GDP of trade partners. In these cases, indirect contacts etc. do not make any sense, therefore the distinction between the`weightlag`

and the`netlag`

model term. The weight matrix is multiplied by the outcome variable, possibly after row or column normalization.

Leenders, Roger Th. A. J. (2002):
Modeling Social Influence through Network Autocorrelation:
Constructing the Weight Matrix. *Social Networks* 24: 21–47.
http://dx.doi.org/10.1016/S0378-8733(01)00049-1.

Daraganova, Galina and Garry Robins (2013): Autologistic Actor Attribute Models. In: Lusher, Dean, Johan Koskinen and Garry Robins, "Exponential Random Graph Models for Social Networks: Theory, Methods, and Applications", Cambridge University Press, chapter 9: 102–114.

Hays, Jude C., Aya Kachi and Robert J. Franzese Jr. (2010):
A Spatial Model Incorporating Dynamic, Endogenous Network
Interdependence: A Political Science Application.
*Statistical Methodology* 7: 406–428.
http://dx.doi.org/10.1016/j.stamet.2009.11.005

tnam-package tnam tnamdata knecht

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.