sampleSize function

Reports the minimum sample size required to fit a network model

Reports the minimum sample size required to fit a network model

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.

sampleSize(p, m = 0, lags = 0, print = TRUE)

Arguments

  • p: Number of nodes
  • m: Number of moderator variables (defaults to 0)
  • lags: Number of lags (currently only supports 0 and 1)
  • print: if FALSE, then the minimum sample size is returned and can be assigned to an object.

Returns

Minimum sample size to fit a network model according to the specified parameters.

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.

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)
  • Maintainer: Trevor Swanson
  • License: GPL (>= 3)
  • Last published: 2021-10-01