tegge-classroom / STAT2984-2018

STAT 2984: Statistical Programming I - Spring 2018
1 stars 13 forks source link

NA Data #35

Open cahicks opened 6 years ago

cahicks commented 6 years ago

What should we do with the data that is NA in the data set? Should we exclude them from the data or make them zeros? If we make them zeros it would lower the mean by a lot. Excluding makes the most sense, but it would still affect the summaries. Not sure what to do

maxh95 commented 6 years ago

I'm also not sure, I tried to append None for those values which worked, but is causing me problems with calculating correlation and line of best fit.

pressure_data = data['pressure'] pressure_list = [] for elem in pressure_data: if elem == '': pressure_list.append(None)

*note for me data is a dictionary with each top of the column of the data as the key which is why I use data['pressure']. I don't know how you have your data.

Anyways sorry I couldn't help more!

ategge commented 6 years ago

You can handle the missing data however you please. Be sure to document your decision in the code!

On Wed, Mar 28, 2018 at 7:51 PM maxh95 notifications@github.com wrote:

I'm also not sure, I tried to append None for those values which worked, but is causing me problems with calculating correlation and line of best fit.

pressure_data = data['pressure'] pressure_list = [] for elem in pressure_data: if elem == '': pressure_list.append(None)

*note for me data is a dictionary with each top of the column of the data as the key which is why I use data['pressure']. I don't know how you have your data.

Anyways sorry I couldn't help more!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tegge-classroom/STAT2984-2018/issues/35#issuecomment-377075596, or mute the thread https://github.com/notifications/unsubscribe-auth/AKt0QQECFS_22v-7X19wU17LXyXmeKauks5tjCHkgaJpZM4S_hSq .

--

===================== Allison Tegge, PhD Research Assistant Professor Department of Statistics Virginia Tech Virginia Tech Carilion School of Medicine and Research Institute