SalienceByCode: SalienceByCode

View source: R/SalienceByCode.R

SalienceByCodeR Documentation

SalienceByCode

Description

Generate a table containing salience details for each code, including mean Salience, and total salience over the entire survey set. This function should be preceded by Calculate Salience.

Usage

SalienceByCode(mydata, CODE = "CODE", Salience = "Salience", Subj = "Subj", dealWithDoubles = "DEFAULT")

Arguments

mydata

A table containing a list of free-list responses. Each response gets one row, containing the subject number, CODE, and calculated Salience of their response.

CODE

The name of the column containing the "CODE" of the response. This is your free-list data. Since some free-list data will get lumped using some form of coding rubric, we have called this "CODE" by default (of course, you can call it whatever you wish, but you must include this in the syntax).

Salience

The name of the Column containing the "Salience" of a response.

dealWithDoubles

How you would like the function to deal with cases where a single survey respondent gave the same answer multiple times. On the default setting, the function will assume that no such cases arise, and will throw an error if it encounters such a case. Aside from DEFAULT, you also have the options MAX, SUM and IGNORE. MAX indicates that for each code, you want the computer to note the first time a respondent lists a particular CODE, and ignore subsequent mentions. For SUM, you are asking the computer to determine each respondent's TOTAL salience with respect to a given code, while MEAN calculates their average salience (This option is considered unusual, on the grounds that mentioning additional times on the list will actively reduce its mean salience. This seems counter to the intention here, but is still an avaliable option). IGNORE tells the computer not to think about it, and is merely a way of suppressing errors. IGNORE is not recommended.

subj

The name of the column containing the subject number.

Value

Upon running this function, you will receive a data frame, where each row is one of you possible response codes, and each column contains a different statistic about the code. MeanSalience is the average salience of a code, averaged over the number of responses that referenced that code. Sum Salience just gives the total amount of salience of a given code, and SmithsS gives this sum, divided by the total number of respondents.

Author(s)

Alastair Jamieson Lane. <aja107@math.ubc.ca>

Benjamin Grant Purzycki. <bgpurzycki@cas.au.dk>

References

Quinlan, M. (2005). Considerations for collecting freelists in the field: Examples from ethobotany. Field Methods, 17(3), 219-234. http://doi.org/10.1177/1525822X05277460

Examples

data(FruitList)
test<- CalculateSalience(FruitList)
SalienceByCode(test,dealWithDoubles="MAX")

data(WorldList)
test<- CalculateSalience(WorldList,GROUPING="GROUPING")
SalienceByCode(test,dealWithDoubles="MAX",GROUPING="GROUPING")



alastair-JL/AnthroTools documentation built on Aug. 29, 2024, 9:36 a.m.