garrett_rank: Garrett Ranking Analysis

View source: R/garrett_rank.R

garrett_rankR Documentation

Garrett Ranking Analysis

Description

Performs Garrett ranking analysis on respondent ranking data.

Usage

garrett_rank(data, respondent = NULL)

Arguments

data

A data.frame, matrix, CSV file path or Excel file path containing ranking data.

respondent

Optional respondent ID column name or column position to exclude before analysis.

Details

Each row must represent one respondent and each column one factor, constraint, or item. Each respondent must assign every rank from 1 to the number of factors exactly once.

Value

An object of class "garrett", which is a list containing:

ranking

A data.frame containing the factor names, mean Garrett scores, and final ranks. Mean_Score is the average Garrett score for each factor across all respondents. Higher mean Garrett scores indicate higher overall priority, and Rank = 1 represents the highest-ranked factor.

frequency

A data.frame containing the number of respondents assigning each possible rank to each factor, together with the corresponding percent positions and Garrett scores.

weighted_scores

A numeric matrix containing the rank frequencies multiplied by their corresponding Garrett scores. These values are used to calculate the mean Garrett score for each factor.

reference

A data.frame containing the standard Garrett conversion table used to convert percent positions into Garrett scores.

respondents

An integer giving the number of respondents included in the analysis.

factors

An integer giving the number of factors ranked by the respondents.

factor_names

A character vector containing the names of the ranked factors.

call

The matched function call used to create the object.

Examples


result <- garrett_rank(garrett_example,respondent = "Respondent")
summary(result)
result$ranking
result$frequency
result$weighted_scores


GarrettRank documentation built on Oct. 6, 2026, 5:07 p.m.