ch.moralsAnalyzeLearningEffect: A function to analyze learning effects

ch.moralsAnalyzeLearningEffectR Documentation

A function to analyze learning effects

Description

This function attempts to fit a non-linear, decelerating function to the specified data; adds the predicted and residual datapoints to the dataframe; and plots the learning function.

Usage

ch.moralsAnalyzeLearningEffect(
  data,
  trialCol,
  RTCol,
  fitCol,
  resCol,
  params,
  filenameID = "gp"
)

Arguments

data

the morals dataframe after running through ch.moralsDataPrep().

trialCol

a string that specifies the name of the column in "data" that contains the trial number.

fitCol

a string that specifies the name of the new column that will contain the predicted datapoints.

resCol

a string that specifies the name of the new column that will contain the residual datapoints.

params

a list of parameters that are read in using "ch.readMoralsDBfile.r."

filenameID

a string that will be added to the file names and titles that makes them unique if you run this call several times.

RTcol

a string that specifies the name of the column in "data" that contains the RT for each trial.

Value

a list containing: data = original datafram with the new columns; nlsFit = the nls fit object.

Examples

ch.moralsAnalyzeLearningEffect (data=moralsData,"trial", "RT", "fitRT", "resRT", params)

ccpluncw/ccpl_R_chMorals documentation built on Feb. 4, 2024, 3:30 p.m.