JointRegBC: Joint Modelling of Mixed Correlated Binary and Continuous...

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

View source: R/JointRegBC.R

Description

A joint regression model for mixed correlated binary and continuous responses is presented. In this model binary response can be dependent on the continuous response. With this model, the dependence between responses can be taken into account by the correlation between errors in the models for binary and continuous responses.

Usage

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

Arguments

ini

Initial values

X

Design matrix

z

Continuous responses

y

Binary responses

p

Order of dimension of Binary responses

q

Order of dimension of continuous responses

...

Other arguments

Details

Models for JointRegBC are specified symbolically. A typical model has the form response1 ~ terms and response2 ~ terms where response1and response2 are the (numeric) binary 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

Binary response

Coefficient of ordinal response

Continuous Response

Coefficient of continuous response

Variance of Countinuous Response

Variance of continuous 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 Zhale Tahmasebinejad

References

Bahrami Samani, E. and Tahmasebinejad. Zh.(2011). Joint Modelling of Mixed Correlated Nominal, Ordinal and Continuous Responses. Journal of Statistical Research. 45(1):37-47.

See Also

nlminb,fdHess,clogit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data("Bahrami1")
gender<-Bahrami1$ GENDER
age<-Bahrami1$AGE
duration <-Bahrami1$ DURATION
y<-Bahrami1$ STEATOS
z<-Bahrami1$  BMI
sbp<-Bahrami1$ SBP
X=cbind(gender,age,duration ,sbp)
P<-lm(z~X)[[1]]
names(P)<-paste("Con_",names(P),sep="")
Q<-clogit(y~X)[[1]]
names(Q)<-paste("Binary",names(Q),sep="")
W=c(cor(y,z),var(z))
names(W)=c("Corr","Variance of Continous Response")
ini=c(P,Q,W)
p=5;
q=4;
JointRegBC(ini,X=X,y=y,z=z,p=p,q=q)
## The function is currently defined as
structure(function (x, ...) 
UseMethod("JointRegBC"), class = "JointRegBC")

Example output

Loading required package: nlme
Loading required package: MASS
Loading required package: survival
$call
JointRegBC.default(ini = ini, X = X, y = y, z = z, p = p, q = q)

$`Continuos Response`
                  Parameter        S.E Confidence.Interval
Con_(Intercept) 21.15952347 6.30895557      (8.542,33.777)
Con_Xgender     -1.08536233 1.38933235      (-3.864,1.693)
Con_Xage         0.34331386 0.09347582        (0.156,0.53)
Con_Xduration   -0.46725310 0.11527798     (-0.698,-0.237)
Con_Xsbp        -0.04708255 0.04482069      (-0.137,0.043)

$`Variance Of Countinous Response`
                               Parameter       S.E Confidence.Interval
Variance of Continous Response   2.36613 0.4362815       (1.494,3.239)

$`Binary Response`
                   Parameter        S.E Confidence.Interval
BinaryXgender   -0.472802063 0.79995222      (-2.073,1.127)
BinaryXage      -0.006787895 0.05002531      (-0.107,0.093)
BinaryXduration -0.013724512 0.05956295      (-0.133,0.105)
BinaryXsbp       0.007653427 0.01860179       (-0.03,0.045)

$Correlation
     Parameter       S.E Confidence.Interval
Corr 0.4871806 0.2642467      (-0.041,1.016)

$Hessian
               [,1]          [,2]          [,3]          [,4]         [,5]
 [1,]    3.13546880    2.32737019    179.455491    28.8257198    455.77145
 [2,]    2.32737019    2.32708147    133.682720    20.9146585    338.58278
 [3,]  179.45549117  133.68272049  10501.261683  1753.3734064  26247.91157
 [4,]   28.82571979   20.91465848   1753.373406   400.2073806   4253.71880
 [5,]  455.77144978  338.58277780  26247.911567  4253.7188016  66921.77107
 [6,]   -1.76093060   -1.76041429   -101.002544   -15.6927762   -256.39907
 [7,] -127.25859535 -100.99923209  -7457.112411 -1231.3192037 -18664.94453
 [8,]  -20.28465019  -15.68817362  -1231.330907  -278.1148894  -3018.53914
 [9,] -322.42298722 -256.39128763 -18664.994809 -3018.7125839 -47466.70309
[10,]    0.28810976    0.11910097      8.021811     1.0138326     23.05421
[11,]   -0.04293787   -0.04172618     -4.034241    -0.5117865    -11.04342
              [,6]         [,7]         [,8]         [,9]        [,10]
 [1,]   -1.7609306   -127.25860   -20.284650   -322.42299    0.2881098
 [2,]   -1.7604143   -100.99923   -15.688174   -256.39129    0.1191010
 [3,] -101.0025437  -7457.11241 -1231.330907 -18664.99481    8.0218107
 [4,]  -15.6927762  -1231.31920  -278.114889  -3018.71258    1.0138326
 [5,] -256.3990713 -18664.94453 -3018.539137 -47466.70309   23.0542124
 [6,]    8.5522248    490.57521    76.237961   1245.31087   -0.5787830
 [7,]  490.5752085  36218.50176  5980.018681  90649.52963  -38.9666622
 [8,]   76.2379613   5980.01868  1350.727213  14662.28842   -4.9267295
 [9,] 1245.3108715  90649.52963 14662.288421 230538.18883 -111.9948479
[10,]   -0.5787830    -38.96666    -4.926729   -111.99485   16.3938279
[11,]    0.2024852     19.54511     2.482302     53.57718   -2.5996692
             [,11]
 [1,]  -0.04293787
 [2,]  -0.04172618
 [3,]  -4.03424080
 [4,]  -0.51178653
 [5,] -11.04341975
 [6,]   0.20248522
 [7,]  19.54510797
 [8,]   2.48230203
 [9,]  53.57718096
[10,]  -2.59966918
[11,]   5.78152942

$convergence
[1] 0

$objective
[1] 42.90395

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

JointRegBC documentation built on May 29, 2017, 12:14 p.m.