Since observations in the dataset are around 500 that's why I have attached an excel file. I have only added variables that are relevant to this question. There are 20 variables along with these in the main file.
My question pertains to oneway tab. I'm trying to find descriptive statistics using these variable. In the dataset HHID is the household ID, S1-3-2 is the relationship (1: Single-head 2: Spouse, 3: Son/Daughter,,,10:Other) , S1-3-3 is the gender (1: Male, 2:Female).
I want to know what percentage of single headed (S1-3-2) households were managed by males and how many by females (S1-3-3). Or percentage of sons or daughters across my entire dataset.
My problem issue is when I run -bysort s133: tab s132-, the results that i get are inflated as variable hhid is not uniquely defined. I want my results to have information per household (N=116).
I'm avoiding using -collapse-, because I want to retain information of some variables that are not added in this file.
Note: after importing, variable names dropped -dash-. That's why i have written variable name differently.
Is there a way I can use tab and unique at the same time?
I hope my question is clear.
Thank You,
Ritika
My question pertains to oneway tab. I'm trying to find descriptive statistics using these variable. In the dataset HHID is the household ID, S1-3-2 is the relationship (1: Single-head 2: Spouse, 3: Son/Daughter,,,10:Other) , S1-3-3 is the gender (1: Male, 2:Female).
I want to know what percentage of single headed (S1-3-2) households were managed by males and how many by females (S1-3-3). Or percentage of sons or daughters across my entire dataset.
My problem issue is when I run -bysort s133: tab s132-, the results that i get are inflated as variable hhid is not uniquely defined. I want my results to have information per household (N=116).
I'm avoiding using -collapse-, because I want to retain information of some variables that are not added in this file.
Note: after importing, variable names dropped -dash-. That's why i have written variable name differently.
Is there a way I can use tab and unique at the same time?
I hope my question is clear.
Thank You,
Ritika
Comment