Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do you assign a value for a whole column by a specific group?

    In this dataset, I would like to have all participants tagged by 1 (marker) to have an INR of 1.1 and for the INR value found in each group (of marker_ to be copied to the whole group (in the column for each marker). I hope that it is clear.

    this process can be done manually.. for example, I can do the following:

    replace inr=1.1 if marker==1



    however, it is very time-consuming since I have over 30K participants. So is there any efficient way to do it in one go? I would appreciate any help.

    Click image for larger version

Name:	Screenshot 2024-02-27 222323.png
Views:	1
Size:	12.3 KB
ID:	1744812

  • #2
    Cross-posted at https://www.reddit.com/r/stata/comme...e_column_by_a/

    Comment

    Working...
    X