readCyclopsData reads a Cyclops-formatted text file.
readCyclopsData(fileName, modelType)getwd.
"ls" |
| Least squares |
"pr" |
| Poisson regression |
"lr" |
| Logistic regression |
"clr" |
| Conditional logistic regression |
"cpr" |
| Conditional Poisson regression |
"sccs" |
| Self-controlled case series |
"cox" |
| Cox proportional hazards regression |
row_label |
| (assume file contains a numeric column of unique row identifiers) |
stratum_label |
| (assume file contains a numeric column of stratum identifiers) |
weight |
| (assume file contains a column of row-specific model weights, currently unused) |
offset |
| (assume file contains a dense column of linear predictor offsets) |
bbr_outcome |
| (assume logistic outcomes are encoded -1/+1 following BBR) |
log_offset |
| (assume file contains a dense column of values x_i for which log(x_i) is the offset) |
add_intercept |
| (automatically include an intercept column of all 1s for each entry) |
indicator_only |
| (assume all covariates 0/1-valued and only covariate name is given) |
sparse |
| (force all BBR formatted covariates to be represented as sparse, instead of |
| sparse-indicator, columns .. really only for debugging) |
dense |
| (force all BBR formatted covariates to be represented as dense columns.. really |
| only for debugging) |
Successive lines of the file are white-space delimited and follow the format:
[Row ID] {Stratum ID} [Weight] {Censored} {Offset} [optional]
{required or optional depending on model}
Bayesian binary regression (BBR) covariates are white-space delimited and generally in a sparse
## Not run:
# dataPtr = readCyclopsData(system.file("extdata/infert_ccd.txt", package="Cyclops"), "clr")
# ## End(Not run)
Run the code above in your browser using DataLab