frequency_filter: Residualizes child counts by regressing on adult counts for...

Description Usage Arguments Value References Examples

View source: R/frequency_filter.R

Description

Residualizes child word counts by regressing on counts for the main adult interlocotur for the same words in the same transcripts. The input data should already be word counts by speaker for each transcript or timepoint. By default, counts are log transformed before regressing.

Usage

1
2
3
frequency_filter(data_input, chi.count = "chi.count",
  adu.count = "adu.count", min.types = 200, log = TRUE, base = exp(1),
  drop.zeros = TRUE, outlier_cutoff = 1, debug = FALSE)

Arguments

data_input

the dataframe of counts in child and adult speech

chi.count

the name of the column with child counts

adu.count

the name of the column with adult counts

min.types

the minimum number of types necessary to run regression at a given timepoint or transcript. If set to 0, it will attempt to fit a regression for every timepoint/transcript regardless of how many words are available. Note that it is inadvisable to use residuals from regressions fit at very sparse timepoints.

log

log transform counts before regressing? Default is TRUE.

base

the base to use for log transformation

drop.zeros

should zero-count words (words that never occur in adult speech, or never in child speech) be excluded? Default is TRUE, which restricts analysis to counts of words that are observed in both child and adult speech.

outlier_cutoff

how should outliers (exceptionally high or low residuals) be defined? Default is 1 SD.

debug

turn on to display extra messages while the function runs, useful for identifying problem transcripts. Default is FALSE.

Value

The original input data, with new variables added on providing results from the regressions including residual values for each word.

References

Ibbotson, Hartman, and Nilsson Bj<c3><b6>rkenstam. (in prep). "Frequency Filter: An Open Access Tool for Analysing Language Development".

Examples

1
frequency_filter(data_pos)

rosemm/FrequencyFilter documentation built on May 29, 2019, 8:50 a.m.