Questions tagged [imputets]

An R package to provide functions for time series missing value replacement (imputation).

Filter by
Sorted by
Tagged with
4
votes
4answers
2k views

Impute missing values with ROLLING mean in R

I am new to R and struggling with a problem. I need a function to impute the missing values in a vector according to the mean value of the elements within a window of a given size. However, this ...
4
votes
2answers
2k views

Testing for missing values in R

I have a time series data set which has some missing values in it. I wish to impute the missing values but I am unsure as to which method is most appropriate e.g linear, spline or stine from the ...
3
votes
1answer
252 views

Time series Imputation based on ID

I am working on a time series data. The dataset is: datALL <- read.table(header=TRUE, text=" ID Year Align A01 2017 329 A01 2016 ...
3
votes
4answers
193 views

how to fill missing values in a vector with the mean of value before and after the missing one

Currently I am trying to impute values in a vector in R. The conditions of the imputation are. Find all NA values Then check if they have an existing value before and after them Also check if the ...
2
votes
2answers
102 views

impute missing with interpolation by groups

I am trying to impute missing value NA with interpolation by multiple groups. I just subset a simple example: Year ST CC ID MP PS 2002 15 3 3 NA 1.5 2003 15 ...
2
votes
2answers
59 views

fill in blanks with exponential estimates

I'm trying to fill in NA values with numbers that show exponential growth. Below is a data sample of what I'm trying to do. library(tidyverse) expand.grid(X2009H1N1 = "0-17 years", type =...
2
votes
1answer
401 views

Error in na.interpolation(data[, i], option): Input x is not numeric

I have the following problem. I have a data.frame consisting of country "identifier" (letters+numbers), "year" (numbers), "unique identifier" (identifier+year), statistics on "labour market1" (numbers)...
2
votes
0answers
446 views

Using Kalman smoothing in R's KFAS package to impute missing data

I have a data frame (reproducible example at the bottom) containing a column of values representing precipitation volume, a column of date-of-measurement values, and a column each for lat, lon, and ...
2
votes
2answers
109 views

What is a suitable impute function for Non Linear TS data?

I'm trying to fill in missing data in R. It's a simple variable, with a date. I'm using the ImputeTS but when I map the output I can tell the data is out. In Excel, when I use a straight line ...
1
vote
1answer
647 views

Strange behavior of the na.kalman function from the R imputeTS package

I am experimenting with functions from the imputeTS package. This package provides several functions to impute missing values in univariate time series data. I tested them and they all great, except ...
1
vote
1answer
72 views

Time Series Package that Replaces NA values as a Forecast [closed]

I have a dataset like below: Date Metric1 Metric2 Metric3 Metric4 2017-01-01 NA 3 NA 7 2017-01-02 NA ...
1
vote
2answers
719 views

Interpolation of time series of missing values in a column in r

I have currently looked at imputeTS and zoo packages but it does not see to work Current data is.. group/timeseries(character) 1 2017-05-17 04:00:00 1 2017-05-17 04:01:00 1 NA 1 ...
1
vote
1answer
53 views

Why some R packages can't be installed

I've been using R for a while and everything was normal when installing packages. Recently, I upgraded R on my Ubuntu 16.04 from 3.4.4 to 4.0.2 and then I tried to install the package imputeTS as > ...
1
vote
1answer
21 views

Calculate average gap size in time series by extracting data from imputeTS functions

I need to calculate the average gap size of a univariate time-series data set. imputeTS package generates plots using this data. Is it possible to extract the 'gap size' and the 'number of occurrence' ...
1
vote
0answers
208 views

Gap filling seasonal data (missing data imputation) Kalman filter in R

I am trying to gap-fill weather data, my data is half-hourly, but here I prepared a reproducible code for hourly data. Because the weather data is seasonal, first I create a time series using stat::ts(...

15 30 50 per page