ICTatRTI / PersonAlyticsPower

PersonAlyticsPower: Power Analysis and Simulation for PersonAlytics
0 stars 1 forks source link

updating number of time points fails #14

Closed stueller closed 2 years ago

stueller commented 2 years ago

This example correctly updates the number of time points in inputMat but designCheck() fails to get the number correct

library(PersonAlyticsPower)
example(polyICT)
myPolyICT$inputMat
myPolyICT$yMean <- 0
myPolyICT$ySD <- 1
myPolyICT$inputMat[6,6] <- -.3
myPolyICT$inputMat[3,3] <- 100
myPolyICT$inputMat[6,3] <- 100

This results from makeData reading from myPolyICT$phases and myPolyICT$groups instread of from myPolyICT$inputMat. Updates read from inputMat.

In addition, updating inputMat does not update designMat.

stueller commented 2 years ago

The solution was to update phase objects, group objects, designMat, and inputMat any time there is a change to inputMat. Currently, inputMat is mutable but the other objects are read only and are updated internally in .active when inputMat is updated.