S-Lindley~distribution
dSL = function(x, p, log = FALSE) #log of pdf of S-Lindley model
{
n=count(x)
loglik <- (log(pi/2)+log(p^2)+log(1+x)-log(1+p)-(p*x)+
log(sin((pi/2)*(1+((x*p)/(1+p)))*exp(-x*p))))
if ( log == FALSE)
density <- exp(loglik)
else density <- loglik
return(density)
}
theta <- maxlogL(x =st, dist = "dSL",start = 0.59)
summary(theta)