search for: logl1

Displaying 1 result from an estimated 1 matches for "logl1".

Did you mean: log1
2011 Nov 23
6
Incomplete final line (Antonio José Sáez)
...as versiones anteriores. #Doble Pareto con p=1/2 y mismo lambda (simétrica) probando<-function(data=NULL,p0=c(1,1),method=1,iters=10000,print.level=0){ x<-data n<-length(x) x.pos<-x[x>=0] n.pos<-length(x.pos) x.neg<-x[x<0] n.neg<-length(x.neg) p0l<-p0[1] p0s<-p0[2] logL1<-function(p){ l1<-exp(p[1]) l2<-l1 s<-exp(p[2]) -(n.neg*log(l1)+n.pos*log(l2) -l1*sum(log(1-x.neg/s))-l2*sum(log(1+x.pos/s)) -sum(log(1+abs(x)/s)) -n*log(s)+n*log(0.5) ) } if (method==1){ p0<-c(log(p0l),log(p0s)) fit<-nlm(logL1,p=p0,hessian= TRUE,iterlim=iters,print...