Risk Model Regression and Analysis with Complex Non-Linear Models


[Up] [Top]

Documentation for package ‘Colossus’ version 0.9.3

Help Pages

C D F G I L M P R S T W

Colossus-package Risk Model Regression and Analysis with Complex Non-Linear Models

-- C --

Calculate_Null_Sides Utility function to perform null model equivalent of Calculate_Sides 'Calculate_Null_Sides' Called to update repeated sum calculations, Uses list of event rows, Performs calculation of counts in each group
Calculate_Null_Sides_STRATA Utility function to perform null model equivalent of Calculate_Sides with strata 'Calculate_Null_Sides_STRATA' Called to update repeated sum calculations, Uses list of event rows, Performs calculation of counts in each group
Calculate_Sides Utility function to calculate repeated values used in Cox Log-Likelihood calculation 'Calculate_Sides' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group
Calculate_Sides_CR Utility function to calculate repeated values used in Cox Log-Likelihood calculation 'Calculate_Sides_CR' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group
Calculate_Sides_CR_SINGLE Utility function to calculate repeated values used in Cox Log-Likelihood calculation 'Calculate_Sides_CR_SINGLE' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group
Calculate_Sides_Single Utility function to calculate repeated values used in Cox Log-Likelihood calculation. but not derivatives 'Calculate_Sides_Single' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group
Calculate_Sides_Single_CR Utility function to calculate repeated values used in Cox Log-Likelihood calculation. but not derivatives, applies competing risks 'Calculate_Sides_Single_CR' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group with competing risks
Calculate_Sides_STRATA Utility function to calculate repeated values used in Cox Log-Likelihood calculation with STRATA 'Calculate_Sides_STRATA' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group
Calculate_Sides_STRATA_CR Utility function to calculate repeated values used in Cox Log-Likelihood calculation with STRATA and competing risks 'Calculate_Sides_STRATA_CR' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group and competing risks
Calculate_Sides_STRATA_Single Utility function to calculate repeated values used in Cox Log-Likelihood calculation with STRATA and without derivative 'Calculate_Sides_STRATA_Single' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group but not derivatives
Calculate_Sides_STRATA_Single_CR Utility function to calculate repeated values used in Cox Log-Likelihood calculation with STRATA and without derivative and with competing risks 'Calculate_Sides_STRATA_Single_CR' Called to update repeated sum calculations, Uses list of event rows and risk matrices, Performs calculation of sums of risk in each group but not derivatives but with competing risks
Calc_Change Utility function to calculate the change to make each iteration 'Calc_Change' Called to update the parameter changes, Uses log-likelihoods and control parameters, Applies newton steps and change limitations
Calc_Change_Basic Utility function to calculate the change to make each iteration, with basic model 'Calc_Change_Basic' Called to update the parameter changes, Uses log-likelihoods and control parameters, Applies newton steps and change limitations
Calc_LogLik Utility function to calculate Cox Log-Likelihood and derivatives 'Calc_LogLik' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time
Calc_LogLik_Basic Utility function to calculate Cox Log-Likelihood and derivatives, basic model 'Calc_LogLik_Basic' Basic model, Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time
Calc_LogLik_Basic_Single Utility function to calculate Cox Log-Likelihood, basic model 'Calc_LogLik_Basic_Single' Basic model, Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time
Calc_LogLik_Single Utility function to calculate Cox Log-Likelihood 'Calc_LogLik_Single' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time
Calc_LogLik_STRATA Utility function to calculate Cox Log-Likelihood and derivatives with STRATA 'Calc_LogLik_STRATA' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time
Calc_LogLik_STRATA_BASIC Utility function to calculate Cox Log-Likelihood and derivatives with STRATA, basic model 'Calc_LogLik_STRATA_BASIC' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time, basic model
Calc_LogLik_STRATA_BASIC_SINGLE Utility function to calculate Cox Log-Likelihood and derivatives with STRATA, basic model, no derivatives 'Calc_LogLik_STRATA_BASIC_SINGLE' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time, basic model
Calc_LogLik_STRATA_SINGLE Utility function to calculate just Cox Log-Likelihood with STRATA 'Calc_LogLik_STRATA_SINGLE' Called to update log-likelihoods, Uses list of event rows, risk matrices, and repeated sums, Sums the log-likelihood contribution from each event time and strata
Calc_Null_LogLik Utility function to perform null model equivalent of Calc_LogLik 'Calc_Null_LogLik' Called to update log-likelihoods, Uses list of event rows and repeated sums, Sums the log-likelihood contribution from each event time
Calc_Null_LogLik_STRATA Utility function to perform null model equivalent of Calc_LogLik 'Calc_Null_LogLik_STRATA' Called to update log-likelihoods, Uses list of event rows and repeated sums, Sums the log-likelihood contribution from each event time
Check_Dupe_Columns checks for duplicated column names 'Check_Dupe_Columns' checks for duplicated columns, columns with the same values, and columns with 1 value. Currently not updated for multi-terms
Check_Risk checks if the model is viable 'Check_Risk' Calculates risks and checks for negative values
Check_Trunc Applies time duration truncation limits 'Check_Trunc' creates columns to use for truncation
Colossus Risk Model Regression and Analysis with Complex Non-Linear Models
Correct_Formula_Order Corrects the order of terms/formula/etc 'Correct_Formula_Order' checks the order of formulas given and corrects any ordering issues
CoxKaplanMeier calculates and plots Kaplan-Meier survival plots 'CoxKaplanMeier' uses user provided data, columns, and identifier to create plots, plots the kaplan-meier survival and log(time) vs log(-log(survival))
CoxMartingale calculates and plots martingale residuals with a named dose column 'CoxMartingale' uses user provided data, columns, and identifier to create plots
CoxRisk calculates and plots relative risk 'CoxRisk' uses user provided data, columns, and identifier to create plots of risk by covariate value for each column
CoxStratifiedSurvival calculates and plots survival curves for each unique value of the stratification column 'CoxStratifiedSurvival' uses user provided data, columns, and identifier to calculate the survival fraction for each strata
CoxSurvival calculates and plots survival plots of the estimated baseline 'CoxSurvival' uses user provided data, columns, and identifier to create plots
cox_ph_Omnibus_transition Interface between R code and the Cox PH omnibus regression function 'cox_ph_Omnibus_transition' Called directly from R, Defines the control variables and calls the regression function
Cox_Refresh_R_SIDES Utility function to refresh side matrices for Cox Omnibus 'Cox_Refresh_R_SIDES' Called to fresh repeated sum calculation matrices
Cox_Refresh_R_TERM Utility function to refresh risk and subterm matrices for Cox Omnibus function 'Cox_Refresh_R_TERM' Called to update matrices
Cox_Relative_Risk Calculates hazard ratios for a reference vector 'RunCoxRegression' uses user provided data, vectors specifying the model, and options to calculate relative risk for every row in the provided data
Cox_Side_LL_Calc Utility function to perform calculation of Repeated Calculations and Log-Likelihood for Cox Omnibus 'Cox_Side_LL_Calc' Called to perform repeated term and risk calculations
Cox_Term_Risk_Calc Utility function to perform calculation of terms and risks for Cox Omnibus 'Cox_Term_Risk_Calc' Called to perform repeated term and risk calculations

