pmse: Compute the pMSE metric between synthetic and real data

View source: R/measures.R

pmseR Documentation

Compute the pMSE metric between synthetic and real data

Description

The propensity mean squared error is defined as \frac{1}{N}\sum_{i=1}^N(p_i-c)^2, where c is the number of synthetic records, divided by the sum of the number of synthetic and real records.

Usage

pmse(synth, real, model = c("lr", "rf"), nrep = NULL)

Arguments

synth

[data.frame] Synthesized data.

real

[real] Data to compare with the synthesized data.

model

[character] Model used to compute propensity scores. Options are "lr": logistic regression, and "rf": random forest.

nrep

[integer] Number of model repetitions to average the pMSE value over. Ignored for lr.

Value

[numeric] scalar.

Examples

scars <- synthesize(cars)
pmse(scars, cars)


synthesizer documentation built on April 12, 2025, 2:27 a.m.