simulate_group_inter: Simulate PLSMM

View source: R/create-simulations.R

simulate_group_interR Documentation

Simulate PLSMM

Description

Simulate a partial linear semiparametric mixed-effects model.

Usage

simulate_group_inter(
  N = 50,
  n_mvnorm = 100,
  grouped = TRUE,
  timepoints = 3:5,
  nonpara_inter = TRUE,
  sample_from,
  cos = FALSE,
  A_vec = c(1, 1.5)
)

Arguments

N

Number of subjects.

n_mvnorm

Number of covariate generates from a multivariate normal distribution.

grouped

Logical indicating whether to include grouping effect.

timepoints

Vector specifying timepoints for each subject.

nonpara_inter

Logical indicating whether the nonparametric function is specific to each group.

sample_from

Vector of time points to sample from.

cos

Logical indicating whether to use cosine function for second group.

A_vec

Vector of amplitudes for the nonlinear functions for each group.

Value

A list with three components:

sim

Simulated data frame.

phi

Individual random intercepts.

f_val

Values of the nonlinear functions.

Examples


simulate_group_inter(
  N = 50, n_mvnorm = 100, grouped = TRUE,
  timepoints = 3:5, nonpara_inter = TRUE,
  sample_from = seq(0, 10, by = 0.1), cos = FALSE, A_vec = c(1, 1.5)
)


plsmmLasso documentation built on June 22, 2024, 9:35 a.m.