plot4ratios | R Documentation |
The function gets the output of the function of HBmethod
or ratioSize
when they are ran with the argument return.dataframe = TRUE
) to draw a scatter-plot of ratios vs. the corresponding importance measures.
plot4ratios(out)
out |
Is the output of |
This function draws a scatter-plot. With the output of HBmethod
the ratios (=yt2/yt1) are on Y axis while their importance measure ( max(yt1, yt2)^U) are represented on the X axis. With the output of ratioSize
on the Y axis the centered ratios are reported. In addition the acceptance bounds are drawn (blue lines); the dots (in red color) outside the bounds are the outliers. This is considered a useful diagnostic plot to understand how the procedure identifies the outliers.
A scatter-plot is drawn and, in addition, the output includes a data.frame with the data used to derive the plot.
Marcello D'Orazio mdo.statmatch@gmail.com
Hidiroglou, M.A. and Berthelot, J.-M. (1986) ‘Statistical editing and Imputation for Periodic Business Surveys’. Survey Methodology, Vol 12, pp. 73-83.
Hidiroglou, M.A. and Emond, N. (2018) ‘Modifying the Hidiroglou-Berthelot (HB) method’. Unpublished note, Business Survey Methods Division, Statistics Canada, May 18 2018.
HBmethod
, ratioSize
# generate some data set.seed(222) x0 <- rnorm(30, 50, 5) set.seed(333) rr <- runif(30, 0.9, 1.2) rr[10] <- 2 x1 <- x0 * rr # run HBmethod with argument return.dataframe = TRUE out <- HBmethod(yt1 = x0, yt2 = x1, return.dataframe = TRUE) # draw the scatterplot plot4ratios(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.