Dear all,
I wonder if there is any easy solution available in Mata for calculating the difference between adjacent elements of a (column) vector? For example, the difference of vector Y should return (Y[2]-Y[1], Y[3]-Y[2], ..., Y[n]-Y[n-1]).
Thank you,
Eilya.
Related Posts with Calculating differences between adjacent elements
Modifying labels when appending datasetsI am appending datasets in which the same variable have different label values. In the example below…
predicted valueWhat is the predicted blood pressure for an average 13-year-old boy as estimated from the regression…
Creating time trendsHi, I have a question regarding creating time trends to account for time effects before and after t…
regression line confidence intervalPlease how do i provide a 95% confidence interval for the parameters of the regression line in stata…
"Equation not found" - Hurdle model using suestHi there, I am using Stata 15. I am trying to estimate the marginal effects for a logit-truncated n…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating differences between adjacent elements
Post a Comment