Last chance! 50% off unlimited learning
Sale ends in
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'.
# S3 method for hmmmfit
print(x, aname = " ", printflag = FALSE, ...)
An object of the class hmmmfit
, i.e. a result of `hmmm.mlfit'
The name of the fitted object model
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
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.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab