PGEE {geeVerse} | R Documentation |
PGEE accelerated with RCpp
Description
A function to fit penalized generalized estimating equation model. This function was re-wrote partly with RCPP and RCPPEigen for better computation efficiency.
Usage
PGEE(
formula,
id,
data,
na.action = NULL,
family = gaussian(link = "identity"),
corstr = "independence",
Mv = NULL,
beta_int = NULL,
R = NULL,
scale.fix = TRUE,
scale.value = 1,
lambda,
pindex = NULL,
eps = 10^-6,
maxiter = 30,
tol = 10^-3,
silent = TRUE
)
Arguments
formula |
A formula expression |
id |
A vector for identifying subjects/clusters. |
data |
A data frame which stores the variables in |
na.action |
A function to remove missing values from the data. Only |
family |
A |
corstr |
A character string, which specifies the correlation of correlation structure.
Structures supported in |
Mv |
If either |
beta_int |
User specified initial values for regression parameters. The default value is |
R |
If |
scale.fix |
A logical variable; if true, the scale parameter is fixed at the value of |
scale.value |
If |
lambda |
A numerical value for the penalization parameter of the scad function, which is estimated via cross-validation. |
pindex |
An index vector showing the parameters which are not subject to penalization. The default value
is |
eps |
A numerical value for the epsilon used in minorization-maximization algorithm. The default value is
|
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 false, the regression parameter estimates at each iteration are
printed. The default value is |
Value
a PGEE object, which includes: fitted coefficients - the fitted single index coefficients with unit norm and first component being non negative
Examples
#generate data
set.seed(2021)
sim_data <- generateData(nsub = 100, nobs = rep(10, 100), p = 100,
c(rep(1,7),rep(0,93)), rho = 0.6, correlation = "AR1",
dis = "normal", ka = 1)
X=sim_data$X
y=sim_data$y
id = rep(1:100, each = 10)
data = data.frame(X,y,id)
PGEE_fit = PGEE("y ~.-id-1",id = id, data = data,corstr = "exchangeable",lambda=0.01)
PGEE_fit$coefficients