ce the
formula shown in the attached file where the exponents are w1 and w2,
respectively.
Thanks for your help
From: jlu...@ria.buffalo.edu [mailto:jlu...@ria.buffalo.edu]
Sent: 30 March 2015 16:01
To: T.Riedle
Cc: r-help@r-project.org; R-help
Subject: Re: [R] generating phi using function
ched file where the exponents are w1 and w2,
respectively.
Thanks for your help
From: jlu...@ria.buffalo.edu [mailto:jlu...@ria.buffalo.edu]
Sent: 30 March 2015 16:01
To: T.Riedle
Cc: r-help@r-project.org; R-help
Subject: Re: [R] generating phi using function()
Your function phi has 5 argume
> phi(c(1, 1), 44L, 1)
Error in phi(c(1, 1), 44L, 1) : argument "k" is missing, with no default
>
"T.Riedle"
Sent by: "R-help"
03/29/2015 08:59 AM
To
"r-help@r-project.org" ,
cc
Subject
[R] generating phi using function()
Hi e
The argument 'K' is missing since you are only passing four arguments to
the phi() function, but you defined it with five formal parameters. It
looks like the argument 'j' is not necessary in the function. It is an
unnecessary carry-over from the summation notation and it is never used
in th
Hi T.,
Your translation of the formula looks okay, and the error message is about
a missing argument. Perhaps you have not included the necessary arguments
to "phi" in the call to "mls".
Jim
On Sun, Mar 29, 2015 at 11:59 PM, T.Riedle wrote:
> Hi everybody,
> I am trying to generate the formula
Hi everybody,
I am trying to generate the formula shown in the attachment. My formula so far
looks as follows:
phi <- function(w1, w2, j, k, K){
zaehler <- (k/K)^(w1-1)*(1-k/K)^(w2-1)
nenner <- sum( ((1:K)/K)^(w1-1)*(1-(1:K)/K)^(w2-1))
return( zaehler/nenner )
}
Unfortunately something must be w
6 matches
Mail list logo