[R] maximizing a function

2007-10-28 Thread Nigel . Walker
Hi list, I would like to maximize a likelihood function to obtain estimates. The problem is that i first have to have functions other functions that are in the likelihood that depend on the parameters. I was thinking of using optim but i do not know how to go about starting. A example of what i

[R] mar-arch code

2007-10-19 Thread Nigel . Walker
Hi there Does anyone know if there is an rcode (or another program code) for estimating time series with the MAR-ARCH model? An indication on where to obtain such a code would be great. Thanks Nigel __ R-help@r-project.org mailing list https://stat.et

[R] rearranging vectors

2007-10-11 Thread Nigel . Walker
Hi everyone I have a vector that I want to modify. A simple eg of what i want to do is below I have a vector x x<-c(1,2,3,4) I want to change this vector or make a new one such that x<-c(4,3,2,1) Any help would be great. I just want to swap the order. Thanks _

[R] saving simulation as .dat

2007-10-08 Thread Nigel . Walker
Hi group I have simulated some data using the garchSim and would like to save the series as a .dat file. I am not sure how to do this unfortunately any help would be appreciated. Thanks, Nigel __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] replacing NA's with various numbers

2007-10-05 Thread Nigel . Walker
Hi I have two vectors in the same style as x<-c(NA,NA,1,3,4,NA,1) y<-c(0,0,NA,NA,NA,0,NA) that is when x[ i ] = NA, y[ i ]=numeric. I wish to replace the NA's in x by the corresponding y value. Any help would be much appreciated. Nigel __ R-help@r-pr