optR.fit {optR} | R Documentation |
Fitter function for Linear/Non-linear system with form Ax=b
Description
optR.fit is fit function for determing x for System with form Ax=b
Usage
## S3 method for class 'fit'
optR(x, y = NULL, method = c("gauss, LU, gaussseidel", "cgm"),
iter = 500, tol = 1e-07, ...)
Arguments
x |
: Input matrix |
y |
: Response is matrix |
method |
: "gauss" for gaussian elimination and "LU" for LU factorization |
iter |
: Number of Iterations |
tol |
: Convergence tolerance |
... |
: S3 Class |
Value
U : Decomposed matrix for Gauss-ELimination Ax=b is converted into Ux=c where U is upper triangular matrix for LU decomposition U contain the values for L & U decomposition LUx=b
c : transformed b & for LU transformation c is y from equation Ux=y
estimates : Return x values for linear system
seq : sequence of A matrix re-ordered
Examples
# Solving equation Ax=b
A<-matrix(c(6,-4,1, -4,6,-4,1,-4,6), nrow=3,ncol=3, byrow = TRUE)
b<-matrix(c(-14,36, 6), nrow=3,ncol=1,byrow=TRUE)
Z<-optR(A, b, method="gauss")
# Solve Linear model using LU decomposition (Supports Multi-response)
Z<-optR(A, b, method="LU")
# Solving the function using numerical method
Z<-optR(A, b, method="cgm")
[Package optR version 1.2.5 Index]