Dear Statalist Users,
Although I went through many related discussions and explanations about my question, nothing helped me. I will be thankful for your suggestions in the following problem.
I am working with a Call Details Record (CDR) Dataset. In the data, for each caller id I observe the antenna used to make/receive call. I want to generate the variable for the number of times a certain antenna is used by a caller. What I am looking for is the following:
caller_id time antenna_id count_var
1 t_11 50 2
1 t_12 55 1
1 t_13 50 2
2 t_21 51 1
2 t_22 52 1
2 t_23 53 3
2 t_24 53 3
2 t_25 53 3
3 t_31 55 2
3 t_32 55 2
3 t_33 50 1
3 t_34 51 1
3 t_35 52 2
3 t_36 52 2
3 t_37 54 3
3 t_38 54 3
3 t_39 54 3
...
Thanks in advance for your cooperation. Bests.
S.
Related Posts with Problem with count variable generation
cmxtmixlogit - expected probabilities and sign of margin effects First of all, I would like to say that it is my first thread in Statalist. I apologize for any mist…
Creating a New VariableHello Statalist Folks, I have the following annual public survey data where children are being coun…
Generate new variable pasting numbers or textHello, I'm working with U.S natality birth data, and I need to merge this data by year and county wi…
Pre and post eventHello, I am using Stata 16.1 and I have the following data: gvkey fyear pifo 007435 2015 2424 00…
Choosing specific variables in a micro dataset and getting an error message: "expression too long"Hello, I just started to work with stata. I have a micro dataset that contains all US counties and …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with count variable generation
Post a Comment