solve_ols: Title

Description Usage Arguments Value Examples

Description

Apply Gauss-Seidel or Jacobi method to solve the linear equations

Usage

1
solve_ols(A, v, method, ncores = 1, iter.max = 10000)

Arguments

A

the linear matrix of coefficient

v

the underlying true solution

method

"G-S" stands for Gauss-Seidel method and "Jacobi" uses Jacobi method

ncores

1 stands for non-parallel computing and usually ncores<=4

iter.max

the maximal number of iteration

Value

relative error: the relative error at each iteration

solution

Examples

1
2
3
4
5
n=100
alpha=3
A<-HWGen(n,alpha)
v<-rep(c(1,0),50)
solve_ols(A,v,method="Jacobi",ncores=1)

sdeng24/statscomputing documentation built on June 5, 2019, 11:08 p.m.