p.add.distances {vachette}R Documentation

Plot Distances Before and After vachette Transformation Assuming Additive Error Model

Description

This function generates a ggplot2 visualization of the distances before and after a vachette transformation between observations and the relative typical curves. It is useful for assessing the impact of additive error model assumption on the distances.

Usage

p.add.distances(vachette_data)

Arguments

vachette_data

An object of class vachette_data, which contains the necessary data for plotting.

Details

The function starts by setting the x-axis range based on the minimum and maximum values of the original and scaled distances. It then plots the distances before and after transformation, with a reference line indicating where the original and transformed distances are equal.

The plot's title includes the model name, and the caption provides details about the reference covariate(s) used.

Value

A ggplot2 object representing the plot of distances. The plot compares the original distances to the transformed distances, with segments color-coded.


[Package vachette version 0.40.1 Index]