| Title: | Vaccine Induced Cellular Immunogenicity with Bivariate Modeling |
| Version: | 0.7.3 |
| Date: | 2024-02-02 |
| Description: | A shiny app for accurate estimation of vaccine induced immunogenicity with bivariate linear modeling. Method is detailed in: Lhomme, Hejblum, Lacabaratz, Wiedemann, Lelievre, Levy, Thiebaut & Richert (2020). Journal of Immunological Methods, 477:112711. <doi:10.1016/j.jim.2019.112711>. |
| BugReports: | https://github.com/sistm/vici/issues |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| LazyData: | true |
| Imports: | cowplot, DT, ggplot2, grDevices, ggpubr, nlme, shiny, stats, tidyr, utils, numDeriv, stringr, RColorBrewer, scales, shinyWidgets |
| Suggests: | testthat |
| RoxygenNote: | 7.3.0 |
| NeedsCompilation: | no |
| Packaged: | 2024-02-02 16:05:11 UTC; boris |
| Author: | Boris Hejblum [cre, aut], Melanie Huchon [aut], Clement Nerestan [aut] |
| Maintainer: | Boris Hejblum <boris.hejblum@u-bordeaux.fr> |
| Repository: | CRAN |
| Date/Publication: | 2024-02-02 16:20:02 UTC |
Toy data to upload in the app.
Description
Toy data to upload in the app.
Usage
data(ICS_ex)
Format
A tab-separated .txt file
Examples
if(interactive()){
set.seed(1382019)
nsubj <- 20
ntp <- 3
nstim <- 3
narm <- 3
subj <- rep(rep(rep(1:nsubj, each = ntp), times = nstim), times = narm)
stim <- rep(rep(c("NS", "S1", "S2"), each = nsubj*ntp), times = narm)
tp <- rep(rep(c("D0", "D1", "D3"), times=nsubj*nstim), times = narm)
a <- rep(c("Placebo", "A2", "A3"), each = nsubj*nstim*ntp)
y1 <- round(abs(rnorm(n=nsubj*nstim*ntp*narm,m = 0.03, sd=0.06)) +
(stim=="S2" & a == "A2" & tp == "D1")*abs(rnorm(n=nsubj*nstim*ntp*narm, m = 0.05, sd=0.01)), 4)
y2 <- round(abs(rnorm(n=nsubj*nstim*ntp*narm,m = 0.03, sd=0.06)) +
(stim=="S1" & a =="A3" & tp == "D3")*abs(rnorm(n=nsubj*nstim*ntp*narm, m = 0.1, sd=0.02)), 4)
ICS_ex <- cbind.data.frame("Subject" = subj, "StimulationPool" = stim, "TimePoint" = tp,
"Arm" = a, "Response1" = y1, "Response2" = y2)
#View(ICS_ex)
write.table(ICS_ex, file="Documents/GitHub/vici/data/ICS_ex.txt", sep="\t",
row.names = FALSE, quote = FALSE)
}
Plotting function for displaying boxplots and associated p-values
Description
Internal function for displaying significance boxplots
Usage
boxplot_VICI(
data_df,
pval_2plot,
response_name,
input,
inter = TRUE,
baseline = NULL,
fill = FALSE
)
Arguments
data_df |
a |
pval_2plot |
a |
response_name |
a character string indicating the name of the response. |
input |
internal input from UI. |
inter |
a logical flag indicating whether we are in the interarm setting or not.
Default is |
baseline |
baseline value used in title when |
fill |
a logical flag indicating if the boxplot is filled
Default if |
Value
a ggpubr plot object
Author(s)
Boris Hejblum
Compute_jaclist quantities needed for the Satterthwaite approximation.
Description
Computes vcov of variance parameters (theta, sigma), jacobian of each variance parameter etc.
Usage
compute_jaclist(object, tol = 1e-06)
Arguments
object |
a |
tol |
a tolerance |
Details
This code is adapted from code in compute_auxillary internal
function of pbkrtest package.
Value
a list.
Between-Within functions to obtain Denominator degrees of freedom
Description
Between-Within functions to obtain Denominator degrees of freedom
Usage
ddf_BW(object, L)
Compute Full Deviance
Description
Compute Full Deviance
Usage
devfun_gls(varpar, gls_obj)
Arguments
varpar |
variance parameters. |
gls_obj |
a |
Details
This code is adapted from code in devfun_vp internal function of
pbkrtest package.
Value
the full deviance, a numerical scalar.
Functions to obtain coefficient, degree of freedom, p-value
Description
This function allows to calculate the different approximations of degrees of freedom and returns the table of results in the app.
Usage
get_coefmat_gls(
model,
ddf = c("Satterthwaite", "Kenward-Roger", "Between-Within")
)
Arguments
model |
a |
ddf |
degrees of freedom approximation. |
Value
a matrix containing coefficient, degrees of freedom and p-value
A heatmap function for displaying
Description
Internal function for displaying significance heatmap when multiple conditions are tested
Usage
heatmap_vici(res_2plot, inter = TRUE, baseline = NULL)
Arguments
res_2plot |
a |
inter |
a logical flag indicating whether we are in the interarm setting or not.
Default is |
Value
a ggplot2 plot object
Author(s)
Boris Hejblum
Plotting function for displaying histograms and associated p-values
Description
Internal function for displaying significance histograms
Usage
histogram_VICI(
data_df,
pval_2plot,
response_name,
input,
inter = TRUE,
baseline = NULL
)
Arguments
data_df |
a |
pval_2plot |
a |
response_name |
a character string indicating the name of the response. |
input |
internal input from UI. |
inter |
a logical flag indicating whether we are in the interarm setting or not.
Default is |
baseline |
baseline value used in title when |
Value
a ggpubr plot object
Author(s)
Clément NERESTAN
Fitting GLS For Inter-Arm Setting
Description
Fitting GLS For Inter-Arm Setting
Usage
interarm_fit(transformed_data, input, resp)
Fitting GLS For Intra-Arm Setting
Description
Fitting GLS For Intra-Arm Setting
Usage
intraarm_fit(transformed_data, tested_time, input, resp)
mod_modelfit_ui and mod_modelfit_server
Description
A shiny Module.
Usage
mod_modelfit_ui(id)
mod_modelfit_server(input, output, session, datas, parent, origin)
Arguments
id |
shiny id |
input |
internal |
output |
internal |
session |
internal |
datas |
internal |
parent |
internal |
origin |
internal |
mod_settings_pan_ui and mod_settings_pan_server
Description
A shiny Module.
Usage
mod_settings_pan_ui(id)
mod_settings_pan_server(input, output, session, datas, parent)
Arguments
id |
shiny id |
input |
internal |
output |
internal |
session |
internal |
datas |
internal |
parent |
Custom download handler for plots
Description
Custom download handler for plots
Usage
myDownloadHandlerForPlots(name, plot_obj, outputArgs = list())
Arguments
name |
output file name |
plot_obj |
a plot object to be downloaded |
Value
a ggpubr plot object
Author(s)
Boris Hejblum
Our generalized least squares ls function
Description
Internal function to adapt generalized least squares (gls) model with more details in output.
Usage
mygls(
model,
data = sys.frame(sys.parent()),
correlation = NULL,
weights = NULL,
subset,
method = c("REML", "ML"),
na.action = na.fail,
control = list(),
verbose = FALSE
)
Arguments
model |
a |
data |
a |
correlation |
a |
weights |
a |
subset |
an optional expression indicating which subset of the rows of |
method |
a character string to choose the maximization method. Default is " |
na.action |
a function that indicates what should happen when the data contain NAs. Default is |
control |
a list of control values. Default is an empty list. |
verbose |
an optional logical value. If TRUE information on the evolution of the iterative algorithm is printed. Default is FALSE. |
Value
a gls object
Compute Quadratic Form
Description
Compute Quadratic Form
Usage
qform(L, V)
Arguments
L |
a numeric vector. |
V |
a symmetric numeric matrix. |
Value
a numerical scalar.
rbind Multiple Objects
Description
rbind Multiple Objects
Usage
rbindall(...)
Arguments
... |
objects to be |
Launch VICI Shiny App
Description
Launch VICI Shiny App
Usage
run_app(host = "127.0.0.1", port = 3838, ...)
Arguments
host |
Default is "127.0.0.1", see runApp for details. |
port |
Default is 3838, see runApp for details. |
... |
additional arguments to be passed to the runApp function. |
Examples
if(interactive()){
vici::run_app()
}
Compute covariance of Beta for a Generalized Least Squares (GLS) Model
Description
Compute covariance of Beta for a Generalized Least Squares (GLS) Model
Usage
varBetafun_gls(varpar, gls_obj)
Arguments
varpar |
variance parameters. |
gls_obj |
a |
Details
This code is adapted from code in get_covbeta internal function of
pbkrtest package.
Value
covariance of Beta, a numerical scalar.
Compute Wald Confidence Interval
Description
Compute Wald Confidence Interval
Usage
waldCI(estimate, se, df = Inf, level = 0.95)
Arguments
estimate |
an estimated coefficient. |
se |
standard error of |
df |
degrees of freedom associate to |
level |
level of confidence interval. |
Details
This code is greatly inspired by code from the lmerTest package.
Value
a matrix of lower and upper confidence interval.