Estimate function for missing values

Hello,

I'm trying to make estimates of missing values in my dataset.
In my dataset I have distance, time and speed
However, I am missing time and therefore speed data.
Is there a way to estimate time and speed from known data? Is it possible to create as a model on R to be able to have a theoretical time?

Here is an example of my dataset that I simplified. It is more complex in nature than that because it is more partitioned :

df <- tribble(
  ~time, ~depth, ~speed,  
  8, 400, 50, 
  15, 400, 26.67, 
  17.25, 390, 22.61, 
  23, 526, 22.87,
  NA, 330, NA, 
  NA, 240, NA, 
)

Created on 2022-05-17 by the reprex package (v2.0.1)

Thanks very much

Hi,

I think you might want to check out the mice package. It has great functions for both showing where the missing values are and replacing them.

Here is a starter tutorial: Handling missing data with MICE package; a simple approach | DataScience+

Hope this helps,
PJ

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.