sampleRepeated: Simulate Repeated Measurements over time

View source: R/sampleRepeated.R

sampleRepeatedR Documentation

Simulate Repeated Measurements over time

Description

Simulate repeated measurements over time (one factor model).

Usage

sampleRepeated(n, n.Xcont = 2, n.Xcat = 2, n.rep = 5, format = "long")

Arguments

n

[integer] sample size.

n.Xcont

[integer] number of continuous covariates acting on the latent variable.

n.Xcat

[integer] number of categorical covariates acting on the latent variable.

n.rep

[integer] number of measurement of the response variable.

format

[character] should the dataset be returned in the "long" format or in the "wide" format.

Value

a data.frame object.

Examples


sampleRepeated(10, format = "wide")
sampleRepeated(10, format = "long")

bozenne/lavaSearch2 documentation built on Feb. 13, 2024, 10:18 p.m.