Dear all,
We are trying to make a new variable which gives every number within a consecutive series of numbers a ''name'', which is the highest number within that consecutive series. So each consecutive series starts with a ''1'' and we need to attach the highest number to every number within that series. To make this more clear see our example underneath;
Var 1 - NewVar
1 4
2 4
3 4
4 4
1 8
2 8
3 8
4 8
5 8
6 8
7 8
8 8
1 4
2 4
3 4
4 4
This might be a very basic question but we somehow can't figure out how to do it. We would be very thankful if anyone could help!
Kind regards,
Jonathan
Related Posts with Name groups of consecutive number series
spmap errorHi, I am learning how to create maps in Stata using spmap. Was trying out the examples using help s…
Using the coefplot command to plot odds ratios with p-values in multiple imputation estimations – potential bug to fix!Dear Ben Jann, I was trying to plot odds ratios of mixed-effects logistic models of the association…
difficult to find the problem in MLE codingHello everyone, this is the code i am writing to estimate MLE estimates. while writing this program …
Clustering with imputationI am using a dataset that uses a school-based sampling design, and thus I want to cluster with schoo…
Logistic Regression Output with Factor Variable i.Year - Issues with InterpretationHi all! I’m having issues interpreting the coefficients in my regression output. My model has a dic…
Subscribe to:
Post Comments (Atom)
0 Response to Name groups of consecutive number series
Post a Comment