ame {amen} R Documentation

## AME model fitting routine

### Description

An MCMC routine providing a fit to an additive and multiplicative effects (AME) regression model to relational data of various types

### Usage

ame(Y, Xdyad=NULL, Xrow=NULL, Xcol=NULL, family, R=0, rvar = !(family=="rrl") ,
cvar = TRUE,  dcor = !symmetric, nvar=TRUE,
intercept=!is.element(family,c("rrl","ord")),
symmetric=FALSE,
odmax=rep(max(apply(Y>0,1,sum,na.rm=TRUE)),nrow(Y)), seed = 1, nscan =
10000, burn = 500, odens = 25, plot=TRUE, print = TRUE, gof=TRUE,
prior=list())


### Arguments

 Y an n x n square relational matrix of relations. See family below for various data types. Xdyad an n x n x pd array of covariates Xrow an n x pr matrix of nodal row covariates Xcol an n x pc matrix of nodal column covariates family character: one of "nrm","tob","bin","ord","cbin","frn","rrl" - see the details below R integer: dimension of the multiplicative effects (can be zero) rvar logical: fit row random effects (asymmetric case)? cvar logical: fit column random effects (asymmetric case)? dcor logical: fit a dyadic correlation (asymmetric case)? nvar logical: fit nodal random effects (symmetric case)? intercept logical: fit model with an intercept? symmetric logical: Is the sociomatrix symmetric by design? odmax a scalar integer or vector of length n giving the maximum number of nominations that each node may make - used for "frn" and "cbin" families seed random seed nscan number of iterations of the Markov chain (beyond burn-in) burn burn in for the Markov chain odens output density for the Markov chain plot logical: plot results while running? print logical: print results while running? gof logical: calculate goodness of fit statistics? prior list: A list of hyperparameters for the prior distribution

### Details

This command provides posterior inference for parameters in AME models of relational data, assuming one of six possible data types/models:

"nrm": A normal AME model.

"tob": A tobit AME model.

"bin": A binary probit AME model.

"ord": An ordinal probit AME model. An intercept is not identifiable in this model.

"cbin": An AME model for censored binary data. The value of 'odmax' specifies the maximum number of links each row may have.

"frn": An AME model for fixed rank nomination networks. A higher value of the rank indicates a stronger relationship. The value of 'odmax' specifies the maximum number of links each row may have.

"rrl": An AME model based on the row ranks. This is appropriate if the relationships across rows are not directly comparable in terms of scale. An intercept, row random effects and row regression effects are not estimable for this model.

### Value

 BETA posterior samples of regression coefficients VC posterior samples of the variance parameters APM posterior mean of additive row effects a BPM posterior mean of additive column effects b U posterior mean of multiplicative row effects u V posterior mean of multiplicative column effects v (asymmetric case) UVPM posterior mean of UV (asymmetric case) ULUPM posterior mean of ULU (symmetric case) L posterior mean of L (symmetric case) EZ estimate of expectation of Z matrix YPM posterior mean of Y (for imputing missing values) GOF observed (first row) and posterior predictive (remaining rows) values of four goodness-of-fit statistics

Peter Hoff

### Examples


data(YX_frn)
fit<-ame(YX_frn$Y,YX_frn$X,burn=5,nscan=5,odens=1,family="frn")
# you should run the Markov chain much longer than this



[Package amen version 1.4.5 Index]