estimate_r_squared: Estimates R^2 (r-squared) values for a range of number of...

Description Usage Arguments Details Value

View source: R/estimate_r_squared.R

Description

Estimates R^2 (r-squared) values for a range of number of profiles

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
estimate_r_squared(
  df,
  ...,
  to_center = FALSE,
  to_scale = FALSE,
  distance_metric = "squared_euclidean",
  linkage = "complete",
  lower_bound = 2,
  upper_bound = 9,
  r_squared_table = TRUE
)

Arguments

df

with two or more columns with continuous variables

...

unquoted variable names separated by commas

to_center

(TRUE or FALSE) for whether to center the raw data with M = 0

to_scale

Boolean (TRUE or FALSE) for whether to scale the raw data with SD = 1

distance_metric

Distance metric to use for hierarchical clustering; "squared_euclidean" is default but more options are available (see ?hclust)

linkage

Linkage method to use for hierarchical clustering; "complete" is default but more options are available (see ?dist)

lower_bound

the smallest number of profiles in the range of number of profiles to explore; defaults to 2

upper_bound

the largest number of profiles in the range of number of profiles to explore; defaults to 9

r_squared_table

if TRUE (default), then a table, rather than a plot, is returned; defaults to FALSE

Details

Returns ggplot2 plot of cluster centroids

Value

A list containing a ggplot2 object and a tibble for the R^2 values


prcr documentation built on Feb. 9, 2020, 5:08 p.m.