[R] ErrError in f(x, ...) : object 'g.' not found

2012-04-26 Thread Guaramy
Hi , R is a new language for me so sorry in advance if this error is to basic for posting. I have tried the R manual and search online for quite a few, if anyone could help i would be very thankful. Here is my code. kappa = 1.1 theta = 0.1 sigma = 0.4 rho = -0.6 v0 = 0.2 r = 0.05 T = 0.5 s0 = 1

Re: [R] ErrError in f(x, ...) : object 'g.' not found

2012-04-26 Thread Guaramy
. in the next line. Just get rid of the typo. Sarah On Thu, Apr 26, 2012 at 1:43 PM, Guaramy [hidden email] wrote: Hi , R is a new language for me so sorry in advance if this error is to basic for posting. I have tried the R manual and search online for quite a few, if anyone could help i

[R] Problem with integration on Heston model

2012-04-19 Thread Guaramy
Hi , I am writing some code to evaluate a price of an option with heston model. My problem is that i need one variable to be generic . Hestonf = function(phi,kappa,theta,sigma,rho,v0,r,T,s0,type) { if (type == 1) { u = 0.5; b = kappa-rho*sigma; } else { u = 0.5;

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Guaramy
Sorry but i didn't understand. Thanks for your answer. -- View this message in context: http://r.789695.n4.nabble.com/Error-in-integrate-int-fn-lower-0-upper-Inf-evaluation-of-function-gave-a-result-of-wrong-length-tp4541250p4542101.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Guaramy
I read it believe me . The reason that a i post this is because i am making a thesis and a i am having this problem for over 2 weeks. I canĀ“t solve it and its causing me real problems. Sorry for any inconvenience Thanks -- View this message in context:

Re: [R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-09 Thread Guaramy
Tanks a lot to all of you that take the time to help me. This is a really useful and helpful forum and i will try to help as much as i can Best Regards Jorge -- View this message in context:

[R] Error in integrate(int.fn, lower = 0, upper = Inf) : evaluation of function gave a result of wrong length

2012-04-08 Thread Guaramy
Hi, i am writing a function to plot a pdf functions of a Generalized normal laplace distribution. The code is this { y = x-rho*mu cf.fn = function(s){ cplex = complex(1,0,1) temp1 = alpha*beta*exp(-sigma*s^2/2) temp2 =

Re: [R] Error, Variable is missing

2012-04-02 Thread Guaramy
Thanks Michael , its works perfectly now. -- View this message in context: http://r.789695.n4.nabble.com/Error-Variable-is-missing-tp4515418p4526683.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Error in gamma(delta + (complex(0, 0, 1) * (x - mu))/alpha) : unimplemented complex function

2012-04-02 Thread Guaramy
I am trying to obtain the grafic of a pdf . but this error keeps showing . Here is the code MXN.fd = function(x,alpha,beta,mu,delta) { A = (2*cos(beta/2))^(2*delta) B = 2*alpha*pi*gamma(2*delta) C = (beta*(x-mu))/alpha D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2) M = A/B*exp(C)*D M

[R] Error, Variable is missing

2012-03-29 Thread Guaramy
Hi, I am writing a function to plot a pdf of a distribution x=seq(-4,4,length=200) mu = 0 sigma = 0.01 alpha = 17.5 beta = 17.5 rho = 0.1 GNL.pdf.fn = function(x,mu,sigma,alpha,beta,rho) { y = x-rho*mu cf.fn = function(s){ cplex = complex(1,0,1)

[R] Error, Variable is Missing

2012-03-29 Thread Guaramy
Hi, I am writing a function to plot a pdf of a distribution, GNL.pdf.fn = function(x,mu,sigma,alpha,beta,rho) { y = x-rho*mu cf.fn = function(s){ cplex = complex(1,0,1) temp1 = alpha*beta*exp(-sigma*s^2/2) temp2 =