Learn R Programming

intsvy (version 2.9)

plot.intsvy.mean: Graphical representation of means in groups

Description

Functions pisa.mean, pisa.mean.pv, piaac.mean, piaac.mean.pv produce object of the class intsvy.mean. The function plot.intsvy.mean presents these means graphically.

Usage

# S3 method for intsvy.mean
plot(x, se = TRUE, sort = FALSE, ...)

Value

Returns object of ggplot class with dotplot. Works for one way, two-way and three-way effects.

Arguments

x

An object of the class intsvy.mean returned by pisa.mean, pisa.mean.pv, piaac.mean or piaac.mean.pv functions.

se

If TRUE add whiskers for standard errors.

sort

If TRUE groups are sorted along averages.

...

Not used. Required for cran-check.

See Also

plot.intsvy.table, plot.intsvy.reg

Examples

Run this code
if (FALSE) {
# Country averages
head(pmeansNC <- piaac.mean.pv(pvlabel="NUM", by="CNTRYID", data=piaac, export=FALSE))

# plotting country average NUM performance 
plot(pmeansNC) + ggtitle("Country performance in NUM")
# without se bars, not good idea
plot(pmeansNC, se=FALSE)
# sorted, thats better
plot(pmeansNC, sort=TRUE)

# Country averages for different age groups
head(pmeansNCA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "AGEG10LFS"), 
                        data=piaac, export=FALSE))
#
# plotting country average within 
# age groups NUM performance 
plot(pmeansNCA, sort=TRUE)

# Country averages for different age and gender groups (changed order)
head(pmeansNCGA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "GENDER_R", "AGEG10LFS"), 
                         data=piaac, export=FALSE))
#
# plotting country average within 
# age and gender groups NUM performance 
plot(na.omit(pmeansNCGA), sort=TRUE)

}

Run the code above in your browser using DataLab