Hello!

I am trying to figure out how to extract the model equation when using deriv3 
with nls.

Here is my example:
#
#             Generate derivatives
#
Puro.fun2 <- deriv3(expr = ~(Vmax + VmaxT*state) * conc/(K + Kt * state + conc),
                    name = c("Vmax","VmaxT","K","Kt"),
                    function.arg = function(conc, state, Vmax, VmaxT, K, Kt) 
NULL)
#
#             Fit model using derivative function
#
Puro.fit1 <- nls(rate ~ Puro.fun2(conc, state == "treated", Vmax, VmaxT, K, Kt),
                 data = Puromycin,
                 start = c(Vmax = 160, VmaxT = 47, K = 0.043, Kt = 0.05))

Normally I would use summary(Puro.fit1)$formula to extract the model but 
because I am implementing deriv3, the following gets returned:

> summary(Puro.fit1)$formula
rate ~ Puro.fun2(conc, state == "treated", Vmax, VmaxT, K, Kt)

What I would like to do is find something that returns:

rate ~ (Vmax + VmaxT*state) * conc/(K + Kt * state + conc)

Is there a way to extract this? Please advise. Thanks for your time.

Steve
860-441-3435


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to