-- D --

Date_Shift Automates creating a date difference column 'Date_Shift' generates a new dataframe with a column containing time difference in a given unit
Def_Control Automatically assigns missing control values 'Def_Control' checks and assigns default values
Def_Control_Guess Automatically assigns missing guessing control values 'Def_Control_Guess' checks and assigns default values
Def_modelform_fix Automatically assigns geometric-mixture values 'Def_model_control' checks and assigns default values
Def_model_control Automatically assigns missing model control values 'Def_model_control' checks and assigns default values

-- F --

factorize Splits a parameter into factors 'factorize' uses user provided list of columns to define new parameter for each unique value and update the data.table. Not for interaction terms
factorize_par Splits a parameter into factors in parallel 'factorize_par' uses user provided list of columns to define new parameter for each unique value and update the data.table. Not for interaction terms

-- G --

Gather_Guesses_CPP Performs checks to gather a list of guesses and iterations 'Gather_Guesses_CPP' called from within R, uses a list of options and the model definition to generate a list of parameters and iterations that do not produce errors
Gen_Fac_Par Generates factored columns in parallel 'Gen_Fac_Par' Called directly from R, returns a matrix with factored columns
Gen_Strat_Weight Generates weightings for stratified poisson regression 'Gen_Strat_Weight' Called from within c++, assigns vector of weights
gen_time_dep Applies time dependence to parameters 'gen_time_dep' generates a new dataframe with time dependent covariates by applying a grid in time
GetCensWeight Calculates and returns data for time by hazard and survival to estimate censoring rate 'GetCensWeight' uses user provided data, time/event columns, vectors specifying the model, and options generate an estimate of the censoring rate, plots, and returns the data

-- I --

interact_them Defines Interactions 'interact_them' uses user provided interactions define interaction terms and update the data.table. assumes interaction is "+" or "*" and applies basic anti-aliasing to avoid duplicates
Intercept_Bound Utility function to keep intercept parameters within the range of possible values 'Intercept_Bound' Called to update the parameter list in the event that intercepts leave the bounds of possible values

