This function calculates all sample and study characteristics
mentioned in the results section of the manuscript from the
raw data (see read_data
). The function calculates
the descriptive results at the latest passed checkpoint if not
determined otherwise with the `which_checkpoint` param.
sample_descriptives(raw_data, which_checkpoint = NA_integer_)
dataframe, all trials included in the study
integer, index of the checkpoint to use
The function returns a list of descriptive results regarding the sample until the latest or prespecified checkpoint.
This function can be used only in which the number of erotic
trials reach the first checkpoint at least. Otherwise please
use the sample_descriptives_current
function
to see a simple study characteristics summary.
# \donttest{
sample_descriptives(raw_data = example_m0, which_checkpoint = NA_integer_)
#> $n_participants_started_session_total
#> [1] 3000
#>
#> $n_participants_started_session_untilstudystop
#> [1] 2201
#>
#> $n_participants_started_session_afterstudystop
#> [1] 799
#>
#> $sample_size_participants_atleast1erotictrial
#> [1] 2944
#>
#> $n_participants_data_included_in_main_analysis
#> [1] 2165
#>
#> $proportion_participants_novaliddata_untilstudystop
#> [1] 0.0163562
#>
#> $total_n
#> [1] 37836
#>
#> $age_range_of_most_participants
#> [1] "18-29"
#>
#> $age_range_of_most_participants_proportion
#> [1] 50.30023
#>
#> $n_sex_women
#> [1] 1054
#>
#> $n_sex_men
#> [1] 1111
#>
#> $proportion_sex_women
#> [1] 48.6836
#>
#> $proportion_sex_men
#> [1] 51.3164
#>
#> $esp_q_desc
#> # A tibble: 1 × 2
#> mean sd
#> <dbl> <dbl>
#> 1 2.97 1.41
#>
#> $ss_q_desc
#> # A tibble: 1 × 2
#> mean sd
#> <dbl> <dbl>
#> 1 2.98 0.97
#>
#> $n_guessed_side_left
#> [1] 19103
#>
#> $proportion_guessed_side_left
#> [1] 50.48895
#>
#> $n_target_side_left
#> [1] 18821
#>
#> $proportion_target_side_left
#> [1] 49.74363
#>
#> $n_missing_erotic_trials
#> [1] 1134
#>
#> $n_sessions_terminated
#> [1] 129
#>
#> $proportion_sessions_terminated
#> [1] 5.95843
#>
#> $prop_success
#> [1] 49.51
#>
# }