Dear r users, Few days ago I posted the same topic but unable to receive any suggestion. So I am asking this same question. I was trying to fit a garch(1,1) model to my dataset. But while executing I got a warning message "NaNs produced in: sqrt(pred$e)". And got the estimated sd's along with five "NA", but as per my best knowledge I should get only one "NA" i.e. corresponding to the first observation only. If anyone tell me why I got this message it will be a great advantage for me. With regards, thanks in advance --------------------------------- [[alternative HTML version deleted]]
Dear R gurus,
I'd like to plot a distribution with the tickmarks always at the quantiles
of the y-axis, as opposed to the quantiles of the distribution I am
plotting. plot seems to place these ticks based on some calculations that I
cant see (?plot doesnt show the innards of plot).
Below is some functional code, but the tick marks are placed unattractively
since I am referencing the quantiles of the distribution. I'd ideally like
the tickmarks to be able to reference fixed points on the y-axis and the
show the associted values.
I'd be very grateful for ideas, suggestion and leads.
- alex.
# some code
y1<-rnorm(100)
y2<-runif(100)
x <-1:100
l <-length(y1)
mat<-scale(cbind(y1,y2))
plot(x, mat[,1], col = "blue", yaxt = "n",
ylab="")
axis(2, at = sort(mat[,1])[c(0.25*l,0.5*l,0.75*l)],
labels = round(sort(y1)[c(0.25*l, 0.5*l,0.75*l)],2))
points(x, mat[,2], col = "red")
axis(4, at = sort(mat[,2])[c(0.25*l,0.4*l,0.75*l)],
labels = round(sort(y2)[c(0.25*l, 0.5*l,0.75*l)],2))
What package are you using? If you're using tseries, NA's are not allowed in the time series, so you have to trim out your first missing with a command like: x1 <- na.remove(x) made available by tseries itself. But I'm note sure is the first NA your problem... You should provide reproducible example, if you can. Antonio, Fabio Di Narzo. 2006/4/24, stat stat <stat700004@yahoo.co.in>:> > Dear r users, > > Few days ago I posted the same topic but unable to receive any > suggestion. So I am asking this same question. > > I was trying to fit a garch(1,1) model to my dataset. But while > executing I got a warning message "NaNs produced in: sqrt(pred$e)". And got > the estimated sd's along with five "NA", but as per my best knowledge I > should get only one "NA" i.e. corresponding to the first observation only. > If anyone tell me why I got this message it will be a great advantage for > me. > > With regards, > > > > thanks in advance > > --------------------------------- > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >[[alternative HTML version deleted]]