This looks an awful lot like you are trying to solve for d' in an
m-alternative forced choice experiment for an unbiased observer. Try
the function dprime.mAFC from the psyphy package. For comparison with
your example, it's code is:
psyphy:::dprime.mAFC
function (Pc, m)
{
m <- as.intege
Then:
1. Always cc the list;
2. Read and follow the posting guide: no HTML, plain text only.
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, May 27, 201
Homework? We generally don't do homework here.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, May 27, 2017 at 9:16 AM, Neetu Shah wrote:
> D
> On May 27, 2017, at 9:16 AM, Neetu Shah wrote:
>
> Dear Sir/Ma'am,
>
> I am trying to make a function to solve an equation that is given below:
> findH <- function(p_star, k){
> fun <- function(y){
> (pnorm(y+h))^(k-1)*dnorm(y)
> }
> lhs <- integrate(fun, -Inf, Inf)$value
> return(uniroot(lhs
Dear Sir/Ma'am,
I am trying to make a function to solve an equation that is given below:
findH <- function(p_star, k){
fun <- function(y){
(pnorm(y+h))^(k-1)*dnorm(y)
}
lhs <- integrate(fun, -Inf, Inf)$value
return(uniroot(lhs, lower = -10, upper = 10,
tol = p_star)$root)
}
In lhs, I integrated a
5 matches
Mail list logo