Learn R Programming

Momocs (version 1.4.1)

calibrate_r2: Quantitative r2 calibration for Opn objects

Description

Estimates the r2 to calibrate the degree for npoly and opoly methods. Also returns a plot

Usage

calibrate_r2()

calibrate_r2_opoly( Opn, id = 1:length(Opn), degree.range = 1:8, thresh = c(0.9, 0.95, 0.99, 0.999), plot = TRUE, ... )

calibrate_r2_npoly( Opn, id = 1:length(Opn), degree.range = 1:8, thresh = c(0.9, 0.95, 0.99, 0.999), plot = TRUE, ... )

Value

a ggpot2 object

Arguments

Opn

an Opn object

id

the ids of shapes on which to calculate r2 (all by default)

degree.range

on which to calculate r2

thresh

the threshold to return diagnostic

plot

logical whether to print the plot

...

useless here

Details

May be long, so you can estimate it on a sample either with id here, or one of sample_n or sample_frac

See Also

Other calibration: calibrate_deviations(), calibrate_harmonicpower(), calibrate_reconstructions

Examples

Run this code
olea %>% slice(1:5) %>% #for the sake of spped
    calibrate_r2_opoly(degree.range=1:5, thresh=c(0.9, 0.99))

olea %>% slice(1:5) %>% #for the sake of spped
    calibrate_r2_npoly(degree.range=1:5, thresh=c(0.9, 0.99))

Run the code above in your browser using DataLab