Description Usage Arguments Details Value Models Examples
View source: R/DataManagement.R
readCyclopsData
reads a Cyclopsformatted text file.
1  readCyclopsData(fileName, modelType)

fileName 
Name of text file to be read. If fileName does not contain an absolute path,
the name is relative to the current working directory, 
modelType 
character string: Valid types are listed below. 
This function reads a Cyclopsformatted text file and returns a Cyclops data object. The first line of the file may start with '#', indicating that it contains header options. Valid header options are:
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 rowspecific 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/1valued and only covariate name is given) 
sparse  (force all BBR formatted covariates to be represented as sparse, instead of 
sparseindicator, 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 whitespace delimited and follow the format:
1  [Row ID] {Stratum ID} [Weight] <Outcome> {Censored} {Offset} <BBR covariates>

[optional]
<required>
{required or optional depending on model}
Bayesian binary regression (BBR) covariates are whitespace delimited and generally in a sparse <name>:<value> format, where name must (currently) be numeric and value is nonzero. If option indicator_only is specified, then format is simply <name>. Row ID and Stratum ID must be numeric, and rows must be sorted such that equal Stratum ID are consecutive. Stratum ID is required for clr and sccs models. Censored is required for a cox model. Offset is (currently) required for a sccs model.
A list that contains a Cyclops model data object pointer and an operation duration
Currently supported model types are:
"ls"  Least squares 
"pr"  Poisson regression 
"lr"  Logistic regression 
"clr"  Conditional logistic regression 
"cpr"  Conditional Poisson regression 
"sccs"  Selfcontrolled case series 
"cox"  Cox proportional hazards regression 
1 2 3 4  ## Not run:
dataPtr = readCyclopsData(system.file("extdata/infert_ccd.txt", package="Cyclops"), "clr")
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.