Learn R Programming

CDsampling (version 0.1.6)

Constrained Sampling in Paid Research Studies

Description

In the context of paid research studies and clinical trials, budget considerations and patient sampling from available populations are subject to inherent constraints. We introduce the 'CDsampling' package, which integrates optimal design theories within the framework of constrained sampling. This package offers the possibility to find both D-optimal approximate and exact allocations for samplings with or without constraints. Additionally, it provides functions to find constrained uniform sampling as a robust sampling strategy with limited model information. Our package offers functions for the computation of the Fisher information matrix under generalized linear models (including regular linear regression model) and multinomial logistic models.To demonstrate the applications, we also provide a simulated dataset and a real dataset embedded in the package. Yifei Huang, Liping Tong, and Jie Yang (2025).

Copy Link

Version

Install

install.packages('CDsampling')

Monthly Downloads

190

Version

0.1.6

License

MIT + file LICENSE

Maintainer

Yifei Huang

Last Published

April 5th, 2025

Functions in CDsampling (0.1.6)

approxtoexact_constrained_func

Convert the approximate allocation (proportion) to exact allocation (integer) with bounded constraint (ni <= Ni)
print.list_output

Print Method for list_output Objects
iset_func_trial

trial_data example (see Huang, Tong, Yang (2023)) specific function for finding index set that if allocation of that index add "1", the new allocation still falls within the constraint Used in approxtoexact_constrained_func()
iset_func_trauma

trauma_data example (see Huang, Tong, Yang (2023)) specific function for finding index set that if allocation of that index add "1", the new allocation still falls within the constraint Used in approxtoexact_constrained_func()
print.matrix_output

Print Method for matrix_output Objects
trauma_data

Trauma data with multinomial response
trial_data

Generated clinical trial data with binary response
liftone_MLM

Unconstrained lift-one algorithm to find D-optimal allocations for MLM
Fdet_func_unif

Determinant function to be used for finding constrained uniform samplings
Fdet_func_GLM

Determinant of Fisher information matrix for GLM
Fi_func_MLM

Generate Fisher information matrix F_x at a design point x_i for Multinomial logistic regression model
F_func_GLM

Fisher information matrix of generalized linear model (GLM)
F_func_MLM

The Fisher information matrix of multinomial logistic model (MLM)
W_func_GLM

Calculate the diagonal elements nu of Fisher information matrix
approxtoexact_func

Convert the approximate allocation (proportion) to exact allocation (integer) without constraint
bounded_uniform

Find (constrained) uniform exact allocation of the study for bounded design
Fdet_func_MLM

Determinant of Fisher information matrix of multinomial logistic model (MLM)
print.matrix_list

Print Method for matrix_list Objects
liftone_GLM

Unconstrained lift-one algorithm to find D-optimal allocations for GLM
liftone_constrained_GLM

Find constrained D-optimal approximate design for generalized linear models (GLM)
liftone_constrained_MLM

Find constrained D-optimal designs for Multinomial Logit Models (MLM)