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

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/LVMMCOR4.R

Description

A model for mixed ordinal and continuous responses is presented where the heteroscedasticity of the variance of the continuous response is also modeled. In this model ordinal response can be dependent on the continuous response. The aim is to use an approach similar to that of Heckman (1978) for the joint modelling of the ordinal and continuous responses. With this model, the dependence between responses can be taken into account by the correlation between errors in the models for continuous and ordinal responses.

Usage

1
LVMMCOR(ini = NA, X, y, z, p, q, ...)

Arguments

ini

Initial values

X

Design matrix

z

Continuous responses

y

Ordinal responses with three levels

p

Order of dimension of continuous responses

q

Order of dimension of ordinal responses

...

Other arguments

Details

Models for LVMMCOR are specified symbolically. A typical model has the form response1 ~ terms and response2 ~ terms where response1and response2 are the (numeric) ordinal and continuous responses vector and terms is a series of terms which specifies a linear predictor for responses. A terms specification of the form first + second indicates all the terms in first together with all the terms in second with duplicates removed. A specification of the form first:second indicates the set of terms obtained by taking the interactions of all terms in first with all terms in second. The specification first*second indicates the cross of first and second. This is the same as first + second + first:second.

Value

Continuous Response

Coefficient of continuous response

Variance of Continuous Response

Variance of continuous response

Ordinal Response

Coefficient of ordinal response

Cut points

Cut points for ordinal response

Correlation

Coefficient of continuous response

Hessian

Hessian matrix

convergence

An integer code. 0 indicates successful convergence

Note

Supportted by Shahid Beheshti University

Author(s)

Bahrami Samani and Nourallah Tazikeh Miyandarreh

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.

See Also

nlminb,fdHess

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)

## The function is currently defined as
structure(function (x, ...) 
UseMethod("LVMMCOR"), class = "LVMMCOR")

Example output

Loading required package: nlme
Loading required package: MASS
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred 
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred 
$call
LVMMCOR.default(ini = ini, X = X, y = y, z = z, p = p, q = q)

$`Continuos Response`
                  Parameter        S.E Confidence.Interval
Con_(Intercept) 23.89308890 6.63646283      (10.62,37.166)
Con_Xgender     -1.14389263 1.38261351      (-3.909,1.621)
Con_Xage         0.32996775 0.09360033       (0.143,0.517)
Con_Xduration   -0.45605872 0.11500008     (-0.686,-0.226)
Con_Xsbp        -0.06089439 0.04590319      (-0.153,0.031)

$`Variance Of Countinous Response`
                               Parameter       S.E Confidence.Interval
Variance of Continous Response 0.8556298 0.1825731        (0.49,1.221)

$`Ordinal Response`
                Parameter        S.E Confidence.Interval
Ord_Xgender   -0.75227989 0.79897500       (-2.35,0.846)
Ord_Xage       0.01173232 0.05305946      (-0.094,0.118)
Ord_Xduration -0.02561587 0.06140197      (-0.148,0.097)
Ord_Xsbp      -0.02907185 0.02548615       (-0.08,0.022)

$`Cut points`
           Parameter      S.E Confidence.Interval
cut point1 -6.081947 3.951918     (-13.986,1.822)
cut point2 -4.616182 3.782163     (-12.181,2.948)

$Correlation
     Parameter       S.E Confidence.Interval
Corr 0.4263786 0.2666938       (-0.107,0.96)

$Hessian
               [,1]          [,2]          [,3]          [,4]          [,5]
 [1,]  3.075454e+00    2.28059606    176.178036    28.3294208    447.520361
 [2,]  2.280596e+00    2.28029227    131.215614    20.6718466    332.153261
 [3,]  1.761780e+02  131.21561356  10316.604672  1724.0582859  25786.089135
 [4,]  2.832942e+01   20.67184658   1724.058286   393.4184023   4179.811384
 [5,]  4.475204e+02  332.15326109  25786.089135  4179.8113842  65759.705856
 [6,] -1.619944e+00   -1.61995311    -94.092571   -15.3857811   -238.004981
 [7,] -1.169340e+02  -94.08245232  -6893.927405 -1143.6066358 -17259.634539
 [8,] -1.876919e+01  -15.38197302  -1143.585546  -257.1144850  -2795.195242
 [9,] -2.964893e+02 -238.00626485 -17259.596060 -2795.1625138 -43950.275676
[10,] -3.404725e-03   -0.07787036      2.149972     0.7703003      3.716665
[11,]  4.221072e-01    0.37578997     25.052516     5.1743075     66.292400
[12,]  1.596938e+00    1.24420600     91.881621    13.5952824    230.198442
[13,] -1.794939e-01   -0.08176654    -10.864763    -1.7638556    -26.758660
              [,6]         [,7]         [,8]         [,9]         [,10]
 [1,]   -1.6199437   -116.93399   -18.769187   -296.48934  -0.003404725
 [2,]   -1.6199531    -94.08245   -15.381973   -238.00626  -0.077870357
 [3,]  -94.0925714  -6893.92740 -1143.585546 -17259.59606   2.149971770
 [4,]  -15.3857811  -1143.60664  -257.114485  -2795.16251   0.770300328
 [5,] -238.0049808 -17259.63454 -2795.195242 -43950.27568   3.716665126
 [6,]    8.9391204    519.23566    84.909517   1313.37748   0.430736263
 [7,]  519.2356566  38041.92350  6310.347510  95241.93793 -11.853289071
 [8,]   84.9095168   6310.34751  1418.670272  15424.66922  -4.240237005
 [9,] 1313.3774754  95241.93793 15424.669215 242527.86466 -20.447324803
[10,]    0.4307363    -11.85329    -4.240237    -20.44732  16.051001134
[11,]   -2.0735151   -138.24173   -28.551063   -365.81375  -1.208731618
[12,]   -6.8657460   -507.02261   -75.020589  -1270.28585   1.189283446
[13,]    0.4524706     59.85889     9.733948    147.54286  -5.216934611
             [,11]         [,12]        [,13]
 [1,]    0.4221072     1.5969385  -0.17949391
 [2,]    0.3757900     1.2442060  -0.08176654
 [3,]   25.0525159    91.8816213 -10.86476258
 [4,]    5.1743075    13.5952824  -1.76385556
 [5,]   66.2923996   230.1984416 -26.75865989
 [6,]   -2.0735151    -6.8657460   0.45247059
 [7,] -138.2417346  -507.0226143  59.85889383
 [8,]  -28.5510628   -75.0205885   9.73394799
 [9,] -365.8137535 -1270.2858548 147.54286004
[10,]   -1.2087316     1.1892834  -5.21693461
[11,]    3.5687236    -1.2395056  -0.42885214
[12,]   -1.2395056    10.0517051  -0.55923541
[13,]   -0.4288521    -0.5592354  32.00406288

$convergence
[1] 0

attr(,"class")
[1] "LVMMCOR"
function (x, ...) 
UseMethod("LVMMCOR")
attr(,"class")
[1] "LVMMCOR"

LVMMCOR documentation built on May 29, 2017, 7:05 p.m.