summary.hmmmfit {hmmm}R Documentation

summary for the class hmmmfit

Description

The generic function ‘summary’ is adapted to the objects inheriting from class hmmmfit (summary.hmmmfit) to display the results of the estimation of a hmm model by ‘hmmm.mlfit’.

Usage

## S3 method for class 'hmmmfit'
summary(object, cell.stats = TRUE, ...)

Arguments

object

An object of the class hmmmfit, i.e. a result of ‘hmmm.mlfit’

cell.stats

If TRUE cell-specific statistics are returned

...

Further arguments passed to or from other methods

Details

The marginal interactions of a hmm model can be defined in terms of linear predictor of covariates Cln(Mm)=Xbeta, where the X matrix is specified by ‘create.XMAT’ and the parameters beta indicate the additive effects of covariate on the marginal interactions. The function ‘hmmm.mlfit’ estimates either the parameters beta and the interactions; the function ‘summary’ of a fitted model (by ‘hmmm.mlfit’) returns the estimated betas and the estimated interactions, while the function ‘print’ provides the estimated interactions only. If the model is defined under equality constraints ECln(Mm)=0, parameters betas are meaningless so they are not printed.

The printed output of ‘summary’ provides: 1. values of the likelihood ratio and Pearson's score statistics, degrees of freedom and pvalues. Note that degrees of freedom and pvalues are meaningful only for the hmm models without inequality constraints (see ‘hmmm.chibar’ to test hmm models defined under inequality constraints on interactions); 2. the linear predictor model results: estimated betas, standard errors, z-ratios, pvalues; estimated interactions, standard errors, residuals; 3. cell-specific statistics: observed and predicted frequencies of the multi-way table, estimated joint probabilities with standard errors, adjusted residuals; 4. convergence statistics.

Value

No return value

Note

Use ‘print’ to display only the goodness-of-fit test and the estimated interactions.

See Also

hmmm.mlfit, print.hmmmfit, anova.hmmmfit, create.XMAT

Examples

data(relpol)
y<-getnames(relpol,st=12,sep=";")
# 1 = Religion, 2 = Politics
names<-c("Rel","Pol")
marglist<-c("l-m","m-g","l-g")
marginals<-marg.list(marglist,mflag="m")

# Hypothesis of stochastic independence: all log odds ratios are null 
model<-hmmm.model(marg=marginals,lev=c(3,7),sel=c(9:20),names=names)
fitmodel<-hmmm.mlfit(y,model)
# print(fitmodel,aname="Independence model",printflag=TRUE)
summary(fitmodel)

[Package hmmm version 1.0-5 Index]