Displaying 2 results from an estimated 2 matches for "mgf_gammasum".
2010 Nov 21
1
solve nonlinear equation using BBsolve
Hi r-users,
I would like to solve system of nonlinear equation using BBsolve function and
below is my code. I have 4 parameters and I have 4 eqns.
mgf_gammasum <- function(p)
{
t <- rep(NA, length(p))
mn <- 142.36
vr <- 9335.69
sk <- 0.8139635
kur <- 3.252591
rh <- 0.896
# cumulants
k1 <- p[1]*(p[2]+p[3])
k2 <- p[1]*(2*p[2]*p[3]*p[4] +p[2]^2+p[3]^2)
k3 <- 2*p[1]*(p[2]+p[3])*(p[2]^2 + p[3]^2 - p[2]*p[3] + 3*p[2]*p[3]*p[4])
k...
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...close
> to the value that I'm expected and it gives me the following message: I
> tried a few combination. My question is why it said "Unsuccessful
> convergence" but still give some answers? Can I use the answers?
>
>
>> p0 <- c(2.5,25,25,0.8)
>> mgf_gammasum(p0)
> [1] -17.3600000 -3410.6900000 0.3508769 -1.1028287
>> BBsolve(par = p0, fn = mgf_gammasum)[[1]]
> Unsuccessful convergence.
> [1] 2.066909 44.068739 24.809270 0.972542
>> source(.trPaths[5], echo=TRUE, max.deparse.length=10000)
>> p0 <- c(1.7,36,50,0...