compare_predictions_test: KS Test for Difference in Predictive Performance

Description Usage Arguments Value Examples

View source: R/compare_predictions_test.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

benjamin-w-campbell/fergm documentation built on Oct. 20, 2018, 1:14 p.m.