Learn R Programming

fmi (version 0.1.7)

test_strict: Test for Strict Invariance

Description

Permutation test to check if the residual error variances are equivalent across groups.

Usage

test_strict(Y_mat, group_vec, argvals, npc, n_perms, alpha, progress)

Value

A list with passed (boolean), p_value, and statistic.

Arguments

Y_mat

A numeric matrix (N x M) where N is subjects, M is time points.

group_vec

A vector of length N specifying group membership (2 groups).

argvals

A numeric vector of length M listing the observation points.

npc

Optional. The number of FPCs. If NULL (default), it is determined automatically by determine_npc.

n_perms

The number of permutations (default: 499L).

alpha

Significance level (default: 0.05).

progress

Boolean. Show progress bars? (default: interactive()).

Examples

Run this code
# \donttest{
  sim <- simulate_fmi_data(N_A = 20, N_B = 20, T_points = 30)
  res <- test_strict(sim$Y_mat, sim$group_vec, sim$argvals,
                     npc = 3, n_perms = 9, alpha = 0.05, progress = FALSE)
  print(res$p_value)
# }

Run the code above in your browser using DataLab