R Help List --

I have defined two time-series-vector-valued-functions, let them be f and g,
and want to find the numeric derivative of f with respect to the variable x
where f depends on x through g:
(d/dx)(f (g(x) )

Moreover, x is a vector

I tried this out the long way (naming every element of the x vector and then
making the 'theta' argument in numericDeriv() the character vector of all
these names) and the result is just one time series vector; I was hoping for
a matrix. Also weirdly, if I instead make theta equal to just one of the
named elements of x, I get the same time series vector; the same happens for
any subset of the named elements

My call to numericDeriv looks like this (vphi acts as x,
swz.kalman.vectoracts as g,
decision.ts.vector acts as f):

***
numericDeriv(
expr = decision.ts.vector(
  a = swz.kalman.vector(
    zeta1=zeta[1], u = Phi$u, phi = Phi$Phi,
    vphi =
c(varphi1,varphi2,varphi3,varphi4,varphi5,varphi6,varphi7,varphi8,varphi9,varphi10,

varphi11,varphi12,varphi13,varphi14,varphi15,varphi16,varphi17,varphi18,varphi19,

varphi20,varphi21,varphi22,varphi23,varphi24,varphi25,varphi26,varphi27,varphi28,

varphi29,varphi30,varphi31,varphi32,varphi33,varphi34,varphi35,varphi36,varphi37,
    varphi38,varphi39,varphi40,varphi41,varphi42),
    alpha.prior = specs$alpha.prior
    ),
  phi = Phi$Phi, lambda = specs$lambda, delta = specs$delta, pi.star =
specs$pi.star, u.2star = specs$u.2star
  ),
theta =
c("varphi1","varphi2","varphi3","varphi4","varphi5","varphi6","varphi7","varphi8","varphi9","varphi10",

"varphi11","varphi12","varphi13","varphi14","varphi15","varphi16","varphi17","varphi18","varphi19",

"varphi20","varphi21","varphi22","varphi23","varphi24","varphi25","varphi26","varphi27","varphi28",

"varphi29","varphi30","varphi31","varphi32","varphi33","varphi34","varphi35","varphi36","varphi37",
    "varphi38","varphi39","varphi40","varphi41","varphi42")
);
***

As you can see, it includes some calls to other objects that are lying
around. Maybe from this email someone can tell me my mistake with how I've
called things; otherwise, I'm happy to send along the .R files to whomever
is so kind as offer guidance.

I appreciate your time,
Seth

--
Seth Pruitt
Department of Economics
University of California, San Diego
sjpruitt@ucsd.edu
http://dss.ucsd.edu/~sjpruitt

	[[alternative HTML version deleted]]


