Sunday, February 21, 2021

Get the row number of a cell

Hi everyone,

Suppose a variable y, with 100 obs, ranked by id (1 to 100). And among these obs, only one have a value of 1, and others were 0.

How can I get the row number of the cell have a value of 1? Or how can I impute all of cells before the cell with value of 1?

Thanks

Best regards
Chang



No comments:

Post a Comment