Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelRausch committed Apr 12, 2024
1 parent 3b9e41d commit 48a31fa
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 189 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ usefulltools.R
^\.Rproj\.user$
LICENSE
README.rmd
paper.bib
paper.md
softbib.Rmd
softbib.bib
softbib.tex
10 changes: 5 additions & 5 deletions R/fitConf.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@
#'
#' @export
fitConf <- function(data, model = "SDT",
diffCond = NULL, stimulus = NULL, correct = NULL, rating = NULL,
# diffCond = NULL, stimulus = NULL, correct = NULL, rating = NULL,
nInits = 5, nRestart = 4) {
if (!is.null(diffCond)) data$diffCond <- data[,diffCond]
if (!is.null(stimulus)) data$stimulus <- data[,stimulus]
if (!is.null(correct)) data$correct <- data[,correct]
if (!is.null(rating)) data$rating <- data[,rating]
# if (!is.null(diffCond)) data$diffCond <- data[,diffCond]
# if (!is.null(stimulus)) data$stimulus <- data[,stimulus]
# if (!is.null(correct)) data$correct <- data[,correct]
# if (!is.null(rating)) data$rating <- data[,rating]
if (is.null(data$diffCond)) data$diffCond <- 1
if (!is.factor(data$diffCond)) {
data$diffCond <- factor(data$diffCond)
Expand Down
10 changes: 5 additions & 5 deletions R/fitConfModels.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@

#' @export
fitConfModels <- function(data, models="all",
diffCond = NULL, stimulus = NULL, correct = NULL, rating = NULL,
# diffCond = NULL, stimulus = NULL, correct = NULL, rating = NULL,
nInits = 5, nRestart = 4,
.parallel=FALSE, n.cores=NULL) {
AllModels <- c('WEV', 'SDT','IG','ITGc',
Expand All @@ -224,10 +224,10 @@ fitConfModels <- function(data, models="all",
warning("Duplicate models are dropped")
models <- unique(models)
}
if (!is.null(diffCond)) data$diffCond <- data[,diffCond]
if (!is.null(stimulus)) data$stimulus <- data[,stimulus]
if (!is.null(correct)) data$correct <- data[,correct]
if (!is.null(rating)) data$rating <- data[,rating]
# if (!is.null(diffCond)) data$diffCond <- data[,diffCond]
# if (!is.null(stimulus)) data$stimulus <- data[,stimulus]
# if (!is.null(correct)) data$correct <- data[,correct]
# if (!is.null(rating)) data$rating <- data[,rating]
if (is.null(data$diffCond)) data$diffCond <- factor(1)
if (!is.factor(data$diffCond)) {
data$diffCond <- factor(data$diffCond)
Expand Down
164 changes: 0 additions & 164 deletions R/int_fitRCE.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/simulateConf.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' # 1. define some parameters
#' paramDf <- data.frame(d_1 = 0, d_2 = 2, d_3 = 4,c = .0,
#' theta_minus.2 = -2, theta_minus.1 = -1, theta_plus.1 = 1, theta_plus.2 = 2,
#' sigma = 1/2, w = 0.5, nTrials = 500)
#' sigma = 1/2, w = 0.5, N = 500)
#' # 2. Simulate dataset
#' SimulatedData <- simConf(model = "WEV", paramDf)
#'
Expand Down
8 changes: 3 additions & 5 deletions man/MaskOri.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/fitConf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/fitConfModels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions man/simConf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48a31fa

Please sign in to comment.