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, ...)
w | an object of class |
---|---|
adj | matrix. The adjacency matrix of the response network (dependent variable). |
xi | optional matrix. Passes a non-standard \(\Xi\) matrix. |
pval | the significance level used to compute confidence intervals of the parameters. Per default, set to 0.01. |
directed | logical. If |
selfloops | logical. Whether selfloops are allowed. Default set to FALSE. |
regular | logical. Whether the gHypEG regression should be performed
with correction of combinatorial effects ( |
... | optional arguments to print or plot methods. |
ci | logical. Whether to compute confidences for the parameters.
Defaults to |
significance | logical. Whether to test the model significance against the null by means of lr-test. |
null | logical. Is this a null model? Used for internal routines. |
init | 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 |
x | object of class |
suppressCall | 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.
default
: Default method for nrm
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
Giona Casiraghi
Giona Casiraghi
## 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# }