Description Usage Arguments Value Author(s) Examples
Main function that fits extended RC models based on different types of aggregation (continuation, local, global) and different divergence functions defined by a suitable value of lambda.
1 |
N |
observed contingency table |
mod |
vector indicating the types of aggregation for row and column variables ("c" for continuation, "l" for local, "g" for global) |
k |
rank required for the matrix of interaction parameters |
la |
value of lambda parameter |
marg.cons |
type of constraint on the marginal distributions |
la |
vector of lambda values (when a vector is in input) |
dev |
deviance of the fitted model (when only one lambda value is in input) or vector of deviances (when a vector of lambda values is in input) |
df |
degrees of freedom (when only one lambda value is in input) |
it |
number of iterations (when only one lambda value is in input) |
dis |
final discrepancy (when only one lambda value is in input) |
pj |
vector of joint probabilities under the fitted model (when only one lambda value is in input) |
eta |
full vector of marginal parameters (when only one lambda value is in input) |
etaX |
vector of row marginal parameters (when only one lambda value is in input) |
etaY |
vector of column marginal parameters (whenonly one lambda value is in input) |
Eta |
matrix of association parameters (when only one lambda value is in input) |
la |
vector of lambda values (when more lambda values are in input) |
dev |
vector of deviance values (when more lambda values are in input) |
Francesco Bartolucci, Antonio Forcina
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # load data
data(mobility)
# for a single value of lambda, fit model with constraints of rank 1 on
# local-local logits and without constraints on the marginal distributions
out = extRC(mobility,mod=c("l","l"),k=1,la=0.6)
summary(out)
# for a single value of lambda, fit model with constraints of rank 1 on
# local-local logits and under constrain of equal marginal distributions
out = extRC(mobility,mod=c("l","l"),k=1,la=0.6,marg.cons="equal")
summary(out)
# for a single value of lambda, fit model with constraints of rank 2 on
# global-global logits and under constraint that marginal distributions
# are equal up to a constant shift
out = extRC(mobility,mod=c("g","g"),k=2,la=0.6,marg.cons="shift")
summary(out)
# fit model for a vector of lambdas
la = seq(-1.8,0.6,length.out=10)
out1 = extRC(mobility,mod=c("l","l"),k=1,la=la)
plot(out1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.