Chapter 7 Example Adjusting Output

This section provides ideas to adjust the output of the provided examples by editing control script.

7.1 Demographic Summary Tables

The default for summarizing is to summarize by study. However, it is possible to summarize all the exposure metrics and other covariates by levels of a categorical covariate. The following adjustment to the control script will result in a summary table summarized across Sex (ie Male and Female).

demog_grp_var <- "SEX"

7.2 Use different Exposure Metrics in different Endpoints

There may be situations where each of the exposure metrics are not of interest for all of the endpoints. This may also be the case if a full analysis is desired for each of the exposure metrics. For the example analysis, the following change will result in using CAVE1 for only for endpoint 1 and use CAVE2 only for endpoints 2 and 3.

orig.exposureCov <- c("CAVE1","CAVE2") #exposure metric column names in data

desc.exposureCov.1 <- sapply(X = orig.exposureCov, simplify = F, USE.NAMES = T, FUN = function(f){
  if(f == "CAVE1"){
    #name to show in tables or figures
    title = "C[ave1]~(ng/mL)" #use ~ for white space; use [x] for subscript text
    label = "Time-weighted average concentration A" #Name to show in report context
    end.p = c(endpoints[1]) #will be used in the first endpoint
    #end.p = c(endpoints[1:3]) #will be used in all 3 endpoints
  }else if(f == "CAVE2"){
    title = "C[ave2]~(ng/mL)"
    label = "Time-weighted average concentration B"
    end.p = c(endpoints[2:3])
    #end.p = c(endpoints[1:3])
  }else{

  }
  list(title = title, label = label, end.p = end.p)
} # function(f)
) # sapply

7.3 Threshold(%) for Incidence Rate

In the event that an event incidence rate is low, the analyst should seriously consider if this analysis is appropriate. The statistical properties for generalized linear models may not hold when there is a low incidence rate. It is not recommended to reduce the incidence rate threshold below 10%. In the example analysis, setting the incidence rate to be at least 5%, setting p.yes.low to 5, then Adverse Event Type 1 will be included in the analysis regardless of its low incidence rate.

# threshold percentage for considering endpoints
p.yes.low <- 5 #Default value 10, must be between 0 and 100

7.4 Exposure and Model Selection Criteria

The default criteria for covariate evaluation is to use a p-value significance. When there is no exposure response relationship, or it is a weak relationship, a small p_val may result in no exposure metric selected during the exposure selection stage of the analysis.

It is possible to use \(\Delta D\) as the exposure selection criteria which compares nested models for model overall model improvement. The best exposure metric will be selected regardless of its significance.

# use Delta D instead of p-value
# useDeltaD <- FALSE
useDeltaD <- TRUE #Default value FALSE
#significant level to an exposure metric to stay in base model
#p_val <- 0.01 #Default significant level 0.01

Change the criteria for covariates to stay in final model during the backwards deletion.

#Significant level for a variable to stay in the final model
#p_val_b <- 0.01 #Default significant level 0.01
p_val_b <- 0.1

Let the selected exposure metric be removed if it does not meet the backwards deletion criteria.

#Exposure Metric will be in the final model regardless of the significant level.
exclude.exp.met.bd <- "No" #Default value "Yes"

7.5 Scale of Exposure Metrics

In order to evaluate exposure metrics on the original scale and not consider any transformations, the following arguments should be changed to:

log_exp <- "No" #Default value "Yes"
sqrt_exp <- "No" #Default value "Yes"

7.6 Covariates Search

In some instances, relationship between the endpoint and covariates may not be of interest. The covariate evaluation will not be performed and the final model will only include the best exposure metric, provided it meet the significance criteria for inclusion.

#Looking for covariates in modeling
analyze_covs <- "No" #Default value "Yes" if at least one covariate provided; otherwise "No"

7.7 Summary-only Covariates

There may be occasions when additional summary information in desired, but the variable is not desired for the analysis. Categorical and/or continuous covariates can be declares as “summary only” meaning they will only be included in the summary tables. In the code chunk below, the covariate body wright (BWT) will only be included as a summary-only variable.

...
  title = "Baseline~Bodyweight~(kg)" #use ~ for white space
  end.p = "summary only"
  #end.p = c(endpoints[1:3])
...

Covariate(s) will still show in demographic summary tables but won’t be included in modeling. Modeling results might change.

Exposure Metrics must be used for at least one endpoint in modeling.

7.8 Reference value for Continuous Covariates

To use reference value for continuous covariates

con.model.ref <- "Yes"  # default is "No"

To provide reference values instead of using median values

con.model.ref <- "Yes"
con.ref<- list(ref = c(AGE = 35, #variable name = reference value
                       BWT = 70),
               already.adjusted.in.data = F)

7.9 Save all tables as .tsv files instead of .tex files

LaTex.table <- FALSE