losdata | R Documentation |
A simple random sample of 70 patients in inpatient hospital treatment.
data(losdata)
A data.frame
with data on the following variables:
los
length of stay (days) [integer]
.
weight
sampling weight [double]
.
fpc
finite population correction [double]
.
The losdata
are a simple random sample without replacement (SRSWOR)
of size n = 70
patients from the (fictive) population of
N = 2479
patients in inpatient hospital treatment. We have
constructed the losdata
as a showcase; though, the LOS
measurements are real data that we have taken from the 201 observations
in Ruffieux et al. (2000). The original LOS data of Ruffieux et al.
(2000) are available in the R package robustbase; see
robustbase::data(los)
. Our losdata
are a SRSWOR of
size n = 70
from the 201 original observations.
Ruffieux et al. (2000) and data.frame los
in the R
package robustbase.
Ruffieux, C., Paccaud, F. and Marazzi, A. (2000). Comparing rules for truncating hospital length of stay. Casemix Quarterly 2.
head(losdata)
library(survey)
# Survey design for simple random sampling without replacement
dn <- if (packageVersion("survey") >= "4.2") {
# survey design with pre-calibrated weights
svydesign(ids = ~1, fpc = ~fpc, weights = ~weight, data = losdata,
calibrate.formula = ~1)
} else {
# legacy mode
svydesign(ids = ~1, fpc = ~fpc, weights = ~weight, data = losdata)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.