print.hmmmfit: print for the class hmmmfit

Description Usage Arguments Details Note See Also Examples

Description

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

Usage

1
2
## S3 method for class 'hmmmfit'
print(x, aname = " ", printflag = FALSE, ...)

Arguments

x

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

aname

The name of the fitted object model

printflag

If FALSE only the goodness-of-fit test is displayed, if TRUE the estimates of the interaction parameters are also returned

...

Further arguments passed to or from other methods

Details

The output provides the likelihood ratio statistic test to assess the fitting of the model estimated by ‘hmmm.mlfit’. 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). Moreover, if printflag is TRUE, the estimated interactions are displayed for every stratum, together with the marginal sets where they are defined and the type of logits considered.

Note

Use ‘summary’ to display a much detailed output.

See Also

hmmm.mlfit, summary.hmmmfit, anova.hmmmfit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(relpol)
y<-getnames(relpol,st=12)
# 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)

hmmm documentation built on May 2, 2019, 12:27 p.m.