Displaying 1 result from an estimated 1 matches for "du1dtheta".
2008 Dec 19
1
obtaining output from an evaluated expression
Hi
I am trying to use the deriv and eval functions to obtain the value of a
function , say "xi-(alpha0+alpha1*gi)" , differentiated with respect to
alpha0 and alpha1, in the following way
# for gi = 0
> dU1dtheta <- deriv(~ xi-(alpha0+alpha1*gi), c("alpha0","alpha1"))
> eval(dU1dtheta)
(Intercept)
-0.2547153
attr(,"gradient")
alpha0 alpha1
[1,] -1 0
I want to extract the output gradient values of -1 and 0 but I don't
know how to access them. The...