jeudi 4 septembre 2014

smoothing data and find maximum in R


Vote count:

0




I have a unsmooth curve for which i need to determine the mode. for this end i smoothed the data using smooth.spline(x,y) function and now i want to calculate the mode or maximum of smoothed data



x<-vect.1
y<-vect.2
plot(x,y)
smth<-smooth.spline(x,y)
lines(smth,col='red',lwd=2)


data graph along with its smoothed curve


My current approach is simply to look up the x which gives me the maximum y which is not so accurate. is there a better way for doing this?



asked 19 secs ago







smoothing data and find maximum in R

Aucun commentaire:

Enregistrer un commentaire