<DATAFILE>

[FILEINFO]
file='data/warfarin_data.csv'
delimiter = comma
header={id, time, amt, dv, dvid, wt, sex, age}

[CONTENT]
id = {use=identifier}
time = {use=time}
amt = {use=amount}
dv = {use=observation, yname={'1', '2'}, type={continuous, continuous}}
dvid = {use=observationtype}
wt = {use=covariate, type=continuous}
sex = {use=covariate, type=categorical}

[SETTINGS]
dataType = {'1'=plasma, '2'=plasma}

<MODEL>

[COVARIATE]
input = {wt, sex}

sex = {type=categorical, categories={'0', '1'}}

EQUATION:
lw70 = log(wt/70)

[INDIVIDUAL]
input = {Tlag_pop, omega_Tlag, ka_pop, omega_ka, V_pop, omega_V, Cl_pop, omega_Cl, lw70, beta_V_lw70, beta_Cl_lw70}

DEFINITION:
Tlag = {distribution=logNormal, typical=Tlag_pop, sd=omega_Tlag}
ka = {distribution=logNormal, typical=ka_pop, sd=omega_ka}
V = {distribution=logNormal, typical=V_pop, covariate=lw70, coefficient=beta_V_lw70, sd=omega_V}
Cl = {distribution=logNormal, typical=Cl_pop, covariate=lw70, coefficient=beta_Cl_lw70, sd=omega_Cl}

[LONGITUDINAL]
input = {a, b}

file = 'oral1_1cpt_TlagkaVCl.txt'

DEFINITION:
concentration = {distribution=normal, prediction=Cc, errorModel=combined1(a, b)}

<FIT>
data = '1'
model = concentration

<PARAMETER>
Cl_pop = {value=0.1, method=MLE}
Tlag_pop = {value=1, method=MLE}
V_pop = {value=5, method=MLE}
a = {value=1, method=MLE}
b = {value=0.3, method=MLE}
beta_Cl_lw70 = {value=0, method=MLE}
beta_V_lw70 = {value=0, method=MLE}
c = {value=1, method=FIXED}
ka_pop = {value=1, method=MLE}
omega_Cl = {value=1, method=MLE}
omega_Tlag = {value=1, method=MLE}
omega_V = {value=1, method=MLE}
omega_ka = {value=1, method=MLE}

<MONOLIX>

[TASKS]
populationParameters()
individualParameters(method = {conditionalMean, conditionalMode })
fim(method = Linearization)
logLikelihood(method = Linearization)
plotResult(method = {indfits, parameterdistribution, covariancemodeldiagnosis, covariatemodeldiagnosis, obspred, vpc, residualsscatter, residualsdistribution, randomeffects, saemresults })

[SETTINGS]
GLOBAL:
exportpath = 'w2'
