Hi.
 
I have this error message:
 
Error in if (Y > 0) { : missing value where TRUE/FALSE needed
 
when I´m trying to run this code.
 
---------------------------------------------------
 
 
require (fBasics)
require (KernSmooth)
 
rm(list=ls())
 
#ler a base de dados
 
x<-scan(file="bcp_diario.csv")
 
 
# Estimate Parameters:
    hyp = hypFit(x)
    hyp.est = hyp@fit$estimate
    nig = nigFit(x)
    nig.est = nig@fit$estimate
    gh =
ghFit(x,alpha=hyp.est[1],beta=hyp.est[2],delta=hyp.est[3],mu=hyp.est[4],
lambda=0.7687)
    gh.est = gh@fit$estimate
    LLH = c(hyp = hyp@fit$minimum,
        nig = nig@fit$minimum, gh = gh@fit$minimum)
    
##########
    
 par(mfrow = c(2, 2))
 
qqplot(rnorm(10000,mean(x),sd(x)),x,type="p",col="black",
xlim=c(-0.07,0.07), ylim=c(-0.07,0.07))
abline(0,1)
 
qqplot(rhyp(10000, alpha=hyp.est[1],
beta=hyp.est[2],delta=hyp.est[3],mu=hyp.est[4]),x,type="p",col="black",
xlim=c(-0.07,0.07),ylim=c(-0.07,0.07))
abline(0,1)
 
qqplot(rnig(10000, alpha=nig.est[1],
beta=nig.est[2],delta=nig.est[3],mu=nig.est[4]),x,type="p",col="black",x
lim=c(-0.07,0.07),ylim=c(-0.07,0.07))
abline(0,1)
 
qqplot(rgh(10000, alpha=gh.est[1],
beta=gh.est[2],delta=gh.est[3],mu=gh.est[4],lambda=gh.est[5]),x,type="p"
,col="black", xlim=c(-0.07,0.07),ylim=c(-0.07,0.07))
abline(0,1)
 
----------------------------------------
 
 
Can anyone give me a hand to solve this problem. The problem is with rgh
function. The rest of the code runs well.
 
 
Thank you
 
 
Vítor Teixeira
 

	[[alternative HTML version deleted]]

