optR.default: Optimization & predictive modelling Toolsets

Description Usage Arguments Value Examples

Description

soptR is the default function for optimization

Usage

1
2
3
4
## Default S3 method:
optR(x, y = NULL, weights = NULL, method = c("gauss",
  "LU", "gaussseidel", "cgm", "choleski"), iter = 500, tol = 1e-07,
  keep.data = TRUE, ...)

Arguments

x

: Input data frame

y

: Response is data frame

weights

: Observation weights

method

: "gauss" for gaussian elimination and "LU" for LU factorization

iter

: Number of Iterations

tol

: Convergence tolerance

keep.data

: Returns Input dataset in object

...

: 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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")

require(utils)
set.seed(129)
n <- 7 ; p <- 2
X <- matrix(rnorm(n * p), n, p) # no intercept!
y <- rnorm(n)
Z<-optR(X, y, method="LU")

optR documentation built on May 1, 2019, 10:32 p.m.

Related to optR.default in optR...