Learn R Programming

tipsae (version 1.0.3)

plot.smoothing_fitsae: Plot Method for smoothing_fitsae Object

Description

The plot() method provides (a) the boxplot of variance estimates, when effective sample sizes are estimated through kish method; (b) a scatterplot of both original and smoothed estimates versus the area sample sizes, when variance smoothing is performed through methods ols and gls.

Usage

# S3 method for smoothing_fitsae
plot(x, size = 2.5, alpha = 0.8, ...)

Value

A ggplot2 object.

Arguments

x

A smoothing_fitsae object.

size

Aesthetic option denoting the size of scatterplots points, see geom_point documentation.

alpha

Aesthetic option denoting the opacity of scatterplots points, see geom_point documentation.

...

Currently unused.

See Also

smoothing to produce the input object.

Examples

Run this code

library(tipsae)

# loading toy dataset
data("emilia_cs")

# perform smoothing procedure
smoo <- smoothing(emilia_cs, direct_estimates = "hcr", area_id = "id",
                  raw_variance = "vars", areas_sample_sizes = "n",
                  var_function = NULL, method = "ols")
plot(smoo)

Run the code above in your browser using DataLab