> I am new to R, and was wondering how to do 3D linear
> regression in R. In other words, I need to Fit a
> 3-Dimensional Line to Data Points (input).
> 
> I googled before posting this, and found that it is
> possible in Matlab and other commercial packages. For
> example, see the Matlab link:
> http://www.mathworks.com/products/statistics/demos.html?
> file=/products/demos/shipping/stats/orthoregdemo.html#10
> 
> Is there a way to achieve this in R?

Being picky, I think you mean you want to fit a line to 3-dimensional data 
points (since a line is by definition 1-dimensional).

In R, you can find a line of best fit to data with an arbitrary number of 
dimensions using the function 'line'.  Type ?line for help, and 
example(line) to see how the function is used.

If the problem is a linear regression, use the function 'lm' instead.

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}

______________________________________________
R-help@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.

Reply via email to