In my work, I use l-moments for estimation and obtain a system of nonlinear equations. I am using the 'nleqslv' package in the R- program to solve these equations but am struggling to choose initial values. Is there any criteria to choose initial values in this package or is there any other method to solve these equations? My system of equations are given below.
simeqn=function(x){ y=numeric(4) y[1]=x[1]*(((gamma(1+x[2])*gamma(x[3]-x[2]))/gamma(x[3]))+((gamma(1- x[2])*gamma(x[4]+x[2]))/gamma(x[4])))- 38353 y[2]=x[1]*gamma(1+x[2])*((gamma(x[3]-x[2])/gamma(x[3]))-(gamma(2*x[3]-x[2])/gamma(2*x[3]))-(gamma(x[4]+x[2])/gamma(x[4]))+(gamma(2*x[4]+x[2])/gamma(2*x[4])))- 3759.473 y[3]=x[1]*gamma(1+x[2])*((gamma(x[3]-x[2])/gamma(x[3]))-(3*gamma(2*x[3]-x[2])/gamma(2*x[3]))+(2*gamma(3*x[3]-x[2])/gamma(3*x[3]))+(gamma(x[4]+x[2])/gamma(x[4]))-(3*gamma(2*x[4]+x[2])/gamma(2*x[4]))+(2*gamma(3*x[4]+x[2])/gamma(3*x[4])))- 966.3958 y[4]= x[1]*gamma(1+x[2])*((gamma(x[3]-x[2])/gamma(x[3]))-(6*gamma(2*x[3]-x[2])/gamma(2*x[3]))+(10*gamma(3*x[3]-x[2])/gamma(3*x[3]))-(5*gamma(4*x[3]-x[2])/gamma(4*x[3]))-(gamma(x[4]+x[2])/gamma(x[4]))+(6*gamma(2*x[4]+x[2])/gamma(2*x[4]))-(10*gamma(3*x[4]+x[2])/gamma(3*x[4]))+(5*gamma(4*x[4]+x[2])/gamma(4*x[4])))- 500.952 y } [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.