I would like to estimate the partial derivatives of a dependent variable $y$ against a number of independent variables $x_i$, $i \in [0,n]$.
I can easily differentiate the dependent and independent variables and perform a simple linear regression to approximate the first order partial derivatives.
However it is not clear to me how to approximate the second (and higher order derivatives). Should I differentiate again all the variables and perform a new linear regression? Does this make any sense at all? Should I look into an alternate method? Which one?