Description Usage Arguments Value Note See Also Examples
This function fits a joint generalized estimating equation model to multivariate longitudinal data with mono-type or mixed responses where the regression coefficients are response-specific.
1 2 3 4 5 | JGee2(formula, id, data, nr, na.action = NULL,
family = list(gaussian(link = "identity"), gaussian(link = "identity")),
corstr1 = "independence", Mv = NULL, corstr2 = "independence",
beta_int = NULL, R1 = NULL, R2 = NULL, scale.fix = FALSE, scale.value = 1,
maxiter = 25, tol = 10^-3, silent = FALSE)
|
formula |
A formula expression in the form of |
id |
A vector for identifying subjects. |
data |
A data frame which stores the variables in |
nr |
Number of multiple responses. |
na.action |
A function to remove missing values from the data. Only |
family |
A |
corstr1 |
A character string, which specifies the type of within-subject correlation structure.
Structures supported in |
Mv |
If either |
corstr2 |
A character string, which specifies the type of multivariate response correlation structure.
Structures supported in |
beta_int |
User specified initial values for regression parameters. The default value is |
R1 |
If |
R2 |
If |
scale.fix |
A logical variable; if true, the scale parameter is fixed at the value of |
scale.value |
If |
maxiter |
The number of iterations that is used in the estimation algorithm. The default value is |
tol |
The tolerance level that is used in the estimation algorithm. The default value is |
silent |
A logical variable; if true, the regression parameter estimates at each iteration are
printed. The default value is |
An object class of JGee2
representing the fit.
The structures "non_stat_M_dep"
and "unstructured"
are valid only when the data is balanced.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## Not run:
#check the data
data(MSCMsub)
#rename it
mydata=MSCMsub
#check the column labels for formula object
head(mydata)
#prepare formula object before model fitting
formulaj2=cbind(stress,illness)~chlth+csex+education+employed+housize+married+mhlth+race
#prepare family object before model fitting
familyj2=list(binomial(link="logit"),binomial(link="logit"))
#fit the model
fitjgee2=JGee2(formula=formulaj2,id=mydata[,1],data=mydata,nr=2,na.action=NULL,
family=familyj2, corstr1="exchangeable", Mv=NULL, corstr2="unstructured",
beta_int=rep(0,18), R1=NULL, R2=NULL, scale.fix=FALSE, scale.value=1, maxiter=30,
tol=10^-3, silent=FALSE)
#check the object names returned by fitjgee2
names(fitjgee2)
#check the object names returned by summary(fitjgee2)
names(summary(fitjgee2))
#get the coefficients
summary(fitjgee2)$coefficients
#get the within-subject correlation matrix
summary(fitjgee2)$working.correlation1
#get the multivariate response correlation matrix
summary(fitjgee2)$working.correlation2
#get the overall working correlation matrix
summary(fitjgee2)$working.correlation
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.