cgm {optR}R Documentation

Optimization & estimation based on Conjugate Gradient Method

Description

Function utilizes the Conjugate Gradient Method for optimization to solve equation Ax=b

Usage

cgm(A, b, x = NULL, iter = 500, tol = 1e-07)

Arguments

A

: Input matrix

b

: Response vector

x

: Initial solutions

iter

: Number of Iterations

tol

: Convergence tolerance

Value

optimal : Optimal solutions

initial : initial solution

itr.conv : Number of iterations for convergence

conv : Convergence array

Examples

A<-matrix(c(4,-1,1, -1,4,-2,1,-2,4), nrow=3,ncol=3, byrow = TRUE)
b<-matrix(c(12,-1, 5), nrow=3,ncol=1,byrow=TRUE)
Z<-optR(A, b, method="cgm", iter=500, tol=1e-7)

[Package optR version 1.2.5 Index]