read_gpt | R Documentation |
Returns a gpt
object and checks model file and parameter restrictions
read_gpt(file, latent, restrictions = NULL)
file |
path to model file |
latent |
type of latent continuous distribution(s)
(e.g., |
restrictions |
list of restrictions for MPT and continuous parameters, e.g., |
The model file should have one line per MPT branch, with entries separated by semicolons in the following order:
Tree; Category; MPT equations; Continuous Parameters 1; Cont. Parameters 2
In the model file, the latent distributions are specified by parameters
corresponding to the distribution of each processing branch (separated by commas).
The definition of the parameters is listed in gpt_fit
.
An example for latent=c("normal","normal")
is:
#tree | ; cat | ; mpt | ; normal 1 |
|
; normal 2 |
||||
tree1 | ; hit | ; do | ; m1_d,s1 | ; m2_d,s2 |
tree1 | ; hit | ; (1-do)*g | ; m1_g,s1 | ; m2_g,s2 |
tree1 | ; miss | ; (1-do)*(1-g) | ; m1_g,s1 | ; m2_g,s2 |
tree2 | ; fa | ; (1-dn)*g | ; m1_g,s1 | ; m2_g,s2 |
tree2 | ; cr | ; (1-dn)*(1-g) | ; m1_g,s1 | ; m2_g,s2 |
tree2 | ; cr | ; dn | ; m1_d,s1 | ; m2_d,s2
|
file <- paste0(path.package("gpt"), "/models/2htm_2normal.txt")
read_gpt(file=file, latent=c("normal", "normal"))
# with restrictions:
read_gpt(file=file, latent=c("normal", "normal"),
restrictions=list("g=.5","s1=s2=1", "m1_g=m1_d"))
# list of example model files:
list.files(path = paste0(path.package("gpt"),"/models"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.