in reply to 3D Planar Multiple Linear Regression?
You may try to use Math::GSL::Multifit which is a wrapper over the multi-dimensional least square fitting functions in GSL. You need the linear fit functions of course.