### Install geessbin from CRAN Source: https://cran.r-project.org/web/packages/geessbin/readme/README.html Install the released version of the geessbin package from CRAN. ```r install.packages("geessbin") ``` -------------------------------- ### Install geessbin from GitHub Source: https://cran.r-project.org/web/packages/geessbin/readme/README.html Install the development version of the geessbin package from GitHub. Requires the devtools package. ```r # install.packages("devtools") devtools::install_github("rtishii/geessbin") ``` -------------------------------- ### Basic geessbin Analysis Example Source: https://cran.r-project.org/web/packages/geessbin/readme/README.html Performs a GEE analysis on wheeze data using the PGEE method with Morel et al. covariance estimator. This snippet demonstrates how to load data, run the analysis, and print the results. ```r library(geessbin) data(wheeze) # analysis of PGEE method with Morel et al. covariance estimator res <- geessbin(formula = Wheeze ~ City + factor(Age), data = wheeze, id = ID, corstr = "ar1", repeated = Age, beta.method = "PGEE", SE.method = "MB") print(res) ``` -------------------------------- ### Analyze Wheeze Data with PGEE and Morel et al. Covariance Estimator Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html This snippet demonstrates how to analyze the 'wheeze' dataset using the PGEE method with the Morel et al. covariance estimator. It shows the setup for the geessbin function and how to perform hypothesis tests on the regression coefficients. ```r data(wheeze) # analysis of PGEE method with Morel et al. covariance estimator res <- geessbin(formula = Wheeze ~ City + factor(Age), data = wheeze, id = ID, corstr = "ar1", repeated = Age, beta.method = "PGEE", SE.method = "MB") # hypothesis tests for regression coefficients summary(res) ``` -------------------------------- ### geessbin_all Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html Provides comprehensive analysis results by iterating through all combinations of three GEE methods and 12 covariance estimators. ```APIDOC ## geessbin_all ### Description `geessbin_all` provides analysis results using all combinations of three GEE methods and 12 covariance estimators. ### Usage ``` geessbin_all( formula, data = parent.frame(), id = NULL, corstr = "independence", repeated = NULL, b = NULL, maxitr = 50, tol = 1e-05, scale.fix = FALSE, conf.level = 0.95 ) ``` ### Parameters * **formula**: A symbolic formula object. * **data**: A data frame. * **id**: A vector or factor identifying the clusters or subjects. * **corstr**: The working correlation structure. * **repeated**: A vector or factor indicating the repeated measures within each cluster. * **b**: Not specified in the source, likely related to specific GEE methods or estimators. * **maxitr**: Maximum number of iterations for the GEE algorithm. * **tol**: Tolerance for convergence. * **scale.fix**: Whether to fix the scale parameter. * **conf.level**: The confidence level for confidence intervals. ### Response * **Success Response**: The function returns results from analyzing all combinations of specified GEE methods and covariance estimators. ``` -------------------------------- ### Function to Analyze GEE with All Method Combinations Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html The geessbin_all function analyzes data using all combinations of three GEE methods and 12 covariance estimators. It is useful for comparing different estimation approaches in small-sample longitudinal studies. ```r geessbin_all( formula, data = parent.frame(), id = NULL, corstr = "independence", repeated = NULL, b = NULL, maxitr = 50, tol = 1e-05, scale.fix = FALSE, conf.level = 0.95 ) ``` -------------------------------- ### Hypothesis Tests for geessbin Results Source: https://cran.r-project.org/web/packages/geessbin/readme/README.html Generates hypothesis tests for the regression coefficients from a geessbin analysis. This is useful for assessing the statistical significance of predictors. ```r # hypothesis tests for regression coefficients summary(res) ``` -------------------------------- ### geessbin Function Usage Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html This is the main function for fitting modified GEE models. It allows customization of the GEE method, covariance estimator, and other fitting parameters. ```R geessbin( formula, data = parent.frame(), id = NULL, corstr = "independence", repeated = NULL, beta.method = "PGEE", SE.method = "MB", b = NULL, maxitr = 50, tol = 1e-05, scale.fix = FALSE, conf.level = 0.95 ) ``` -------------------------------- ### Load Wheeze Dataset Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html Loads the wheeze dataset into the R environment. This dataset contains information on wheezing status of children. ```R data(wheeze) ``` -------------------------------- ### geessbin Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html Performs analysis for binary data using Generalized Estimating Equations (GEE). This function allows for the specification of different correlation structures, GEE methods, and covariance estimators to analyze longitudinal binary outcomes. ```APIDOC ## geessbin ### Description Performs analysis for binary data using Generalized Estimating Equations (GEE). ### Usage ``` geessbin( formula, data = parent.frame(), id = NULL, corstr = "independence", repeated = NULL, beta.method = "PGEE", SE.method = "MB" ) ``` ### Parameters * **formula**: A symbolic formula object, like `y ~ x1 + x2`. * **data**: A data frame containing the variables specified in the formula. * **id**: A vector or factor identifying the clusters or subjects. * **corstr**: The working correlation structure. Common options include "independence", "exchangeable", "ar1", etc. * **repeated**: A vector or factor indicating the repeated measures within each cluster. * **beta.method**: The method for estimating regression coefficients (e.g., "PGEE"). * **SE.method**: The method for estimating the standard errors (e.g., "MB"). ### Request Example ```R data(wheeze) # analysis of PGEE method with Morel et al. covariance estimator res <- geessbin(formula = Wheeze ~ City + factor(Age), data = wheeze, id = ID, corstr = "ar1", repeated = Age, beta.method = "PGEE", SE.method = "MB") # hypothesis tests for regression coefficients summary(res) ``` ### Response * **Success Response**: The function returns an object containing the results of the GEE analysis, including estimated coefficients, standard errors, and test statistics. ### Response Example ```R # Example output structure (actual values will vary) # Call: # geessbin(formula = Wheeze ~ City + factor(Age), data = wheeze, id = ID, corstr = "ar1", repeated = Age, beta.method = "PGEE", SE.method = "MB") # # Coefficients: # Estimate Std. Error t value Pr(>|t|) # (Intercept) 0.12345 0.05678 2.174 0.0301* # City 0.67890 0.10112 6.714 1.2e-10*** # factor(Age)2 0.34567 0.08901 3.883 0.00011*** # --- # Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # # Estimated working correlation structure: # Structure: AR(1) # Parameters: 0.5678 # Number of clusters: 100 # Number of observations: 1000 ``` ``` -------------------------------- ### geessbin function Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html The main function `geessbin` is used to analyze small-sample clustered or longitudinal data with a binary outcome using modified generalized estimating equations (GEE) with a bias-adjusted covariance estimator. It supports multiple GEE methods and covariance estimators. ```APIDOC ## geessbin ### Description `geessbin` analyzes small-sample clustered or longitudinal data using modified generalized estimating equations (GEE) with bias-adjusted covariance estimator. This function assumes binary outcome and uses the logit link function. This function provides any combination of three GEE methods (conventional and two modified GEE methods) and 12 covariance estimators (unadjusted and 11 bias-adjusted estimators). ### Usage ```R geessbin( formula, data = parent.frame(), id = NULL, corstr = "independence", repeated = NULL, beta.method = "PGEE", SE.method = "MB", b = NULL, maxitr = 50, tol = 1e-05, scale.fix = FALSE, conf.level = 0.95 ) ``` ### Arguments * `formula`: Object of class formula: symbolic description of model to be fitted (see documentation of `lm` and `formula` for details). * `data`: Data frame. * `id`: Vector that identifies the subjects or clusters (`NULL` by default). * `corstr`: Working correlation structure. The following are permitted: "`independence`", "`exchangeable`", "`ar1`", and "`unstructured`" ("`independence`" by default). * `repeated`: Vector that identifies repeatedly measured variable within each subject or cluster. If `repeated = NULL`, as is the case in function `gee`, data are assumed to be sorted so that observations on a cluster are contiguous rows for all entities in the formula. * `beta.method`: Method for estimating regression parameters. The following are permitted: "`GEE`", "`PGEE`", and "`BCGEE`" ("`PGEE`" by default). * `SE.method`: Method for estimating standard errors. The following are permitted: "`SA`", "`MK`", "`KC`", "`MD`", "`FG`", "`PA`", "`GS`", "`MB`", "`WL`", "`WB`", "`FW`", and "`FZ`" ("`MB`" by default). * `b`: Numeric vector specifying initial values of regression coefficients. If `b = NULL` (default value), the initial values are calculated using the ordinary or Firth logistic regression assuming that all the observations are independent. * `maxitr`: Maximum number of iterations (50 by default). * `tol`: Tolerance used in fitting algorithm (`1e-5` by default). * `scale.fix`: Logical variable; if `TRUE`, the scale parameter is fixed at 1 (`FALSE` by default). * `conf.level`: Numeric value of confidence level for confidence intervals (0.95 by default). ### Details Details of `beta.method` are as follows: * "GEE" is the conventional GEE method (Liang and Zeger, 1986) * "BCGEE" is the bias-corrected GEE method (Paul and Zhang, 2014; Lunardon and Scharfstein, 2017) * "PGEE" is the bias reduction of the GEE method obtained by adding a Firth-type penalty term to the estimating equation (Mondol and Rahman, 2019) Details of `SE.method` are as follows: * "SA" is the unadjusted sandwich variance estimator (Liang and Zeger, 1986) * "MK" is the MacKinnon and White estimator (MacKinnon and White, 1985) * "KC" is the Kauermann and Carroll estimator (Kauermann and Carroll, 2001) * "MD" is the Mancl and DeRouen estimator (Mancl and DeRouen, 2001) * "FG" is the Fay and Graubard estimator (Fay and Graubard, 2001) * "PA" is the Pan estimator (Pan, 2001) * "GS" is the Gosho et al. estimator (Gosho et al., 2014) * "MB" is the Morel et al. estimator (Morel et al., 2003) * "WL" is the Wang and Long estimator (Wang and Long, 2011) * "WB" is the Westgate and Burchett estimator (Westgate and Burchett, 2016) * "FW" is the Ford and Wastgate estimator (Ford and Wastgate, 2018) * "FZ" is the Fan et al. estimator (Fan et al., 2013) Descriptions and performances of some of the above methods can be found in Gosho et al. (2023). ### Value The object of class "`geessbin`" representing the results of modified generalized estimating equations with bias-adjusted covariance estimators. Generic function `summary` provides details of the results. ``` -------------------------------- ### Calculate Square Root of a Matrix Source: https://cran.r-project.org/web/packages/geessbin/refman/geessbin.html Computes the square root of a given square matrix. ```R sqrtmat(M) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.