search for: bazman76

Displaying 11 results from an estimated 11 matches for "bazman76".

2011 Jul 09
3
Confusing piece of R code
m0<-epxression((4*theta1*theta2-theta3^2)/(2*x*theta3^2)-0.5*theta1*x) params<-all.vars(m0) this reads all the params from m0 so theta1,2 and 3 correct? params<-params[-which(params=="x")] checks which params are multiplied by x? np<-length(params) for(i in 1:6){ esp<-get(sprintf("m%d",i-1))
2011 May 15
3
Adding dates to time series
Hi there, I have a spreadsheet in excel which consists of first column of dates and then subsequent columns that refer to prices of different securities on those dates. (the first row contains each series name) I saved the excel file as type csv and then imported to excel using prices=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Option prices.csv",header = TRUE, sep
2012 Sep 23
3
Confused by code?
x<-matrix(c(1,0,0,0,1,0,0,0,1),nrow=3) > y<-matrix(c(0,0,0,1,0,0,1,1,0),nrow=3) > z<-matrix(c(0,1,0,0,1,0,1,0,0),nrow=3) > x[z]<-y[z] The resultant matrix x is all zeros except for the last two diagonal cells which are 1's. While y is lower triangualr 0's with the remaining cells all ones. I really don't understand how this deceptively simple looking piece of
2011 May 23
6
Reading Data from mle into excel?
Hi there, I ran the following code: vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption vols.csv" , header=TRUE, sep=",") X<-ts(vols[,2]) #X dcOU<-function(x,t,x0,theta,log=FALSE){ Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t) Vx<-theta[3]^2*(1-exp(-2*theta[2]*t))/(2*theta[2]) dnorm(x,mean=Ex,sd=sqrt(Vx),log=log) }
2011 May 12
1
R won't start keeps crashing
Hi there, I am reletively new user I only dowloaded is about a week ago. I was getting along fine but last night I tried to selected save workspace. Since then R will not work!!!! And I really really need it. There are two eror massages: The first if a pop up box is "Fatal error: unable to resolve data in .RData." The second is a message in the GUI: "Error in
2011 Oct 27
1
Correllogram of Daily Time Series
Hi there, What is the best way to get a time series of daily stock price observations into R (from excel). The time series are daily but there are spaces for w/e's and holidays etc. So I am not sure a ts object will be suitable but I am not sure what I should use? What ever package you recemmned i need to be able to run a corrolelagram. Thanks Hugh -- View this message in context:
2011 Oct 28
2
Split an array into arbirtary sizes
Hi there, I have a ts object that I would like wo split into arbirary sizes. Can'tfind how to do this? I realise its probaly very simple buy I can't sem to find the right function? -- View this message in context: http://r.789695.n4.nabble.com/Split-an-array-into-arbirtary-sizes-tp3948938p3948938.html Sent from the R help mailing list archive at Nabble.com.
2012 Sep 14
1
Parallel R
Hi there, I have a largish optimisation problem (10 years of daily observations). I want to optimise between 4 and 6 parameters. I'd like to utilise parallel computing if I can as I will have to run it with different starting values etc. I have a quad core PC with 16GB ram running windows 7. Having done a little reading it seems the two best options for me are: 1.) Use the academic
2012 Apr 01
1
Error in xy.coords(x, NULL, log = log) : (list) object cannot be coerced to type 'double'
Hi there, When I run the code below I get the error Error in xy.coords(x, NULL, log = log) :(list) object cannot be coerced to type 'double' Any tips how I can resolve this? > > library("waveslim") > > vols=read.csv(file="C:/Users/ocuk/My Documents/Abs Vol.csv", header=TRUE, > sep=",") > x<-c(vols[,1]) > #x > #data(ibm) >
2011 May 17
1
Problem with MLE
Hi there, I am trying to run the following code: > dcOU<-function(x,t,x0,theta,log=FALSE){ + Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t) + Vx<-theta[3]^2*(1-exp(-2*theta[2]*t))/(2*theta[2]) + dnorm(x,mean=Ex,sd=sqrt(Vx),log=log) + } > OU.lik<-function(theta1,theta2,theta3){ + n<-length(X) + dt<-deltat(X) +
2011 May 23
0
Error in backSpline.npolySpline(sp) : spline must be monotone
I get the following error: Error in backSpline.npolySpline(sp) : spline must be monotone Has anyone had this error before? any ideas on a workaround? > > vols=read.csv(file="C:/Documents and Settings/Hugh/My > Documents/PhD/Swaption vols.csv" + , header=TRUE, sep=",") > X<-ts(vols[,2]) > #X > > > dcOU<-function(x,t,x0,theta,log=FALSE){ +