threshold parameter model

Hi,
I a new user of Phoenix winNonlin and :

I want to model strange and poor data. Someone proposed me to try a hockey stick model.

It just the combination of two linear model, but I want to estimate the threshold. I don’t want to set by myself the threshold. I am suspecting a “grammarian” error in my text editor. Unfortunately, it is not estimated in the “theta” table and it is like the initial estimate without variation just like we freeze the parameters

test(){
covariate(C)
E = ((C < threshold)? (Alpha * (1 + BetaC)) : (Alpha * (1 + Beta2C)) )
error(EEps = 1)
observe(EObs(C) = E + EEps)
stparm(Alpha = tvAlpha)
stparm(Beta = tvBeta)
stparm(Beta2 = tvBeta2)
stparm(threshold= tvlthreshold)
fixef(tvAlpha = c(, 80, ))
fixef(tvBeta = c(, -1, ))
fixef(tvBeta2 = c(, -2, ))
fixef(tvlthreshold = c(,20,))
}

thanks,

Hi Paul,
you need to be careful on how to define the joining point between the two parts of the curve:

test(){
covariate(x)
E = x<= threshold ? intercept : (thresholdslope)- x slope
error(EEps = 1)
observe(y(x) = E + EEps)
stparm(intercept = tvintercept)
stparm(slope = tvslope)
fixef(threshold = c(, 40, ))
fixef(tvintercept = c(, 1, ))
fixef(tvslope = c(, 4.5, ))
}

here I show how to fit a curve that start flat then it starts to go down with x see the attached phoenix project.
Paul.phxproj (349 KB)

If you’re not sure about the inflection/threshold point, here is a simpler log-linear model derived from PD30 in Gabrielsson and Weiner if that helps you any?

test(){
covariate(C)
E = m * ln(C0+ C)
error(EEps = 1)
observe(EObs(C) = E + EEps)
fixef(m = c(, 40, ), C0 = c(, 1.6, ))
}

Simon.

Thanks to both of you!

I found my solution in the project of M.Mouksassi

test(){
covariate(C)
E = C<= threshold ? intercept : (intercept+thresholdslope ) - Cslope
error(EEps = 1)
observe(y(C) = E + EEps)
stparm(intercept = tvintercept)
stparm(slope = tvslope)
fixef(threshold = c(, 20, ))
fixef(tvintercept = c(, 70, ))
fixef(tvslope = c(, 5, ))
}