Target Stats Calculation Helpers
targets.Rd
Small helper functions used as part of calc_targets()
Usage
calc_joint_nodefactor(params, attrs, joint_attrs, joint_name, rel)
calc_single_attr_nodefactor(params, attr_name, joint_attrs, nf_joint_counts)
calc_edges(nf_joint_counts)
calc_absdiff(params, rel, count_type, edges)
calc_concurrent(params, rel, num)
calc_cross_network(params, rel)
calc_nodecov_age(
params,
rel,
attr_name,
edges,
level = NULL,
joint_attrs,
nf_joint_counts,
attr_squared
)
check_targets(edges, final_targets, count_type, threshold = 0.01)
check_conditions(nw, params, rel, count_type, attr_name, joint_attrs)
Arguments
- params
the parameter list object with parameters information for all networks estimated from data
- attrs
which two attributes?
- joint_attrs
string of length 2, the two attrs used to calculate joint distribution of estimates calculated from empirical data
- joint_name
Name of joint attribute as found in parameter input, calculated in calc_targets()
- rel
string, which relationship/network sub-lists to pull parameters from.
- attr_name
string of length 1, used for nodefactor and nodematch targets. If NULL, produces targets based on the two joint_attrs specifed
- nf_joint_counts
output from calc_joint_nodefactor()
- count_type
string, which ERGM term to generate targets for. Currently can only be in the form "edges", "nodefactor", "nodematch", "absdiff_sqrt_age", or "concurrent".
- edges
output from calc_edges()
- level
additional statification for nodedov target calculation function
- attr_squared
for nodecov target calculation, use squared version of attribute? (usually, age)
- final_targets
vector, final ergm term targets to be checked before output
- threshold
default = 0.01, proportion of expected activity based on edges that calulated target is allowed within (+/- threshold)
- nw
the network object outputted from "generate_init_network" (usually already in environment during workflow)