Description Usage Arguments Details Value
getSamplerObj creates data structures used by the DSP sampler
algorithm. In fact, the only data created by dspDat that is used by
the sampler is the data returned by this function.
1 | getSamplerObj(modelObj, cycVec, fwLen, useNA)
|
modelObj |
The return object from |
cycVec |
The return object from |
fwLen |
A value specifying the number of days belonging to a cycle's fertile window. The length of the fertile window is assumed to be same across all cycles. |
useNA |
One of either |
Add details about the software
getSamplerObj returns a list containing the following
components:
UDesign matrix of model covariates, after removing
observations for which intercourse did not occur (and for missing values
when useNA is specified as "none"). See
getModelObj for details regarding construction of U
(before non-intercourse observations are removed).
idDayExpanAn nObs-integer vector that is used
to expand an n-vector to an nObs-vector. In more detail, it
is a vector of the form (1,1,1,2,2,2,2,...,n,n), where the number of 1's
corresponds to the number of study observations for which intercourse
occured for the first subject, the number of 2's corresponds to the number
of study observations for which intercourse occured for the second subject,
etc.
gamBinBoolA q-logical vector such that the
p-th element states the logical status of whether the q-th
predictor variable in the design matrix assumes values of only either 0 or
1.
varNamesA q-character vector such that the
p-th element provides the name of the q-th predictor variable
in the design matrix.
useNaSexBoolA logical value supplying the logical
status of whether useNA has value "sex".
subjIdAn n-vector of type determined at runtime
supplying the subject IDs.
nAn integer value supplying the number of subjects in
the study (after removing subjects without any days of intercourse in the
fertile window).
nObsAn integer value supplying the number of
fertile-window study days during which intercourse occured.
qAn integer value supplying the number of predictor
variables in the design matrix.
idx: if useNA is specified as "none", then a
list with name idx is included as an element in the
getSamplerObj return object; if useNA is specified as
"sex", then idx is not included in the getSamplerObj
return object, and instead has to be created each scan through the sampler.
pregAn integer vector supplying the observation
indices (after removing non-intercourse days) such that the observation day
was a day within a cycle for which a successful pregnancy occured.
UA list containing elements all and
preg.
all is a list containing with q elements. Each
element is such that the p-th element is either NULL if the
p-th predictor variable takes on values not just 0 or 1, or
otherwise is an integer vector supplying the observation indices
(after removing non-intercourse days) such that the p-th predictor
variable for that observation has a value of 1.
preg is constructed in the same way as all, with the
exception that the indices are further restricted to belong to observations
such that the observation day was a day within a cycle for which a
successful pregnancy occured.
pregCycA list that partitions the observations
(indices) by cycle, restricted to observations such that the observation
day was a day within a cycle for which a successful pregnancy occured. In
more detail, the process is conceptually equivalent to (i) subsetting the
data to observations such that the observation day was a day within a cycle
for which a successful pregnancy occured, and (ii) partitioning this
subsetted data into vectors of indices such that each vector contains the
observation indices belonging to a single cycle.
subjAn integer vector such that the elements are
values corresponding to the indices of subjects that became pregnant during
the study.
naSexDat: if useNA is specified as "none", then the
following object is included as in element in the return list
object:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.