-- L --

Likelihood_Ratio_Test Defines the likelihood ratio test 'Likelihood_Ratio_Test' uses two models and calculates the ratio
Linked_Dose_Formula Calculates Full Parameter list for Special Dose Formula 'Linked_Dose_Formula' Calculates all parameters for linear-quadratic and linear-exponential linked formulas
Linked_Lin_Exp_Para Calculates The Additional Parameter For a linear-exponential formula with known maximum 'Linked_Lin_Exp_Para' Calculates what the additional parameter would be for a desired maximum
LogLik_Cox_PH_Omnibus Primary Cox PH regression with multiple starting points and optional combinations of null, stratification, competing risks, multiplicative log-linear model, and no derivative calculation. 'LogLik_Cox_PH_Omnibus' Performs the calls to calculation functions, Structures the Cox PH regression, With verbose option prints out time stamps and intermediate sums of terms and derivatives
LogLik_Pois_Omnibus Primary poisson regression with multiple starting points and optional combinations of stratification and no derivative calculation. 'LogLik_Pois_Omnibus' Performs the calls to calculation functions, Structures the poisson regression, With verbose option prints out time stamps and intermediate sums of terms and derivatives

-- M --

Make_Groups Utility function to define risk groups 'Make_Groups' Called to update lists of risk groups, Uses list of event times and row time/event information, Matrices store starting/stopping row indices for each group
Make_Groups_CR Utility function to define risk groups with competing risks 'Make_Groups_CR' Called to update lists of risk groups, Uses list of event times and row time/event information, Matrices store starting/stopping row indices for each group, adds rows with event=2 past the event time
Make_Groups_STRATA Utility function to define risk groups with STRATA 'Make_Groups_STRATA' Called to update lists of risk groups, Uses list of event times and row time/event information, Matrices store starting/stopping row indices for each group
Make_Groups_STRATA_CR Utility function to define risk groups with STRATA and competing risks 'Make_Groups_STRATA_CR' Called to update lists of risk groups, Uses list of event times and row time/event information, Matrices store starting/stopping row indices for each group , adds competing risks
Make_Risks Utility function to calculate the risk and risk ratios 'Make_Risks' Called to update risk matrices, Splits into cases based on model form, Uses lists of term numbers and types to apply different derivative formulas
Make_Risks_Basic Utility function to calculate the risk and risk ratios for the basic model 'Make_Risks_Basic' Called to update risk matrices, Splits into cases based on model form, Uses lists of term numbers and types to apply different derivative formulas
Make_Risks_Single Utility function to calculate the risk, but not derivatives 'Make_Risks_Single' Called to update risk matrices, Splits into cases based on model form
Make_Risks_Weighted Utility function to calculate the risk and risk ratios with a weighting applied 'Make_Risks_Weighted' Called to update weighted risk matrices, Splits into cases based on model form, Uses lists of term numbers and types to apply different derivative formulas
Make_Risks_Weighted_Single Utility function to calculate the risk with a weighting applied and no derivatives calculated 'Make_Risks_Weighted_Single' Called to update weighted risk matrices, Splits into cases based on model form, Uses lists of term numbers and types to apply different derivative formulas
Make_subterms Utility function to calculate the term and subterm values 'Make_subterms' Called to update term matrices, Uses lists of term numbers and types to apply formulas
Make_subterms_Basic Utility function to calculate the term and subterm values with the basic model 'Make_subterms_Basic' Called to update term matrices, Uses lists of term numbers and types to apply formulas
Make_subterms_Single Utility function to calculate the term and subterm values, but not derivatives 'Make_subterms_Single' Called to update term matrices, Uses lists of term numbers and types to apply formulas

-- P --

PlotCox_Schoenfeld_Residual Calculates Schoenfeld residuals for a Cox Proportional Hazards regression and plots 'RunCox_Schoenfeld_Residual' uses user provided data, time/event columns, vectors specifying the model, and options to calculate the residuals
Plot_Omnibus Primary plotting function. 'Plot_Omnibus' Performs the calls to calculation functions
Plot_Omnibus_transition Interface between R code and the plotting omnibus function 'Plot_Omnibus_transition' Called directly from R, Defines the control variables and calls the plotting functions
PLOT_SURV Primary Cox PH baseline hazard function 'PLOT_SURV' Performs the calls to calculation functions, Uses calculated risks and risk groups to approximate the baseline, With verbose option prints out time stamps and intermediate sums of terms and derivatives
Poisson_LogLik Utility function to calculate poisson log-likelihood and derivatives 'Poisson_LogLik' Called to update log-likelihoods, Uses list risk matrices and person-years, Sums the log-likelihood contribution from each row
Poisson_LogLik_Single Utility function to calculate poisson log-likelihood 'Poisson_LogLik_Single' Called to update log-likelihoods, Uses list risk matrices and person-years, Sums the log-likelihood contribution from each row
Pois_Dev_LL_Calc Utility function to perform calculation of Log-Likelihood and Deviation for Poisson Omnibus 'Pois_Dev_LL_Calc' Called to perform repeated term and risk calculations
pois_Omnibus_transition Interface between R code and the poisson omnibus regression function 'pois_Omnibus_transition' Called directly from R, Defines the control variables and calls the regression function
Pois_Term_Risk_Calc Utility function to perform calculation of terms and risks for Poisson Omnibus 'Pois_Term_Risk_Calc' Called to perform repeated term and risk calculations

