Description Usage Arguments Details Value References See Also
View source: R/Combined_cutoff_percent.R
Combined_cutoff_percent
returns dataframe of percent of assessment per ID flagged by two cutoff values: Standard Deviation per assessment and Time per Item.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Combined_cutoff_percent(
data,
SD.cutoff,
SD.condition,
TPI.cutoff,
TPI.condition,
Perc.Mode.cutoff,
Perc.Mode.condition,
Combined.logic,
ttc.colnames,
number.items,
mandatory.response,
item.colnames,
ID.colname
)
|
data |
dataframe to be analyzed. |
SD.cutoff |
numeric cutoff value for Standard Deviation, 'default' value set to 5. |
SD.condition |
character string of condition that is desired for comparison of data to SD cutoff value, i.e <, >=, etc. 'Default' logic set to "<=". |
TPI.cutoff |
numeric cutoff value for Time per Item, 'default' value set to 1. |
TPI.condition |
character string of condition that is desired for comparison of data to TPI cutoff value, i.e <, >=, etc. 'Default' logic set to "<=". |
Perc.Mode.cutoff |
numeric cutoff value for the Percent of Item scores at Mode, 'default' value set to 0.7. |
Perc.Mode.condition |
character string of condition that is desired for comparison of data to Percent of Items at Mode cutoff value, i.e <, >=, etc. 'Default' logic set to ">=". |
Combined.logic |
character string of logic that is desired for classifying the use of the SD, TPI, and Percent of Items at Mode cutoff values, 'default' logic set to 'OR'. |
ttc.colnames |
vector of column names of "Start Time" and "End Time" to calculate time to complete, also can be "Completion Time" if already calculated. |
number.items |
integer, number of items per assessment. |
mandatory.response |
logical value based on whether response to items in each assessment were mandatory to complete. |
item.colnames |
vector of column names of all items/questions to be used to calculate item score Standard Deviation responses. |
ID.colname |
character string of column name for ID of assessment. |
This function creates the dataframe that includes the ID and the percentage of assessments that met the cutoff criteria for Standard Deviation per assessment, Time per Item, and Percent of Items at Mode . The percentage is calculated as number of assessments that met both criteria by the total number of assessments for the individual ID. If an assessment has a Standard Deviation less than or equal to the cutoff value, a Time per Item less than or equal to the cutoff value, or the Percent of Items scores at the Mode is greater than or equal to the cutoff value, it will be flagged and placed in the dataframe. This function uses the Boolean logic "OR" in order to identify assessments that meet any of the listed criteria. This function allows users to customize cutoff conditions for each separate cutoff to "<", ">", "<=", ">=". The default values for the cutoff conditions will be set as described before. This function allows users to customize the Boolean logic to "AND", "OR". The default values for the Boolean logic will be set as "OR" between all three criteria.
The item "ttc.colnames"
must be the names of columns, corresponding to Start Time and End Time, ordered ttc.colnames = c("StartTime", "EndTime")
start time first, followed by end time. If the data includes assessment duration, then list the column name that corresponds with assessment completion: ttc.colnames = "SurveyDuration"
The item "mandatory.response"
should be TRUE
if participants were required to complete all items per assessment. This item should be FALSE
if not all items were required to be completed per assessment.
If there is variability in the items that are asked, mark the item "mandatory.response"
as FALSE
and ensure that "item.colnames"
includes all items.
Jaso, B.A., Kraus, N.I., Heller, A.S. (2020) Identification of careless responding in ecological momentary assessment: from post-hoc analyses to real-time data monitoring.
Combined_cutoff
for a similar function, presenting a dataframe that includes the ID and index of assessments that met the cutoff criteria specified rather than a dataframe of percentages.
See the following functions for more information on Careless Response Identification in EMA: flagging_df
, flagging_plots
, longstringr
, SD_cutoff
, TPI_cutoff
, and Perc_Mode_cutoff
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.