sampleSize {modnets} | R Documentation |
Reports the minimum sample size required to fit a network model
Description
Indicates the minimum sample size required to fit a moderated or unmoderated
network model based on the number of nodes p
, number of moderators
m
, and the number of lags.
Usage
sampleSize(p, m = 0, lags = 0, print = TRUE)
Arguments
p |
Number of nodes |
m |
Number of moderator variables (defaults to |
lags |
Number of lags (currently only supports |
print |
if |
Details
When lags = 0
, the minimum sample size N refers to the number
of subjects, whereas when lags = 1
it is assumed that a single subject
is being measured at multiple time points, where N refers to the
number of time points.
Value
Minimum sample size to fit a network model according to the specified parameters.
Examples
sampleSize(p = 10)
sampleSize(p = 10, m = 1)
sampleSize(p = 10, m = 1, lags = 1)
minSamp <- sampleSize(p = 10, m = 1, lags = 1, print = FALSE)
[Package modnets version 0.9.0 Index]