Description Usage Arguments Details Value Author(s) See Also Examples
The model is a synthesis of a mixture and a mixed effect model. The random effect distribution for the cluster term (often individuals) is a point mass for delta = 0 and a continuous distribution for delta > 0.
The function fits the model and computes dprime for an average subject, 2) the variance among subjects, 3) the "posterior" probability of a subject being a discriminator (with delta > 0), 4) the "posterior" expectation on the random effect (ie. the subjectspecific delta) and 5) the probability that a randomly chosen individual is a discriminator (ie. the probability mass at delta = 0 in the random effects distribution)
Warning: This function is preliminary; see the details for further information.
1 2 3 4 
formula 
A formula where the lhs is the binomial response. An
indicator vector or a matrix with two column; successes and failures
like in a call to 
data 
The 
weights 
Possible weights 
cluster 
The clustering variable; should be a factor. 
start 
Optional starting values; recommended in the current implementation 
subset 
... 
na.action 
... 
contrasts 
... 
hess 
Should the hessian of the parameters be computed? 
ranef 
Should the random effect estimates be computed? 
zi 
Should the posterior probabilities of a subject being a discriminator be computed? 
method 
Should correspond to the actual test applied. 
... 
Additional arguments to

This function is preliminary and improving it is ongoing work. The computational methods are expected to change completely. This will hopefully facilitate methods for more general rhsformulae with additional predictors.
Currently no methods or extractor functions have been written, so the user will have to select the relevant elements from the fitted object (see below). Implementation of methods and extractor functions will occur in due course.
A list with the following elements:
fpar 
The fixed effect parameter, ie. delta (for an average individual) 
rpar 
A vector with two elements: The first element is the variance component (standard deviation) on the logscale, where optimization is performed. The second element is the variance component (standard deviation) on the original scale. 
deviance 
Deviance for the model 
se 
standard errors for 1) the fixed effect parameter and 2) the variance component on the logscale 
convergence 
Convergence message from 
lli 
Loglikelihood contributions from each of the observations. 
ranef 
The random effect estimates for the levels of the clustering factor (often individual) 
zi 
posterior probabilities of a subject being a discriminator 
p 
The probability that a randomly chosen individual is a discriminator (ie. the probability mass for delta > 0 in the random effects distribution) 
fitted 
Fitted values 
Y 
The scaled response vector on which optimization is performed. 
call 
the matched call 
Rune Haubo B Christensen
triangle
, twoAFC
,
threeAFC
, duotrio
,
discrimPwr
, discrimSim
,
discrimSS
, samediff
,
AnotA
, findcr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## Not run:
freq < c(10,8,10,9,8,9,9,1,10,10,8,2,6,7,6,7,6,4,5,5,3,3,9,9,5,5,8,8,9,9)
tmp < data.frame(id = factor(1:30), n = rep(10, 30), freq = freq)
head(tmp)
str(tmp)
fm < discrimR(cbind(freq, n  freq) ~ 1, tmp, cluster = id,
start = c(.5, .5), method = "twoAFC",
ranef = TRUE, zi = TRUE, hess = TRUE,
control=list(trace=TRUE, REPORT=1))
names(fm)
fm[1:4]
## End(Not run)

id n freq
1 1 10 10
2 2 10 8
3 3 10 10
4 4 10 9
5 5 10 8
6 6 10 9
'data.frame': 30 obs. of 3 variables:
$ id : Factor w/ 30 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
$ n : num 10 10 10 10 10 10 10 10 10 10 ...
$ freq: num 10 8 10 9 8 9 9 1 10 10 ...
initial value 354.310895
iter 2 value 354.235417
iter 3 value 353.536148
iter 4 value 346.241395
iter 5 value 344.052705
iter 6 value 343.411973
iter 7 value 342.524277
iter 8 value 342.422180
iter 9 value 342.400170
iter 10 value 342.400137
iter 10 value 342.400136
iter 10 value 342.400136
final value 342.400136
converged
[1] "fpar" "rpar" "deviance" "se" "convergence"
[6] "lli" "ranef" "zi" "p" "fitted"
[11] "Y" "call"
$fpar
[1] 0.7803387
$rpar
[1] 0.175969 1.192401
$deviance
[1] 342.4001
$se
[1] 0.2047432 0.2248295
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.