- Code: Select all
adjust.parameter.count(model, npar)
Here is the code I currently have:
- Code: Select all
run.kfm = function()
{
S.dot = list(formula = ~1)
S.group = list(formula = ~rt)
S.acc = list(formula = ~acc)
S.mme = list(formula = ~mme)
S.group.acc = list(formula = ~rt*acc)
S.group.acc.add = list(formula = ~rt+acc)
S.group.mme = list(formula = ~mme*rt)
S.group.mme.add = list(formula = ~mme+rt)
S.mme.acc = list(formula = ~mme*acc)
S.mme.acc.add = list(formula = ~mme+acc)
S.mme.acc.add = adjust.parameter.count(S.mme.acc.add, 4)
model.list = create.model.list("Known")
kfm.results = mark.wrapper(model.list,
data = kfm.process,
ddl = kfm.ddl)
return(kfm.results)
}
kfm.results = run.kfm()
kfm.results
But when I run the code, I get the error message
Error in if (model$results$npar != npar) { : argument is of length zero.
I have tried moving S.mme.acc.add = adjust.parameter.count(S.mme.acc.add, 4) around, but it still gives me the same error message. I am wondering if the error occurs because I am using mark.wrapper function. How should I change my code?
Any advice is appreciated. Thank you.