Comments (2)
I hadn't given the auxiliary data much thought here... I guess that for the moment, we could use unique(base, by = key(base))
, with the prerequisite that all four primary variables are set as key (right?).
If I understand it correctly, this would select the unique records irrespective of the auxiliary data, selecting de facto at random one of the records to be kept. We might have to think about selecting based on aux data quality (eg. the least NA values in aux data), but for now unique(base, by = key(base))
will probably suffice.
from hospitalnetwork.
Since the rest of the adjust_overlapping_stays function does not take the aux data into account, what admission is used as first and second if only aux data differs is completely arbitrary at the moment. It therefore doesn't matter which of the records we keep.
Until we think of a way to chose which aux data to keep, the faster methods is preferable. I changed it accordingly.
To put it all in perspective:
In one of my "real" databases, I had 602 duplicates out of 9 million records. These duplicates did all differ in their aux data. However, I have no idea what the "correct" records would have to be, I'd have to go through them by hand. Still, these are records of the same patient being admitted to the same hospital for the same time period. For the reconstruction of the network it doesn't matter. Only if we need or want to use some aux variable, there would be a tiny difference (e.g. admissions for certain diagnoses in certain hospitals)
from hospitalnetwork.
Related Issues (18)
- Unit test scripts
- Checking base during edgelist_from_base() HOT 15
- Complete documentation of functions
- new implementation of overlap management HOT 5
- Summary statistics in HospiNet object are actually computed from the original base HOT 6
- Shiny app HOT 3
- S3 object HospiNet HOT 10
- FR: function adding GPS coordinates to HospiNet object
- FR: add fake GPS coordinates in fake database generation function
- circular network not working when only one cluster is present in the network
- Hospitals with no transfers get silently dropped HOT 1
- Fake data HOT 4
- Include (flagged) direct transfers in edgelist_from_patient_database
- Features you want to see in the package HOT 7
- Error when column name equals variable name HOT 2
- a shiny ui frontend to the package
- How overlapping stays are adjusted HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hospitalnetwork.