Question: multinlinear least square data fitting

Hi, I'm trying to fit an equation:

starting_salary= (intercept+SEX*B0) +B1*GPA  +B2* METRICS

(metrics,sex are  dummy variables, either 0 or 1) to see how sex coefficient affects the intercept ( how it affects starting_salary)

(later on I  want to see how metrics affects starting_salary for either sex=1 and sex =0 .. anyways I disgress) 

STARTING_SALARY :=:  

GPA:=:      

METRICS: =;  

SEX: =;

help file states that the syntax is: LeastSquares(xdataydatavopts)

where xdata could be vector or a list
but how do I specify multiple independent variables as set of vectors? also how do I specify the intercept /slope

i.e something like:

yfit := CurveFitting:-LeastSquares([GPA,METRICS,SEX], xfit)

(I'll want to plot the data and the best fitting curve afterwards, probably)

any ideas?

Adam

 

Please Wait...