Learn R Programming

Delta (version 0.1.1.11)

TestType: Test problem type function

Description

This function calculate for the parameters given, the type of problem. Problems could be 1.0 = Matrix size 0 1.1 = Matrix size 1 2.0 = Matrix size 2 where a marginal row or column equal 0 2.1 = Matrix size 2 and diagonal 2.2 = Matrix size 2 not diagonal 3.0 = Matrix size greater than 2 with a marginal row or column equal 0 3.1 = Matrix size greater than 2 and diagonal 3.2 = Matrix size greater than 2 with k-1 row or columns with marginal equal to a_ii or k-2 where marginals of columns and rows equals to a_ii 3.3 = Matrix size greater than 2 with h where Xt - sum(diag(M1)) = Xr[h] + Xc[h] - 2 * M1[h,h] 3.4 = Matrix size greater than 2 with i where a_ii = 0 or equal to marginals by columns or row 3.5 = Matrix size greater than 2 without a_ii = 0 or without marginals by columns or row equals to zero

Usage

TestType(tp, M1, k, Xr, Xc, Xt)

Arguments

tp

String. Type of problem to check of the previous list.

M1

Matrix. Matrix reduced.

k

Integer. Size of the problem.

Xr

Vector. Marginals by row.

Xc

Vector. Marginals by column.

Xt

Double. Sum of all elements in the matrix.

Examples

Run this code
# NOT RUN {
TestType("1.0", matrix(c(1,2,0,3,4,0,0,0,1),3,3), 3, c(4,5,1), c(3,7,1), 11)
# }

Run the code above in your browser using DataLab