tab_survey_question: Tabulate a survey question

Description Usage Arguments Details Value Author(s) Examples

View source: R/tabulate.R

Description

tab_survey_question Create a statistical table for a target question

Usage

1
tab_survey_question(surveydata, question_number)

Arguments

surveydata

List. A list of composed of tibbles of survey data, answers labels and questions labels, generated by load_data function.

question_number

Numeric. Number of the main question

Details

This function create a tibble table, with percent values for each answer and knowledge level for all sub-question (if any) regarding the target main question. It takes a survey data, select the main question, with it's respectives sub-questions, and calculate percent values for each answer, sub-question and knowledge level. Also for each sub-question, it makes a chi-square test for the correlation between responses and knowledge level. Finally, the function applies the question and answers labels.

Value

Tibble. Table with percent values and p-value (chi-squared test between knowledge level) for sub-questions and knowledge levels.

Author(s)

Leonardo Rocha

Examples

1
2
tab_survey_question(surveydata = AI_survey, question_number = 4)
tab_survey_question(AI_survey, 2)

leofmr/surveystats documentation built on March 19, 2021, 3:48 p.m.