Description Usage Arguments Value Author(s) See Also Examples

This function creates a user-specified number of simulated regression datasets, and compares mixed-effects regression with random regression, by-subject regression, by-item regression, and by-subject plus by-item regression. Optionally, an effect of learning or fatigue can be incorporated.

1 2 3 | ```
simulateRegression.fnc(beta = c(400, 2, 6, 4), nitem = 20, nsubj = 10,
stdevItem = 40, stdevSubj = 80, stdevError = 50, nruns = 100, learn = FALSE,
learnRate = 10, ...)
``` |

`beta` |
A numeric vector with beta weights for the intercept and three numeric predictors. |

`nitem` |
A number specifying the number of items. |

`nsubj` |
A number specifying the number of subjects. |

`stdevItem` |
A number specifying the standard deviation of the Item random effect. |

`stdevSubj` |
A number specifying the standard deviation of the Subject random effect. |

`stdevError` |
A number specifying the standard deviation of the Residual Error. |

`nruns` |
A number specifying the required number of simulated datasets. |

`learn` |
A logical that if TRUE, allows an effect of learning or fatigue into the model. |

`learnRate` |
A number specifying the learning rate (if negative) or the effect of fatigue (if positive). |

`...` |
other parameters to be passed through to plotting functions. |

A list with components

`alpha05` |
proportion of runs in which predictors are significant at the 05 significance level. |

`alpha01 ` |
proportion of runs in which predictors are significant at the 01 significance level. |

`ranef` |
mean estimated random effects. |

As this may take some time, the index of each completed run is shown on the output device.

R. H. Baayen

See Also `make.reg.fnc`

.

1 2 3 4 5 6 7 | ```
## Not run:
library(lme4)
simulateRegression.fnc(beta = c(400, 2, 6, 4), nruns = 5)
\dontrun{simulateRegression.fnc(beta = c(400, 2, 6, 0), nruns = 1000, learn = TRUE)}
## End(Not run)
``` |

languageR documentation built on May 30, 2017, 3:09 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.