Nothing
###################################################
# Example of reducible matrix
# Constraints: successive coefficients should increase and be convex
p <- 5
cmatic <- rbind(diff(diag(p)), diff(diag(p), diff = 2))
# Checking indicates that constraints 2 to 4 are redundant.
# Intuitively, if the first two coefficients increase,
# then convexity forces the rest to increase
checkCmat(cmatic)
# Check without contraints
checkCmat(cmatic[-(2:4),])
###################################################
# Example of irreducible matrix
# Constraints: coefficients form an S-shape
p <- 4
cmats <- rbind(
diag(p)[1,], # positive
diff(diag(p))[c(1, p - 1),], # Increasing at both end
diff(diag(p), diff = 2)[1:(p/2 - 1),], # First half convex
-diff(diag(p), diff = 2)[(p/2):(p-2),] # second half concave
)
# Note, this matrix is not of full row rank
qr(t(cmats))$rank
all.equal(cmats[2,] + cmats[4,] - cmats[5,], cmats[3,])
# However, it is irreducible: all constraints are necessary
checkCmat(cmats)
###################################################
# Example of underlying equality constraint
# Contraint: Parameters sum is >= 0 and sum is <= 0
cmateq <- rbind(rep(1, 3), rep(-1, 3))
# Checking indicates that both constraints imply equality constraint (sum == 0)
checkCmat(cmateq)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.