GMD | R Documentation |
This function generates missing data in a specified column of a data frame according to a given missing ratio.
GMD(data, ratio)
data |
A data frame containing the linear regression model dataset |
ratio |
The missing ratio (e.g., 0.5 means 1/2 of data will be made missing) |
data0 |
A modified version of 'data' with missing values inserted. |
set.seed(123) # for reproducibility
data <- data.frame(x = 1:10, y = rnorm(10))
modified_data <- GMD(data, ratio = 0.5)
summary(modified_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.