Learn R Programming

filtro (version 0.2.0)

fill_safe_value: Fill safe value (singular)

Description

Fills in safe value for missing score, with an option to apply transformation. This is a singular scoring method. See fill_safe_values() for plural scoring method.

Value

A tibble of score results.

Arguments

x

A score class object (e.g., score_cor_pearson).

return_results

A logical value indicating whether to return results.

Details

If transform = TRUE, by default, all score objects use the identity transformation, except the correlation score object, which uses the absolute transformation.

Examples

Run this code

library(dplyr)

ames_subset <- modeldata::ames |>
  dplyr::select(
    Sale_Price,
    MS_SubClass,
    MS_Zoning,
    Lot_Frontage,
    Lot_Area,
    Street
  )
ames_subset <- ames_subset |>
  dplyr::mutate(Sale_Price = log10(Sale_Price))

ames_aov_pval_res <-
  score_aov_pval |>
  fit(Sale_Price ~ ., data = ames_subset)
ames_aov_pval_res@results

# Fill safe value
ames_aov_pval_res |> fill_safe_value(return_results = TRUE)

# Fill safe value, option to transform
ames_aov_pval_res |> fill_safe_value(return_results = TRUE, transform = TRUE)

Run the code above in your browser using DataLab