transform_to_elogit {VWPre}R Documentation

Transforms proportion looks to empirical logits.

Description

transform_to_elogit transforms the proportion of looks for each interest area to empirical logits. Proportions are inherently bound between 0 and 1 and are therefore not suitable for some types of analysis. Logits provide an unbounded measure, though range from negative infinity to infinity, so it is important to know that this logit function adds a constant (hence, empirical logit). Additionally this calculates weights which estimate the variance in each bin (because the variance of the logit depends on the mean). This is important for regression analyses. N.B.: This function will work for data with a maximum of 8 interest areas.

Usage

transform_to_elogit(
  data,
  NoIA = NULL,
  ObsPerBin = NULL,
  Constant = 0.5,
  ObsOverride = FALSE
)

Arguments

data

A data table object output by bin_prop.

NoIA

A positive integer indicating the number of interest areas defined when creating the study.

ObsPerBin

A positive integer indicating the number of observations to use in the calculation. Typically, this will be the number of samples per bin, which can be determined with check_samples_per_bin.

Constant

A positive number used for the empirical logit and weights calculation; by default, 0.5 as in Barr (2008).

ObsOverride

A logical value controlling restrictions on the value provided to ObsPerBin. Default value is FALSE.

Details

These calculations were adapted from: Barr, D. J., (2008) Analyzing 'visual world' eyetracking data using multilevel logistic regression, Journal of Memory and Language, 59(4), 457–474.

Value

A data table with additional columns (the number of which depends on the number of interest areas specified) added to data.

Examples

## Not run: 
library(VWPre)
# Convert proportions to empirical logits and calculate weights...
df <- transform_to_elogit(dat, NoIA = 4, ObsPerBin = 20, Constant = 0.5)

## End(Not run)

[Package VWPre version 1.2.4 Index]