Displaying 1 result from an estimated 1 matches for "asepf".
2010 Jan 02
2
ifelse and piecewise function
...ram).
# Vector input, however, generates the following message:
# "In if (is.finite(lower)) { :the condition has length > 1 and only the
first element
# will be used"
# And, in fact, correct multiple values are not returned.
########################################################
ASEPF<- function(y, theta, sigma, alpha, kappa){
loww<-((theta - y)/(sigma* kappa))^alpha
upp<- (kappa *(y - theta)/sigma)^alpha
k<- 1/(1 + kappa^2)
a<- 1/alpha
integrand<- function(y){y^(a-1)* exp(-y)/gamma(1/alpha)}
GL<- integrate(integrand, lower = loww, upper= Inf)$value
G...