R/spm_dx.R

Defines functions spm_dx

spm_dx <-
function(dfdx,f,t){
dfdx<-as.matrix(dfdx)
f <- as.matrix(f)
    #t<-t/sqrt(eigen2(dfdx%*%t(dfdx))$values[1])
    t<-t/sqrt(eigen(dfdx%*%t(dfdx))$values[1])
    if (t > 10^8){
	    dx = -solve(dfdx)%*%f
      }
    Jx=cbind(rbind(0,f),rbind(0,dfdx))
    dx=spm_expm1((Jx*t))
    dx=dx[2:length(dx[1,]),1]
    dx
    }

Try the FIAR package in your browser

Any scripts or data that you put into this service are public.

FIAR documentation built on June 5, 2018, 5:03 p.m.