Re: [R] Approximation of a function from R^2 to R
why not just use the tools in npudens? they can predict on a new set. You can also you tools like fitdistr to fit a parametric multivariate density, or you can use loess or lm with poly or splines to estimate the surface (but this will not guarantee a volume of 1). On Thu, Jan 15, 2015 at 2:19 AM, rala stach...@gmx.de wrote: Thanks for the reply. I have datapoints. What I actually want to do is to estimate a joint density function. I used npudens() to estimate the kernel density of two vectors and got the densities at the evaluation points. Now I want an approximation for this so I can have an estimate for different points. -- View this message in context: http://r.789695.n4.nabble.com/Approximation-of-a-function-from-R-2-to-R-tp4701805p4701828.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Re: [R] Approximation of a function from R^2 to R
Thanks for the reply. I have datapoints. What I actually want to do is to estimate a joint density function. I used npudens() to estimate the kernel density of two vectors and got the densities at the evaluation points. Now I want an approximation for this so I can have an estimate for different points. -- View this message in context: http://r.789695.n4.nabble.com/Approximation-of-a-function-from-R-2-to-R-tp4701805p4701828.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
[R] Approximation of a function from R^2 to R
Hello, I am a beginner and I wanted to know if there is a way to approximate a function that has 2 input variables and one output. -- View this message in context: http://r.789695.n4.nabble.com/Approximation-of-a-function-from-R-2-to-R-tp4701805.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Re: [R] Approximation of a function from R^2 to R
Yes, there are several. Which is best and which subset to suggest depends on what you are trying to do, what your inputs look like (do you have the function, but want a simpler approximation? or do you have observations/datapoints?) If you can give us more detail about what you have to work with and what type of approximation you want then we can be of more help. On Wed, Jan 14, 2015 at 10:32 AM, rala stach...@gmx.de wrote: Hello, I am a beginner and I wanted to know if there is a way to approximate a function that has 2 input variables and one output. -- View this message in context: http://r.789695.n4.nabble.com/Approximation-of-a-function-from-R-2-to-R-tp4701805.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.