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
Cleaning dataHi, first post on stata forum here: Hello. I have a survey dataset with lots of -5, -4, -3, -2, -1 f…
Cannot relabel sts graph groupsI wonder if anyone might kindly assist with an issue I have encountered in the labeling of groups in…
Command -ritest- for randomization inference in Stata now available from SSC.Thanks to Kit Baum, -ritest- is now available for download from SSC. -ritest- is a module to conduct…
Panel Data CEO-firm fixed effectsDear Statalists, I am new to Stata. I have one inquiry on performing the CEO-firm fixed effects for…
Regressions on each sample after propensity score matchingDear All I have not used propensity score matching before. I read lots of materials but I am still c…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating differences between adjacent elements
Post a Comment