terms.ergmm {latentnet}R Documentation

Model Terms for Latent Space Random Graph Model

Description

Model terms that can be used in an ergmm formula.

Model Terms

The latentnet package itself allows only dyad-independent terms. In the formula for the model, the model terms are various function-like calls, some of which require arguments, separated by + signs.

Random Effects

latent(d, G=0, var.mul=1/8, var=NULL, var.df.mul=1, var.df=NULL, mean.var.mul=1, mean.var=NULL, pK.mul=1, pK=NULL)
Latent position model term, with optional clustering. Adds a term to the model equal to the negative Eucledean distance -dist(Z[i],Z[j]), where Z[i] and Z[j] are the positions of their respective actors in an unobserved social space. These positions may optionally have a finite spherical Gaussian mixture clustering structure. The parameters are as follows:
d
The dimension of the latent space.
G
The number of groups (0 for no clustering).
var.mul
In the absence of var, this argument will be used as a scaling factor for a function of average cluster size and latent space dimension to set var. To set it in the prior argument to ergmm, use Z.var.mul.
var
If given, the scale parameter for the scale-inverse-chi-squared prior distribution of the within-cluster variance. To set it in the prior argument to ergmm, use Z.var.
var.df.mul
In the absence of var.df, this argument is the multiplier for the square root of average cluster size, which serves in place of var.df. To set it in the prior argument to ergmm, use Z.var.df.mul.
var.df
The degrees of freedom parameter for the scale-inverse-chi-squared prior distribution of the within-cluster variance. To set it in the prior argument to ergmm, use Z.var.df.
mean.var.mul
In the absence of mean.var, the multiplier for a function of number of vertices and latent space dimension to set mean.var. To set it in the prior argument to ergmm, use Z.mean.var.mul.
mean.var
The variance of the spherical Gaussian prior distribution of the cluster means. To set it in the prior argument to ergmm, use Z.mean.var.
pK.mul
In the absence of pK, this argument is the multiplier for the square root of the average cluster size, which is used as pK. To set it in the prior argument to ergmm, use Z.pK.
pK
The parameter of the Dirichilet prior distribution of cluster assignment probabilities. To set it in the prior argument to ergmm, use Z.pK.

Fixed Effects
Each coefficient for a fixed effect covariate has a normal prior whose mean and variance are set by the mean and var parameters of the term. For those formula terms that add more than one covariate, a vector can be given for mean and variance. If not, the vectors given will be repeated until the needed length is reached.

latentcov(x, attrname=NULL, mean=0, var=9)
Edge covariates for the latent model. x is either a matrix of covariates on each pair of vertices, a network, or an edge attribute on g; if the latter, optional argument attrname provides the name of the edge attribute to use for edge values. latentcov can be called more than once, to model the effects of multiple covariates. Note that some covariates can be more conveniently specified using the following terms.
absdiff(attrname, mean=0, var=9)
Absolute Difference. attrname is a character string giving the name of an attribute in the network's vertex attribute list. This term adds a covariate with the value abs(attrname(i)-attrname(j)) for all edges.
nodematch(attrname, diff=FALSE, mean=0, var=9)
Uniform Homophily and Differential Homophily. attrname is a character string giving the name of an attribute in the network's vertex attribute list. When diff=FALSE, this term adds one covariate with the value attrname(i)==attrname(j). When diff=TRUE, p covariates are added to the model, where p is the number of unique values of the attrname attribute. The kth such covariate has the value attrname(i) == attrname(j) == value(k), where value(k) is the kth smallest unique value of the attrname attribute.
sendercov(attrname, force.factor=FALSE, mean=0, var=9)
Sender covariate effect. attrname is a character string giving the name of an attribute in the network's vertex attribute list. If the attribute is numeric, This term adds one covariate to the model equaling attrname(i). If the attribute is not numeric or force.factor==TRUE, this term adds p-1 covariates to the model, where p is the number of unique values of attrname. The kth such covariate has the value attrname(i) == value(k+1), where value(k) is the kth smallest unique value of the attrname attribute. This term only makes sense if g is directed.
receivercov(attrname, force.factor=FALSE, mean=0, var=9)
Receiver covariate effect. attrname is a character string giving the name of an attribute in the network's vertex attribute list. If the attribute is numeric, This term adds one covariate to the model equaling attrname(j). If the attribute is not numeric or force.factor==TRUE, this term adds p-1 covariates to the model, where p is the number of unique values of attrname. The kth such covariate has the value attrname(j) == value(k+1), where value(k) is the kth smallest unique value of the attrname attribute. This term only makes sense if g is directed.
socialitycov(attrname, force.factor=FALSE, mean=0, var=9)
Sociality covariate effect. attrname is a character string giving the name of an attribute in the network's vertex attribute list. If the attribute is numeric, This term adds one covariate to the model equaling attrname(i)+attrname(j). If the attribute is not numeric or force.factor==TRUE, this term adds p-1 covariates to the model, where p is the number of unique values of attrname. The kth such covariate has the value attrname(i) == value(k+1) + attrname(j) == value(k+1), where value(k) is the kth smallest unique value of the attrname attribute. This term makes sense whether or not g is directed.

See Also

ergmm


[Package latentnet version 2.1-1 Index]