Running 'test-marqLevAlg.R' [171s]
Running the tests in 'tests/test-marqLevAlg.R' failed.
Complete output:
  > 
  > library(marqLevAlg)
  > 
  > ## first test
  > 
  > f1 <- function(b){	
  + 	return(4*(b[1]-5)^2+(b[2]-6)^2)	
  + }
  > 
  > ## derivate
  > gr <- function(b){
  + 	return(c(8*(b[1]-5),2*(b[2]-6)))
  + }
  > 
  > ## hessian
  > hes <- function(b){
  + 	return(c(-8,0,-2))
  + }
  > 
  > ### without parameters
  > test.marq <- marqLevAlg(m=2,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f1)
  > test.marq
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(m = 2, fn = f1, maxiter = 100, epsa = 0.001, epsb = 0.001, 
      epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 2  
        Number of iterations: 3 
        Optimized objective function: 0  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 1e-08 
                      : objective function stability= 3e-08 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 0 
   
  Final parameter values: 
   5 6 
   
  > 
  > ### without length of parameters
  > test.marq <- marqLevAlg(b=c(8,9),maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f1)
  > test.marq
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = c(8, 9), fn = f1, maxiter = 100, epsa = 0.001, 
      epsb = 0.001, epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 2  
        Number of iterations: 3 
        Optimized objective function: 0  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 0 
                      : objective function stability= 1e-08 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 0 
   
  Final parameter values: 
   5 6 
   
  > 
  > ### with parameters and length of parameters
  > test.marq <- marqLevAlg(b=c(8,9),m=2,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f1)
  > 
  > ### with gradiant
  > test.marq <- marqLevAlg(b=c(8,9),m=2,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f1,gr=gr)
  > 
  > ### with hessian
  > test.marq <- marqLevAlg(b=c(8,9),m=2,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f1,gr=gr,hess=hes)
  > test.marq
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = c(8, 9), m = 2, fn = f1, gr = gr, hess = hes, 
      maxiter = 100, epsa = 0.001, epsb = 0.001, epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 2  
        Number of iterations: 100 
        Optimized objective function: 0  
        Maximum number of iteration reached without convergence 
   
  Convergence criteria: parameters stability= 0 
                      : objective function stability= 0 
                      : Matrix inversion for RDM failed 
                      : relative distance to minimum(RDM)= 1.001 
   
  Final parameter values: 
   5 6 
   
  > 
  > 
  > ## second test
  > 
  > f2 <- function(b){(b[1]+10*b[2])^2+5*(b[3]-b[4])^2+(b[2]-2*b[3])^4+10*(b[1]-b[4])^4}
  > 
  > 
  > ### without parameters
  > test.marq2 <- marqLevAlg(m=4,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f2)
  > test.marq2
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(m = 4, fn = f2, maxiter = 100, epsa = 0.001, epsb = 0.001, 
      epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 4  
        Number of iterations: 6 
        Optimized objective function: 0.00013012  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 0.00072619 
                      : objective function stability= 0.00052879 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 4.338e-05 
   
  Final parameter values: 
   -0.052  0.005  0.008  0.008 
   
  > 
  > ### without length of parameters
  > test.marq2 <- marqLevAlg(b=c(3,-1,0,1),maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f2)
  > test.marq2
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = c(3, -1, 0, 1), fn = f2, maxiter = 100, epsa = 0.001, 
      epsb = 0.001, epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 4  
        Number of iterations: 10 
        Optimized objective function: 1.537e-05  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 0.00055463 
                      : objective function stability= 6.237e-05 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 5.12e-06 
   
  Final parameter values: 
    0.045 -0.004  0.010  0.010 
   
  > 
  > ### with parameters and length of parameters
  > test.marq2 <- marqLevAlg(b=c(3,-1,0,1),m=4,maxiter=100,epsa=0.001,epsb=0.001,epsd=0.001,fn=f2)
  > test.marq2
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = c(3, -1, 0, 1), m = 4, fn = f2, maxiter = 100, 
      epsa = 0.001, epsb = 0.001, epsd = 0.001)
   
  Iteration process: 
        Number of parameters: 4  
        Number of iterations: 10 
        Optimized objective function: 1.537e-05  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 0.00055463 
                      : objective function stability= 6.237e-05 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 5.12e-06 
   
  Final parameter values: 
    0.045 -0.004  0.010  0.010 
   
  > 
  > 
  > ## third test
  > f<-function(x){(x[1]^42*(x[2]-3)^22)} 
  > test.marq3 <- marqLevAlg(b=c(10,10),maxiter=10000,epsa=0.1^5,epsb=0.1^5,epsd=0.1^5,fn=f)
  > test.marq3
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = c(10, 10), fn = f, maxiter = 10000, epsa = 0.1^5, 
      epsb = 0.1^5, epsd = 0.1^5)
   
  Iteration process: 
        Number of parameters: 2  
        Number of iterations: 10000 
        Optimized objective function: 0  
        Maximum number of iteration reached without convergence 
   
  Convergence criteria: parameters stability= 0 
                      : objective function stability= 0 
                      : Matrix inversion for RDM failed 
                      : relative distance to minimum(RDM)= 1.00001 
   
  Final parameter values: 
    0.000 14.634 
   
  > 
  > 
  > ## test 4
  > f<-function(x){x^120} 
  > test.marq4 <- marqLevAlg(b=10,maxiter=10000,epsa=0.1^5,epsb=0.1^5,epsd=0.1^5,fn=f)
  > test.marq4
   
                     Robust marqLevAlg algorithm                    
   
  marqLevAlg(b = 10, fn = f, maxiter = 10000, epsa = 0.1^5, epsb = 0.1^5, 
      epsd = 0.1^5)
   
  Iteration process: 
        Number of parameters: 1  
        Number of iterations: 393 
        Optimized objective function: 0  
        Convergence criteria satisfied 
   
  Convergence criteria: parameters stability= 9.98e-06 
                      : objective function stability= 0 
                      : Matrix inversion for RDM successful 
                      : relative distance to minimum(RDM)= 0 
   
  Final parameter values: 
   0.377 
   
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     1.17    0.04    1.20