ch.plot.lm: Graph function for Values Experiment

ch.plot.lmR Documentation

Graph function for Values Experiment

Description

This function creates a scatterplot (often a function of RT) as a function of an x variable (often overlap). It aldo fits a linear regression to the data. It outputs the fit of the function.

Usage

ch.plot.lm(
  x,
  y,
  plotTitle = NA,
  filename = NULL,
  cex1 = 1,
  printR2 = T,
  yLabel = NA,
  ylimMin = 0,
  ylimMax = 0,
  xlab = expression(paste("", Psi, "(value) Distributional overlap", sep = "")),
  ...
)

Arguments

x

the x variable for the x-axis (often overlap).

y

the y variable for the y-axis (often p(hit)).

plotTitle

a string with the title of the plot.

filename

a string with the filename of the pdf of the file to be saved. DEFAULT = NULL; no file saved.

cex1

a numeric value for cex: the relative size of the text in the graph. cex1 > 1 is bigger; cex1 < 1 is smaller. DEFAULT=1.

printR2

do you want the r square printed on the graph: TRUE/FALSE. DEFAULT=TRUE.

yLabel

a string with the title of y-axis. DEFAULT=NA.

ylimMin

a number denoting the minimum of the y-axis. DEFAULT=0.

ylimMax

a number denoting the maximum of the y-axis. DEFAULT=0. If ylimMin == ylimMax, the function determines a pretty y-axis for you.

Value

the fit the lm .

Examples

ch.plot.lm (x,y)

ccpluncw/ccpl_R_chutils documentation built on Nov. 22, 2024, 5:18 a.m.