Description Usage Arguments Value Author(s) Examples
Reduce input to Mipf
based on zeros in z and possible zeros in yStart
1 |
x |
a matrix |
z |
a single column matrix |
yStart |
a starting estimate of |
A list of three elements:
|
Reduced |
|
Corresponding reduced |
|
Logical vector specifying elements of y that can be found directly as 0 |
Øyvind Langsrud
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Generate data with zeros
z2 <- EasyData("z2")
z2$ant[z2$hovedint == "trygd"] <- 0
z2$ant[1:3] <- 0
x <- FormulaSums(z2, ~~region + kostragr * hovedint - 1)
z <- t(x) %*% z2$ant
# Run ReduceBy0
a <- ReduceBy0(x, z)
# The rows known to be 0 and omitted from a$x
z2[a$yKnown, ]
# Dimension of x reduced
dim(x)
dim(a$x)
# Additional elements know to be 0
b <- ReduceBy0(x, z, c(0, 0, rep(1, 42)))
z2[b$yKnown, ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.