Comments (2)
Part of the problem is what one should do in this situation. How do you sum up rows that have NA's in them? Is it still valid to sum up those rows that don't have values? We cannot assume that those values should be counted as zeroes. Do you have a use case that you can suggest?
from dataset.
An example would be average systolic blood pressure reading across multiple patient visits. It might not be measured every time, but the patient presumably still had one that was simply unobserved.
In R, it's handled this way:
mean( c ( 0, 5, NULL, 10, NULL, 15))
-> 7.5sum( c ( 0, 5, NULL, 10, NULL, 15))
-> 30
R also differentiates NULL
from NA
(analogous to null
and undefined
):
mean( c ( 0, 5, NA, 10, NA, 15))
-> NAsum( c ( 0, 5, NA, 10, NA, 15))
-> NA
Surveys can have cases where you might want missing values to be treated as zero in a mean, such as average wait time in a survey with skip patterns, e.g.
- "Q1. Did you have to wait for the representative [yes, no]. IF Q1='yes' then ask:
- "Q2. How many minutes did you wait?"
But then the analyst would be expected to explicitly recode missings as zero, and would not expect a second kind of parameter for handling NA in the operand.
from dataset.
Related Issues (20)
- How do I get started with Dataset? HOT 9
- Bug? : Column-filtered subselection of a syncable dataset : Unable to add rows to the dataset HOT 1
- Error using Miso.Dataset with URL on node.js HOT 1
- remove multiple lines fails HOT 3
- Type mismatch problem on Dataset HOT 3
- A simple Sort By Column function HOT 1
- Uncaught incorrect value 'X' of type string passed to column 'Y with type number
- Add `json` to list of gems required for test server
- Tests not passing on clean clone?
- Uncaught incorrect value '7.44133238098188e-4' of type string passed to column 'score_BA' with type number HOT 2
- url to tutorial in API doc HOT 1
- ds.where inserts _id data when passing array as value to columns option
- Bump Moment.js and other dependencies to latest versions
- European standards for comma separated for numeric values
- issue with _when()
- Website HOT 1
- Is this miso dataset still being actively developed? HOT 1
- iso 8601
- Website HOT 5
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 dataset.