View source: R/main_function.R
ELCICgee | R Documentation |
The function ELCICgee
provides the model selection under the syntax of the geepack package.
ELCICgee(models, candidate.cor.sets,data, family,r,id,time)
models |
A list of formulas. See the corresponding documentation to geeglm. |
candidate.cor.sets |
A vector containing candidate correlation structures. It can be any subset of c("independence","exchangeable", "ar1"). |
data |
A data frame containing the variables in the model. |
family |
A description of the error distribution and link function to be used in the model. The details are given under "Details". |
r |
A vector indicating the observation of data: 1 for observed records (both outcome and covariates are observed for a given subject), and 0 for unobserved records. The default setup is that all data are observed. |
id |
A vector indicating subject id. |
time |
The number of observations in total for each subject. |
Three commonly used distributions are considered: "gaussian", "poisson", "binomial". For the current package, the identity link is considered for a "gaussian" distribution; the log link is considered for a "poisson" distribution; the logit link is considered for a "binomial" distribution;
A list with two items: model selection result based on ELCIC; An object of "geeglm" based on the selected model.
## tests # load data data(geesimdata) id<-geesimdata$id r<-rep(1,length(id)) time<-3 dat <- data.frame(y=geesimdata$y, geesimdata$x,id=id) models <- list(y~x1+x2) candidate.cor.sets<-c("exchangeable") family<-poisson() output<-ELCICgee(models, candidate.cor.sets,data=dat,family,r,id,time) output$model.selection output$gee.output
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.