DESCRIPTION:

[LONGITUDINAL]
input ={foldx, Tmax, Cmax, alpha, FB, beta, Ftoci, Fster, TOCI1T_reg, STERSTT_reg}
TOCI1T_reg = {use = regressor}
STERSTT_reg = {use = regressor}

EQUATION:

if TOCI1T_reg<=STERSTT_reg
	t1=min(TOCI1T_reg,Tmax)
    F1=Ftoci
    t2=min(STERSTT_reg,Tmax)
    F2=Fster
else
	t1=min(STERSTT_reg,Tmax)
    F1=Fster
    t2=min(TOCI1T_reg,Tmax)
    F2=Ftoci
end

rho=log(foldx)/Tmax
R0=Cmax/exp(rho*Tmax)
R1=R0*exp(rho*t1)
R2=R1*exp(F1*rho*(t2-t1))
CmaxAdjust = R2*exp(F1*F2*rho*(Tmax-t2))

A = (1-FB)* CmaxAdjust
B=FB*CmaxAdjust

if t<0
	ylin=R0
elseif t<t1
	ylin=R0*exp(rho*t)
elseif t<t2
	ylin = R1*exp(F1*rho*(t-t1))
elseif t<Tmax
	ylin=R2*exp(F1*F2*rho*(t-t2))
else
	ylin=A*exp(-alpha*(t-Tmax))+B*exp(-beta*(t-Tmax))
end
logy=log(ylin)


OUTPUT:
output = {logy}