hi,
I am sure this is an obvious question,
I have a optimized model with coefficients from
stepAIC. I can't figure out how to find the
max value of a function with those coefficients.
Its part of a dynamic web page or else i would
have done it by hand. The code works fine, so you probably
don't need it, but here it is:

library(MASS)
dd<-read.csv("Guest.dat", header = TRUE, sep = "," ) 
res <- stepAIC(glm(Yield ~ (1 + NTP  + DNA  + T7pol)^2 , data=dd ), list(upper 
= Yield ~ (1 + NTP  + DNA  + T7pol )^2 , lower = Yield ~ 1 ) , trace=0 ) 
coef(res)
(Intercept)  NTP    DNA      T7pol   DNA:T7pol 
1776         -19   -8.64     -10      1.5    

I need the function back out
y = 1776  - 19*NTP -8.64*DNA -10*T7pol + 1.5 *DNA*T7pol
in order to send it to optim() or some optimizer

thanks
ld

______________________________________________
[email protected] 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