Displaying 4 results from an estimated 4 matches for "kk_".
Did you mean:
kk
2009 Sep 20
1
Return a list from a .Call but segfaults
...r(), and type head(ll) i get valid
results.
However, i get a segfault when the code runs the next line
j <- append(j,ll)
(where j was defined as vector(mode='list') )
The code below looks alright, but it appears to crash when getting
copied.
Now one could blame message2rexp (in kk_), but once in R, the result
of .Call is assigned to ll, everything should be protected.
In fact, if in kk_ i simply return a VECSXP with 2 elements, no
errors, so one could conclude that message2rexp is to blame.
Yet, when i replace the code with R code, that is using readBin and
only callin...
2001 Feb 08
2
dnbinom(,size<1,)=0 (PR#842)
....0000000 0.0000000 0.0000000 #wrong!!
while, the correct result from Rw1011 is:
> dnbinom(0:5,.9,.4)
[1] 0.43838329 0.23672698 0.13493438 0.07826194 0.04578323 0.02692054
I have added a corrected dnbinom() below, which makes the program
works for Rw1021.
-YP-
x_ c(70, 38, 17, 10, 9, 6)
kk_ 0:5
n_ sum(x)
dnbinom_ function(x,n,p){
gamma(x+n)/gamma(n)/gamma(x+1)*p^n * (1-p)^x
}
fn_ function(p){
r_ p[1]
th_ p[2]
ll _ -sum(x[1:max(kk)]*log(dnbinom(kk[-length(kk)],r,th))) -
x[length(kk)]*log(1-pnbinom((max(kk)-1),r,th))
return(ll)
}
a_ nlm(fn,p=c(.9,.5...
2001 Feb 07
3
Goodness of fit to Poisson / NegBinomial
All,
I have some data on parasites on apple leaves and want to do a
goodness of fit test to a Poisson distribution. This seems to
do it:
mites <- c(rep(0,70),
rep(1,38),
rep(2,17),
rep(3,10),
rep(4,9),
rep(5,3),
rep(6,2),
rep(7,1))
tab <- table(mites)
NSU <- length(mites)
N <-
2009 Jul 23
1
[PATCH server] changes required for fedora rawhide inclusion.
...;mjnU+KL6^ju;O`C4zNxn;!2yN at xibXdPtDHyjU^NK?-4QYElCu?j
zK|g3WPxQYOR2uG`rdI*{HJ^krv0OWPkjNutUTB!izH!X&<O>b1 at s?FE%Ip)>EBivL
zCCl3E81^_h4O*Nz)A#1ptAXgk4ru1ZhBo$mQN&&U)HI<yDM5L18cce6NTgwfMAHbM
z<pbmFt}h6Gg{Gnymnk*K)6!Iwg{Gp+nu at 8#3VZ!rOd}wD>*`<ez5R_1u=w~=gG-iO
zn;Kk_%eA?|<<VSwh*J7O&q$Vb>KN8dod(s^GXI%pXrO1H2Fjv=a-Rmu+(6Hn)J8pL
zZJ}4R&?{QFO0kR<G_4|fAbsc8|Abb0U#3>N&`PiDq859CrMAkNYp)8c!Sl<<@!xa=
z*}EjayB;aoXrPI)e7tnQRW0n<M2wVkjP~(@IvAFd2$Idz(Dc5BSyW8t{TyFG at pF@N
z#vtSXQ+Y5{ixmo7%yaP|Gcz*HA^1~QeLglxr$1|5$%RK~s5<j{7`9 at XmUv;...