QAP | R Documentation |
Estimates a Multiple Regression Quadratic Assignment Proccedure model (MRQAP; Krackhardt, 1988). MRQAPs allow investigating associations between characteristics of dyads in networks (e.g., the level of homophily between two actors) and a binary or continuous tie variable (e.g., friendship, amount of time spent together).
QAP(dv, iv1, iv.names, mode = "yQAP", samples = 1000, diag = F, directed = F)
dv |
a matrix with n * m dimensions and cells indicating the presence of a tie (1 = tie, 0 = no tie for binary variables) or the weight of a tie (for continous tie variables) charcterizing the dependent variable |
iv1 |
a list of matrices with n * m dimensions characterizing the independent variables |
iv.names |
names of the independent variables for the output object |
mode |
permutation method to be applied. default is "yQAP" for permuting the Y / dv variables."dspQAP" applies Dekker's semi partialing method (Dekker, Krackhard, & Snijders, 2007) |
samples |
number of permutations, default is 1000. |
diag |
boolean for using the diagonal values of matrices in the estimation. default is FALSE |
directed |
"directed" if the dependent network is directed (ties from A to B and B to A are possible), "undirected" if the dependent network is undirected (ties from A to B are identical to B to A). Default is "directed". |
iv.list.per |
lists in the ivs argument are should be nested by group and independent matrices, if this is not the case (grouped by independent matrices and then groups) the argument iv.list.per = "iv" can be used to restructure the data. |
family |
family of the generalized linear model. default is "gaussian" for continuous dependent varaibles. F or binday dependent variables "binomial" is advised. |
round.to |
numeric, numer of digits in output table |
cpu |
number of cpu's to be used for estimation, default is 1 |
logfilename |
name of log file printing intermediate reports during the estimation procedure. |
verbose |
reports of what is happening under the hood during the call of the function, default is TRUE |
global.deltas |
during "dspQAP" estimation, should global or local delta values be used. default is TRUE |
return.perms |
should permuted networks be part of the output? default is FALSE |
Dekker, D.; Krackhardt, D.; Snijders, T.A.B. (2007). “Sensitivity of MRQAP Tests to Collinearity and Autocorrelation Conditions.” Psychometrika, 72(4), 563-581.
Krackhardt, D. (1987). “QAP Partialling as a Test of Spuriousness.” Social Networks, 9 171-186.
Krackhardt, D. (1988). “Predicting With Networks: Nonparametric Multiple Regression Analyses of Dyadic Data.” Social Networks, 10, 359-382.
QAP.MG
# create test data #
inspired by the example funciton in sna::netlm
ivnet1<-sna::rgraph(20,4)
dv1<-ivnet1[1,,]+4*ivnet1[2,,]+2*ivnet1[3,,] # Note that the fourth graph is unrelated
dv1 <- dv1 + rnorm(400,mean = 1, sd = 1)
iv1 <- list(ivnet1[1,,],ivnet1[2,,],ivnet1[3,,], ivnet1[4,,])
QAP.MG(list(dv1), list(iv1), iv.names = c("intercept",paste0("IV",1:4)), samples = 3000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.