-- R --

Replace_Missing Automatically assigns missing values in listed columns 'Replace_Missing' checks each column and fills in NA values
risk_check_transition Interface between R code and the risk check 'cox_ph_transition_single' Called directly from R, Defines the control variables and calls the function which only calculates the log-likelihood
RunCoxNull Performs basic Cox Proportional Hazards regression with the null model 'RunCoxRegression' uses user provided data and time/event columns to calculate the log-likelihood with constant hazard ratio
RunCoxPlots Performs Cox Proportional Hazard model plots 'RunCoxPlots' uses user provided data, time/event columns, vectors specifying the model, and options to choose and save plots
RunCoxRegression Performs basic Cox Proportional Hazards regression without special options 'RunCoxRegression' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting position
RunCoxRegression_Basic Performs basic Cox Proportional Hazards regression with a multiplicative log-linear model 'RunCoxRegression_Basic' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions
RunCoxRegression_CR Performs basic Cox Proportional Hazards regression with competing risks 'RunCoxRegression_CR' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence, starting positions, and censoring adjustment
RunCoxRegression_Guesses_CPP Performs basic Cox Proportional Hazards regression, Allows for multiple starting guesses on c++ side 'RunCoxRegression_Guesses_CPP' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions. Has additional options to starting with several initial guesses
RunCoxRegression_Omnibus Performs Cox Proportional Hazards regression using the omnibus function 'RunCoxRegression_Omnibus' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions. Has additional options for starting with several initial guesses, using stratification, multiplicative loglinear 1-term, competing risks, and calculation without derivatives
RunCoxRegression_Single Performs basic Cox Proportional Hazards calculation with no derivative 'RunCoxRegression_Single' uses user provided data, time/event columns, vectors specifying the model, and options and returns the log-likelihood
RunCoxRegression_STRATA Performs basic Cox Proportional Hazards regression with strata effect 'RunCoxRegression_STRATA' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions
RunCoxRegression_Tier_Guesses Performs basic cox regression, with multiple guesses, starts with solving for a single term 'RunCoxRegression_Tier_Guesses' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions, with additional guesses
RunPoissonRegression Performs basic poisson regression 'RunPoissonRegression' uses user provided data, person-year/event columns, vectors specifying the model, and options to control the convergence and starting positions
RunPoissonRegression_Guesses_CPP Performs basic Poisson regression, Allows for multiple starting guesses on c++ side 'RunPoissonRegression_Guesses_CPP' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions. Has additional options to starting with several initial guesses
RunPoissonRegression_Omnibus Performs basic Poisson regression using the omnibus function 'RunPoissonRegression_Omnibus' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions. Has additional options to starting with several initial guesses
RunPoissonRegression_Single Performs poisson regression with no derivative calculations 'RunPoissonRegression_Single' uses user provided data, person-year/event columns, vectors specifying the model, and returns the results
RunPoissonRegression_STRATA Performs poisson regression with strata effect 'RunPoissonRegression_STRATA' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions
RunPoissonRegression_Tier_Guesses Performs basic poisson regression, with multiple guesses, starts with a single term 'RunPoissonRegression_Tier_Guesses' uses user provided data, time/event columns, vectors specifying the model, and options to control the convergence and starting positions, with additional guesses

-- S --

Schoenfeld_Calc Primary Cox PH schoenfeld residual function 'Schoenfeld_Calc' Performs the calls to calculation functions, Uses calculated risks and risk groups to calculate the residuals, With verbose option prints out time stamps and intermediate sums of terms and derivatives

-- T --

Time_Since Automates creating a date since a reference column 'Time_Since' generates a new dataframe with a column containing time since a reference in a given unit

-- W --

Write_Time_Dep Generates csv file with time-dependent columns 'Write_Time_Dep' Called directly from R, Defines a new matrix which interpolates time-dependent values on a grid