compare_predictions_test {fergm}R Documentation

KS Test for Difference in Predictive Performance

Description

This is a plot function to determine whether the distributions of predictions from ERGM and FERGM objects differ. It does so by using a Kolmogorov-Smirnov Test.

Usage

compare_predictions_test(compare_predictions_out = NULL, alpha_level = 0.05)

Arguments

compare_predictions_out

Matrix of correctly predicted ties produced by the compare_predictions function.

alpha_level

The significance level that should be used for the test.

Value

Returns ks.test output to determine if the percent of correctly predicted ERGM ties are less than those of the FERGM and prints a message to assist with interpretation

Examples

# load example data
data("ergm.fit")
data("fergm.fit")
data("mesa")
# Use built in compare_predictions function to compare predictions of ERGM and FERGM,
# few replications due to example
 net <- ergm.fit$network
predict_out <- compare_predictions(ergm.fit = ergm.fit, fergm.fit = fergm.fit,
                                   replications = 10, seed = 12345)

# We can also conduct a KS test to determine if the FERGM fit it statistically
 # distinguishable from the ERGM fit
compare_predictions_test(predict_out)

[Package fergm version 1.1.4 Index]