Displaying 2 results from an estimated 2 matches for "totalseedscaught".
2008 Feb 08
2
Catching NaNs from pweibull()
..., scale, lower.tail, log.p)
2: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p)
HERE IS THE CODE:
# Observed data
Prepens.caughtintraps = c(94,45,71,64,71,31,16,19,27,16,113)
# Numbers of seeds released
Prepens.released = 1250
distances = c(2,3,4,5,7.5,10,12.5,15,17.5,20,25)
totalseedscaught = sum(Prepens.caughtintraps)
Pcatch = totalseedscaught/Prepens.released
i=11
cumsumcaught = numeric(11)
while (i>0){
cumsumcaught[i] <- sum(Prepens.caughtintraps[i:11])
i=i-1
}
res.nls <- nls(cumsumcaught ~
Pcatch*Prepens.released*(1-pweibull(distances,k,l)),
start = list(k=1,l=12), tr...
2008 Oct 07
0
Algorithm = "port" convergence codes
...cal optimum here, or is this
quite normal?
Thanks in advance!
Rob
PS Please try to ignore the fact a distribution is being fitted to too few
data points!
##Code
Acancellata.caughtintraps = c(6,2,1,2,0,0,0,0,0,0,0)
Acancellata.released = 1250
distances = c(2,3,4,5,7.5,10,12.5,15,17.5,20,25)
totalseedscaught = sum(Acancellata.caughtintraps)
Pcatch = totalseedscaught/Acancellata.released
## Calculate cumulative seed numbers reaching each distance
cumsumcaught <- rev(cumsum(rev(Acancellata.caughtintraps)))
i = numeric(11)
i <- distances
## Gamma distribution
gamma.nls <- nls(cumsumcaught ~ P...