nrm.Rd
nrm is used to fit multi-edge network regression models.
nrm(
w,
adj,
xi = NULL,
pval = 0.01,
directed = TRUE,
selfloops = TRUE,
regular = FALSE,
...
)
# S3 method for default
nrm(
w,
adj,
xi = NULL,
pval = 0.01,
directed = FALSE,
selfloops = FALSE,
regular = FALSE,
ci = TRUE,
significance = FALSE,
null = FALSE,
init = NULL,
...
)
# S3 method for nrm
print(x, suppressCall = FALSE, ...)
an object of class 'list'
containing the predictors layers
(explanatory variables/covariates) of the multiplex, passed as adjacency
matrices. The entries of the list can be named.
matrix. The adjacency matrix of the response network (dependent variable).
optional matrix. Passes a non-standard \(\Xi\) matrix.
the significance level used to compute confidence intervals of the parameters. Per default, set to 0.01.
logical. If TRUE
the response variable is considered
the adjacency matrix of directed graph. If FALSE
only the upper
triangular of adj
is considered. Default set to FALSE.
logical. Whether selfloops are allowed. Default set to FALSE.
logical. Whether the gHypEG regression should be performed
with correction of combinatorial effects (TRUE
) or without
(FALSE
).
optional arguments to print or plot methods.
logical. Whether to compute confidences for the parameters.
Defaults to TRUE
.
logical. Whether to test the model significance against the null by means of lr-test.
logical. Is this a null model? Used for internal routines.
numeric. Vector of initial values used for numerical MLE. If only
a single value is passed, this is repeated to match the number of
predictors in w
.
object of class 'nrm'
logical, indicating whether to print the call that generated x
nrm returns an object of class 'nrm'.
The function summary is used to obtain and print a summary and analysis of the results. The generic accessory functions coefficients, etc, extract various useful features of the value returned by nrm.
An object of class 'nrm' is a list containing at least the following components:
a named vector of coefficients.
a named matrix with confidence intervals and standard deviation for each coefficient.
the estimated propensity matrix.
the matrix of possibilities.
log-likelihood of the estimated model.
AIC of the estimated model.
Mc Fadden pseudo R-squared
Cox and Snells pseudo R-squared
the p-value of the likelihood-ratio test for the estimated model against the null.
nrm(default)
: Default method for nrm
print(nrm)
: Print method for elements of class 'nrm'
.
Casiraghi, Giona. 'Multiplex Network Regression: How do relations drive interactions?.' arXiv preprint arXiv:1702.02048 (2017).
nrm
## For a complete example see the vignette
data('highschool.predictors')
highschool.m <- nrm(w=highschool.predictors[1], adj=contacts.adj, directed=FALSE,
selfloops=FALSE)
highschool.m
#> Call:
#> nrm.default(w = highschool.predictors[1], adj = contacts.adj,
#> directed = FALSE, selfloops = FALSE)
#>
#> Coefficients:
#> Estimate Std.Err t value Pr(>t)
#> gender 0.3160804 0.0021095 149.84 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> R2:
#> McFadden R2 Cox Snell R2
#> 0.01717056 0.11851816
# \donttest{
data('highschool.predictors')
highschool.m <- nrm(w=highschool.predictors, adj=contacts.adj, directed=FALSE,
selfloops=FALSE)
highschool.m
#> Call:
#> nrm.default(w = highschool.predictors, adj = contacts.adj, directed = FALSE,
#> selfloops = FALSE)
#>
#> Coefficients:
#> Estimate Std.Err t value Pr(>t)
#> gender 0.0773066 0.0021205 36.456 < 2.2e-16 ***
#> class 1.3920467 0.0047051 295.862 < 2.2e-16 ***
#> topic 0.9996831 0.0089452 111.757 < 2.2e-16 ***
#> friendship 0.6958169 0.0024252 286.905 < 2.2e-16 ***
#> facebook -0.0886211 0.0023652 37.469 < 2.2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> R2:
#> McFadden R2 Cox Snell R2
#> 0.5474069 0.9800463
# }