set_association: Set latent associations for survey

Description Usage Arguments Note Author(s) Examples

Description

Use this function to specify latent associations and other variables of special significance in the data. Beside latents, typical values are: mainentity subentity complaint oa_positive oa_negative statement_categorical statement_metric etc. You can also (auto) look for common associations.

Usage

1
2
3
set_association(survey, ..., common = FALSE)

get_association(srv, association)

Arguments

survey

A survey object.

...

The latent associations you would like to set. See examples.

common

If set to TRUE, the function sets common associations automatically. Typically, this will succesfully mark latents and mainentity.

Note

Use none to remove latent association. See examples.

Author(s)

Kristian D. Olsen

Examples

1
2
3
4
x <- survey(data.frame("test" = 1, stringsAsFactors = FALSE))
x <- x %>% add_mm() %>% set_association(mainentity = "q1", complaint = "q17") 
x %>% add_entities() %>% add_weights()
x %>% set_association(none = "q1") # to remove

itsdalmo/reporttool documentation built on May 18, 2019, 7:11 a.m.