[R] Problem with Princurve

From: guy33 <david.reshef_at_magd.ox.ac.uk>
Date: Thu, 19 May 2011 06:43:28 -0700 (PDT)

Hey all,

I can't seem to get the princurve package to produce correct results, even in the simplest cases. For example, if you just generate a 1 period noiseless sine wave, and ask for the principal curve and plot, the returned curve is clearly wrong (doesn't follow the sine wave). Here's my code:

x <- runif(1000,0,2*pi); x <- cbind(x/(2*pi), sin(x)) fit1 <- principal.curve(x, plot = TRUE)

Anyone have any suggestions? If you run this code, do you get the correct principal curve?

Any help would be really appreciated!


View this message in context:
http://r.789695.n4.nabble.com/Problem-with-Princurve-tp3535721p3535721.html Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 19 May 2011 - 17:46:22 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 23 May 2011 - 12:40:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive