ecoBD is used to calculate the bounds for missing internal cells
of $R \times C$ ecological table. The data can be entered either
in the form of counts or proportions.ecoBD(formula, data = parent.frame(), N = NULL)formula. The default is the environment in which
ecoBD is called.formula is entered as counts
and the last row and/or column is omitted, this input is necessary.ecoBD containing the following elements
(When three dimensional arrays are used, the first dimension indexes
the observations, the second dimension indexes the row numbers, and
the third dimension indexes the column numbers):print.ecoBD.formula may omit the last row and/or
column of tables, which can be calculated from the remaining margins.
For example, Y ~ X specifies Y as the first column
margin and X as the first row margin in $2 \times 2$ tables.
If counts are used, formula may omit the last row and/or column
margin of the table only if N is supplied. In this example, the
columns will be labeled as X and not X, and the rows
will be labeled as Y and not Y. For larger tables, one can use cbind() and +. For
example, cbind(Y1,
Y2, Y3) ~ X1 + X2 + X3 + X4) specifies $3 \times 4$ tables.
An $R \times C$ ecological table in the form of counts:
N, is provided,
An $R \times C$ ecological table in the form of proportions:
Imai, Kosuke, Ying Lu and Aaron Strauss. (Forthcoming)
eco, ecoNP## load the registration data
data(reg)
## calculate the bounds
res <- ecoBD(Y ~ X, N = N, data = reg)
## print the results
print(res)Run the code above in your browser using DataLab