ind2joint {dsfa}R Documentation

Independent to joint function

Description

Combines multiple derivs objects into a single derivs object.

Usage

ind2joint(f_list, tri_f_list, tri_h_list, deriv_order)

Arguments

f_list

list of derivs objects of length M, e.g. list(f_1(\cdot), f_2(\cdot),...,f_M(\cdot))

tri_f_list

list of length K trind_generator objects, the kth element corresponds to kth derivs object.

tri_h_list

list of length K trind_generator objects, the kth element corresponds to a derivs object with k \cdot (k+1)/2 parameters.

deriv_order

integer; maximum order of derivative. Available are 0,2 and 4.

Details

Let f_m be a function defined in trind(), where m \in {1,...,M}. Define h((x_{n1},x_{n2},...,x_{nK})) = (f_1(x_{n1}), f_2(x_{n2}), ... ,f_M(x_{nK})). In order to get the derivatives of h(\cdot) w.r.t all parameters x_{nk}, the independent functions are combined. For more details see trind() and trind_generator().

Value

Returns a derivs object.

See Also

Other derivs: chainrule(), derivs_transform(), differencerule(), list2derivs(), productrule(), quotientrule(), sumrule(), trind_generator(), trind()

Examples

A<-matrix(c(1:9)/10, ncol=1)
A_derivs<-list2derivs(list(A, A^0, A^2, A^3, A^4), deriv_order=4)
B_derivs<-transform(A, type="exp", par=0, deriv_order=4)
ind2joint (list(A_derivs,B_derivs),
           list(trind_generator(1),trind_generator(1)),
           list(trind_generator(1),trind_generator(1+1)), 4)


[Package dsfa version 2.0.1 Index]