-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Describe the Bug
I encountered an error while running the generate_beta_trend_test_long function with my dataset. The error message is as follows:
error: number of observations (=108) <= number of random effects (=108) for term (1 + visitWeek | subjectID); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable
Data Background
My dataset consists of two groups, each with approximately 30 samples and data collected at 3 different time points.
I used the function with the following parameters:
res = generate_beta_trend_test_long(
data.obj = ms.obj,
subject.var = "subjectID",
time.var = "visitWeek",
group.var = "group1",
dist.name = "BC",
adj.vars = NULL
)Additional Information
Validation checks passed without issues.
The time.var variable (visitWeek) is coded as numeric.
Data components (data.obj, meta.dat, feature.tab, feature.ann) conform to base R data structures as required.
Problem Explanation
The error suggests that the number of observations (108) equals the number of random effects (108) specified for the term (1 + visitWeek | subjectID). This results in unidentifiability of random-effects parameters and residual variance.
Request
I would appreciate guidance on resolving this issue or recommendations on adjusting the model specification to ensure proper identification of random effects.