Fit an EczemaModel
Usage
EczemaFit(model, train, test, ...)
# S3 method for EczemaModel
EczemaFit(model, train, test = NULL, ...)
Arguments
- model
Object
- train
Training dataframe (see details below)
- test
Testing dataframe (see details below)
- ...
Arguments to pass to
rstan::sampling()
Data format
All models except "MC"
train
andtest
should have the columnsPatient
(patient ID),Time
(timepoint) andScore
(score to model).Patient
should take integer values between 1 and the number of patients in the training set.Time
should take integer (so discrete) values and starts with one for every patient.Score
should take values between 0 and max_score.Missing values are not allowed (but Time values are not necessarily consecutive, for example if Score at t=5 is missing, but not at t=4 and t=6, just remove t=5).
Examples
if (FALSE) {
model <- EczemaModel("BinRW", max_score = 100)
train <- data.frame(Patient = 1, Time = 1:10, Score = rbinom(10, 100, .5))
EczemaFit(model, train)
}