Description Usage Arguments Details Value Examples
netlm
regresses the network variable in y on the network variables in
stack x using ordinary least squares. The resulting fits (and coefficients)
are then tested against the indicated null hypothesis.This is a extention of
netlm
, as it supports the grouped network permutation.
This function is still in the testing phase.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
y |
dependent network variable. This should be a matrix, for obvious reasons; NAs are allowed, but dichotomous data is strongly discouraged due to the assumptions of the analysis. |
x |
stack of independent network variables. Note that NAs are permitted, as is dichotomous data. |
intercept |
logical; should an intercept term be added? |
mode |
string indicating the type of graph being evaluated. "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected. mode is set to "digraph" by default. |
diag |
logical; should the diagonal be treated as valid data? Set this
true if and only if the data can contain loops. |
grp.ns |
a vector indicates the number of actors in each group. The
default is |
nullhyp |
string indicating the particular null hypothesis against which to test the observed estimands. |
test.statistic |
string indicating the test statistic to be used for the Monte Carlo procedures. |
tol |
tolerance parameter for |
reps |
integer indicating the number of draws to use for quantile estimation. (Relevant to the null hypothesis test only - the analysis itself is unaffected by this parameter.) Note that, as for all Monte Carlo procedures, convergence is slower for more extreme quantiles. By default, reps=1000. |
This is the extention of the netlm
in the package
sna
. This function supports the grouped network permutation when
calculating the significance level, although currently it support only the
method qap
and qapspp
(they are identical) for such
permutation. This function helps for QAP test in which the off-diagonal
matrix is set to be NA
, for example.
The tests in the nullhyp
supported by netlm.grpd
are
(currently) as follows:
classical
: tests based on classical asymptotics.
qap
: QAP permutation test; currently identical to qapspp
.
qapspp
: QAP permutation test, using Dekker's "semi-partialling plus"
procedure.
An object of class netlm
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Example
library(sna)
xmat1.1 <- sna::rgraph(100)
xmat1.2 <- sna::rgraph(120)
xmat1 <- list2mat(list(xmat1.1,xmat1.2), fill = NA)
xmat2.1 <- sna::rgraph(100)
xmat2.2 <- sna::rgraph(120)
xmat2 <- list2mat(list(xmat2.1,xmat2.2), fill = NA)
mat.y1 <- sna::rgraph(100)
mat.y2 <- sna::rgraph(120)
ymat <- list2mat(list(mat.y1,mat.y2), fill = NA)
res2.1 <- netlm.grpd(y = ymat, x = list(xmat1, xmat2),
grp.ns = c(100,120),reps = 100, nullhyp = "qap")
summary(res2.1)
res2.2 <- netlm.grpd(y = ymat, x = list(xmat1, xmat2),
grp.ns = c(100,120),nullhyp = "classical")
summary(res2.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.