Top "Missing-data" questions

For questions relating to missing data problems, which can involve special data structures, algorithms, statistical methods, modeling techniques, visualization, among other considerations.

Include levels of zero count in result of table()

I have a vector 'y' and I count the different values using table: y <- c(0, 0, 1, 3, 4, 4) table(y) # y # 0 1 3 4 # 2 1 1 2 …

r count missing-data
python scikit-learn clustering with missing data

I want to cluster data with missing columns. Doing it manually I would calculate the distance in case of a …

python scikit-learn cluster-analysis missing-data
MICE implementation in python

I am trying to use MICE implementation using the following link: Missing value imputation in python using KNN from fancyimpute …

python missing-data fancyimpute
How to create "NA" for missing data in a time series

I have several files of data that look like this: X code year month day pp 1 4515 1953 6 1 0 2 4515 1953 6 2 0 3 4515 1953 6 3 0 4 4515 1953 6 4 0 5 4515 1953 6 5 3.5 Sometimes there is data …

r time-series missing-data
Predict.glm not predicting missing values in response

For some reason, when I specify glms (and lm's too, it turns out), R is not predicting missing values of …

r prediction missing-data glm lm
Pandas Dataframe: Replacing NaN with row average

I am trying to learn pandas but i have been puzzled with the following please. I want to replace NaNs …

python pandas dataframe missing-data
How to fill NAs with LOCF by factors in data frame, split by country

I have the following data frame (simplified) with the country variable as a factor and the value variable has missing …

r dataframe missing-data r-factor
R: replace NA with item from vector

I am trying to replace some missing values in my data with the average values from a similar group. My …

r replace missing-data imputation
Fill in missing pandas data with previous non-missing value, grouped by key

I am dealing with pandas DataFrames like this: id x 0 1 10 1 1 20 2 2 100 3 2 200 4 1 NaN 5 2 NaN 6 1 300 7 1 NaN I would like to replace each NAN …

python pandas nan missing-data data-cleaning
NA in clustering functions (kmeans, pam, clara). How to associate clusters to original data?

I need to cluster some data and I tried kmeans, pam, and clara with R. The problem is that my …

r cluster-analysis k-means na missing-data