recover_table: Recover table given column and row sums and given the log...

Description Usage Arguments Value Examples

Description

Recover table given column and row sums and given the log ratios

Usage

1
2
recover_table(p, col_sums, row_sums, exclude = NULL, ratio = c("fixed",
  "sequential"), ...)

Arguments

p

the log ratios

col_sums

the vector of column sums

row_sums

the vector of row sums

exclude

the matrix containing the indices of elements that should be excluded. Default is NULL, for no exclusions.

ratio

the type of ratios used. The default is "fixed" for ratios with fixed first row and column. It is also possible to use "sequential" ratios

...

additional arguments to nleqlsv

Value

a list with the following elements

table

a recovered table

opt

a result of nleqslv

Examples

1
2
3
4
5
set.seed(10)
m <- matrix(runif(9),3)
cr <- constraints(m)
res <- recover_table(cr$p, colSums(m), rowSums(m))
res$table - m

mpiktas/retacoro documentation built on May 23, 2019, 6:32 a.m.