Description Usage Arguments Value Author(s) References Examples
For a given model matrix and a given vector of observed cell frequencies,
ipf.gamma
computes the vector of frequencies whose subset sums are equal
to the observed subset sums times the adjustment factor and whose
relative frequencies satisfy the multiplicative structure prescribed by
the model.
1 |
ModelMatrix |
an |
ObsTable |
a vector of observed cell frequencies. |
gamma |
an adjustment factor. |
tol |
tolerance used in stopping criteria. |
estimand |
set to |
model.matrix |
the model matrix. |
observed.data |
the vector of observed cell frequencies. |
fitted.values |
the estimated cell frequencies. |
model.parameters |
the estimated model parameters on the multiplicative scale. |
Anna Klimova, Tamas Rudas
A.Klimova, T.Rudas, A.Dobra, Relational models for contingency tables. J. Multivariate Anal., 2012, 104, 159–173.
A.Klimova, T.Rudas, Iterative proportional scaling for curved exponential families. Scand. J. Statist., 2015, 42, 832–847.
A. Klimova, Coordinate-Free Exponential Families on Contingency Tables. PhD thesis. Advisers: Tamas Rudas and Thomas Richardson.
1 2 3 4 5 6 7 8 9 10 11 12 | ## The model of independence for a 2 by 2 contingency table
A = matrix(c( 1,1,0,0,
0,0,1,1,
1,0,1,0,
0,1,0,1), byrow=TRUE, nrow=4) ## the model matrix
y = c(1,2,3,4) ## the observed data
ipf.gamma(A, y, 1, 1e-6, "intensities") ## Adjustment factor is set to 1
ipf.gamma(A, y, 0.5, 1e-6, "intensities") ## Adjustment factor is set to 0.5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.