Learn R Programming

LVMMCOR (version 0.01.1)

LVMMCOR-package: A Latent Variable Model for Mixed Continuous and Ordinal Responses.

Description

A model for mixed ordinal and continuous responses is presented where the heteroscedasticity of the variance of the continuous response is also modeled.

Arguments

Details

Package:
LVMMCOR
Type:
Package
Version:
1.0
Date:
2013-05-31
License:
GPL (>=2)

References

Bahrami Samani, E., Ganjali, M. and Khodaddadi, A. (2008). A Latent Variable Model for Mixed Continuous and Ordinal Responses. Journal of Statistical Theory and Applications. 7(3):337-349.

Examples

Run this code
data("Bahrami")
gender<-Bahrami$ GENDER
age<-Bahrami$AGE
duration <-Bahrami$ DURATION
y<-Bahrami$ STEATOS
z<-Bahrami$  BMI
sbp<-Bahrami$ SBP
X=cbind(gender,age,duration ,sbp)
P<-lm(z~X)[[1]]
names(P)<-paste("Con_",names(P),sep="")
Q<-polr(factor(y)~X)[[1]]
names(Q)<-paste("Ord_",names(Q),sep="")
W=c(cor(y,z),polr(factor(y)~X)[[2]],var(z))
names(W)=c("Corr","cut_point1","cut_point2","Variance of Continous Response")
ini=c(P,Q,W)
p=5;
q=4;
LVMMCOR(ini,X=X,y=y,z=z,p=p,q=q)

Run the code above in your browser using DataLab