ghypernet (version 1.0.0)

predict.nrm: Method to predict the expected values of a nrm model

Description

Method to predict the expected values of a nrm model

Usage

# S3 method for nrm
predict(object, m = NULL, adj = NULL, null = FALSE, multinomial = NULL, ...)

Arguments

object

nrm object from which to predict

m

integer, the number of edges to be used

adj

optional matrix, the adjacency matrix from which to get the number of edges

null

optional boolean, is it a null model? default FALSE

multinomial

logical. Optional argument. Whether to use multinomial approximation. If left blank it is selected automatically based on network size.

...

other arguments

Value

numeric, predicted values from nrm model. (If model is undirected, only upper.tri of adjacency matrix is returned.)

Examples

Run this code
# NOT RUN {
data('highschool.predictors')
highschool.m <- nrm(w=highschool.predictors[1], adj=contacts.adj, directed=FALSE, selfloops=FALSE)
predict(highschool.m, contacts.adj)
# }
# NOT RUN {
data('highschool.predictors')
highschool.m <- nrm(w=highschool.predictors, adj=contacts.adj, directed=FALSE, selfloops=FALSE)
predict(highschool.m, contacts.adj)
# }

Run the code above in your browser using DataLab