Description Usage Arguments Examples
The jointfit is used to fit a multivariate double hierarchical generalized linear models (MDHGLMs) allowing different models for multivariate response variables where each response follow DHGLM. A variety of distributions and link functions for both response and the random effects are allowed. Fixed and random effects can also be fitted in both the mean and the dispersion components. To call the fitting function jointfit, models for the mean and dispersion must be specified by DHGLMMODELING object preferably created by calling the DHGLMMODELING function.
1 2 3 |
RespDist |
The distribution of the response is set by the option |
BinomialDen |
When |
DataMain |
The option |
MeanModel |
For the mean model, this option requires |
DispersionModel |
For the overdispersion model, this option requires |
PhiFix |
The option for overdispersion parameters (phi) to be estimated or maintaned constant.
Specifying defaults such as |
LamFix |
The option for random-effect variance (lambda) to be estimated or maintaned constant.
Specifying defaults such as |
structure |
The option |
mord |
The option |
dord |
The option |
convergence |
Setting this option determines the criterion for convergence, which is computed as the absolute difference between the values of all the estimated parameters in the previous and current iterations. The default criterion is 1e-06. |
Init_Corr |
Setting initial values of correlation (or shared parameters) between random effects |
EstimateCorrelations |
Correlation are estimated or fixed when |
ZZCorr |
List of model matrices for random effects |
factor |
factor structure when |
REML |
Giving REML estimates when |
order |
first order approximation when |
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 | data(eg)
eg1<-eg[1:100,] ## using sampled data to have faster results
jm1<-DHGLMMODELING(Link="identity", LinPred=y1~dose+dose2+(1|litter),RandDist="gaussian")
jm2<-DHGLMMODELING(Link="logit", LinPred=y2~dose+dose2+(1|litter),RandDist="gaussian")
Init_Corr=list(c(0))
SSC=list(as.factor(c(eg1$litter,eg1$litter)),as.factor(c(eg1$litter,eg1$litter)))
EstimateOverDisp=c(TRUE,FALSE)
LaplaceFixed=c(TRUE,TRUE)
ZZ1<-model.matrix(~as.factor(eg1$litter)-1)
ZZCorr=list(ZZ1,ZZ1)
#### independent random-effects model ####
res_ind<-jointfit(RespDist=c("gaussian","binomial"),DataMain=list(eg1,eg1),
MeanModel=list(jm1,jm2),structure="correlated",
Init_Corr=Init_Corr,EstimateCorrelations=FALSE,convergence=1,ZZCorr=ZZCorr)
#### correlated random-effects model ####
res_corr<-jointfit(RespDist=c("gaussian","binomial"),DataMain=list(eg1,eg1),
MeanModel=list(jm1,jm2),structure="correlated",
Init_Corr=Init_Corr,convergence=1,ZZCorr=ZZCorr)
#### shared random-effects model ####
Init_Corr=c(1,-10)
res_saturated<-jointfit(RespDist=c("gaussian","binomial"),DataMain=list(eg1,eg1),
MeanModel=list(jm1,jm2),structure="shared",
Init_Corr=Init_Corr,convergence=1)
|
Loading required package: Matrix
Loading required package: boot
Loading required package: mvtnorm
Warning messages:
1: In sqrt(diag(solve(-HessCorr))) : NaNs produced
2: In sqrt(diag(solve(-HessCorrZF))) : NaNs produced
3: In sqrt(solve(-HessianODEst)) : NaNs produced
Warning messages:
1: In sqrt(diag(solve(-HessCorr))) : NaNs produced
2: In sqrt(solve(-HessianODEst)) : NaNs produced
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.