predict_dominance: Predict hemispheric dominance

Description Usage Arguments Value References Examples

View source: R/predict_dominance.R

Description

Predict hemispheric dominance based on observed laterality measures, using the methods described in \insertCiteSorensen2020;textualBayesianLaterality.

Usage

1
2
3
4
5
6
7
8
predict_dominance(
  data,
  parameters = dplyr::tibble(dominance = rep(c("left", "right", "none"), each = 2),
    handedness = rep(c("left", "right"), 3), mean_li = c(10, 12, -24, -24, 0, 0), sd_li =
    c(24.9, 17, 24.9, 17, 22, 22), prob_dominance = c(0.65, 0.87, 0.35, 0.13, 0, 0)),
  truncation = c(-100, 100),
  icc = 0
)

Arguments

data

Data frame with the following columns:

  • listening: Score between -100 and 100.

  • handedness: "left" for adextral (non-right-handed) and "right" for dextral (right-handed)

In addition, an optional column named ID can be provided, giving the subject ID. If a subject has multiple measurements, the posterior based on all measurements is provided. If the ID column is missing, each row is assumed to be measured on a separate subject.

parameters

Data frame in which the first two columns specify combinations of hemispheric dominance and handedness and the last three columns specify the corresponding parameter values. In particular, the columns are defined as follows:

  • dominance: character specifying hemispheric dominance.

  • handedness: character specifying handedness.

  • mean_li: mean dichotic listening score.

  • sd_li: standard deviation of dichotic listening score.

  • prob_dominance: probability of hemispheric dominance given handedness.

truncation

Numeric vector with two elements specifying the lower and upper bounds for truncation of the normal distribution for dichotic listening scores.

icc

Intraclass correlation for repeated measurements on the same individual. Defaults to 0.

Value

The probability of left or right hemispheric dominance in additional columns of data.

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# The package comes with two example datasets.
# The first contains single measurements on three subjects.
# We can first take a look at the data
example_data1
# Next, compute predictions.
# Since there is no ID column, predict_dominance() will print a message telling
# the user that the rows are assumed to contain observations from different subjects.
predict_dominance(example_data1)

# The next example dataset contains repeated measurements
example_data2

# We compute the predictions as before:
predict_dominance(example_data2)

BayesianLaterality documentation built on Oct. 23, 2020, 6:17 p.m.