Calculate SSM parameters (without confidence intervals) for a set of scores and generate a tibble with customizable labels for each parameter value. This function requires the input to be a numeric vector (or coercable to one) and returns only the parameters. See ssm_score() for a similar function that calculates SSM parameters for each row of a data frame.

ssm_parameters(
  scores,
  angles,
  prefix = "",
  suffix = "",
  e_label = "Elev",
  x_label = "Xval",
  y_label = "Yval",
  a_label = "Ampl",
  d_label = "Disp",
  f_label = "Fit"
)

Arguments

scores

Required. A numeric vector (or single row data frame) containing one score for each of a set of circumplex scales.

angles

Required. A numeric vector containing the angular displacement of each circumplex scale included in scores (in degrees).

prefix

Optional. A string to append to the beginning of all of the SSM parameters' variable names (default = "").

suffix

Optional. A string to append to the end of all of the SSM parameters' variable names (default = "").

e_label

Optional. A string representing the variable name of the SSM elevation parameter (default = "Elev").

x_label

Optional. A string representing the variable name of the SSM x-value parameter (default = "Xval").

y_label

Optional. A string representing the variable name of the SSM y-value parameter (default = "Yval").

a_label

Optional. A string representing the variable name of the SSM amplitude parameter (default = "Ampl").

d_label

Optional. A string representing the variable name of the SSM displacement parameter (default = "Disp").

f_label

Optional. A string representing the variable name of the SSM fit or R-squared value (default = "Fit").

Value

A tibble containing the SSM parameters calculated from scores.

See also

Other ssm functions: ssm_analyze(), ssm_append(), ssm_plot(), ssm_score(), ssm_table()

Other analysis functions: ssm_analyze(), ssm_score()

Examples

# Manually enter octant scores scores <- c(0.55, 0.58, 0.62, 0.76, 1.21, 1.21, 1.48, 0.90) ssm_parameters(scores, angles = octants())
#> # A tibble: 1 x 6 #> Elev Xval Yval Ampl Disp Fit #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0.914 0.351 -0.252 0.432 324. 0.878
# Customize several of the labels ssm_parameters(scores, angles = octants(), x_label = "LOV", y_label = "DOM")
#> # A tibble: 1 x 6 #> Elev LOV DOM Ampl Disp Fit #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0.914 0.351 -0.252 0.432 324. 0.878
# Add a prefix to all labels ssm_parameters(scores, angles = octants(), prefix = "IIP_")
#> # A tibble: 1 x 6 #> IIP_Elev IIP_Xval IIP_Yval IIP_Ampl IIP_Disp IIP_Fit #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0.914 0.351 -0.252 0.432 324. 0.878