pp_compare: Comparison to Other Data

View source: R/pp_compare.R

pp_compareR Documentation

Comparison to Other Data

Description

Comparison to Other Data

Usage

pp_compare(x, estimated, actual, title)

Arguments

x

An object of class sf or data.frame including estimated and actual values

estimated

Population estimates using pp_estimate function

actual

Actual population values

title

Scatterplot title string

Value

A list including rmse, mae, linear model details and correlation coefficient

Examples

# read lib data
data('src')
data('trg')

# areal weighting interpolation - awi
awi <- pp_estimate(trg, src, sid = sid, spop = pop,
    method = awi)

# volume weighting interpolation - vwi
vwi <- pp_estimate(trg, src, sid = sid, spop = pop,
    method = vwi, volume = floors)

# awi - rmse
pp_compare(awi, estimated = pp_est, actual = rf,
    title ='awi')

# vwi - rmse
pp_compare(vwi, estimated = pp_est, actual = rf,
    title ='vwi')


populR documentation built on March 31, 2023, 9:11 p.m.