Because of the unusual structure of my model, the number of parameters has to be adjusted down for each model. Here is the code to determine how many parameters to decrease the count by (it could be a lot simpler but I am trying figure out where it could be wrong). This is looped over all the models but I have just one model here.
- Code: Select all
 a = 1
x = grep("time",LIBL.models3[[309]]$parameters$Epsilon$formula)
l=length(x)
if (l>0) {b=a+2} else {b=a+1}
y = grep("time",LIBL.models3[[309]]$parameters$Gamma$formula)
m=length(y)
if (m>0) {c=b+2} else {c=b+1}
z = grep("session",LIBL.models3[[309]]$parameters$p$formula)
n=length(z)
if (n>0) {d=c+3} else {d=c+1}
newpar=LIBL.models3[[309]]$results$npar-d
Then I run
- Code: Select all
 adjust.parameter.count(LIBL.models3[[309]],newpar)
R prints out
- Code: Select all
 Number of parameters adjusted from 22 to 16
Adjusted AICc = 667.7911
Unadjusted AICc = 654.6893
and opens the MARK full output text file.
Then I run model.table again:
- Code: Select all
 LIBL.models3$model.table=model.table(LIBL.models3)
but nothing is changed.
Thanks,
Tyler