Hi,
I’m new to stata and am having trouble creating percentage variable (out of 100) for the percentage of population (in a particular context) eligible for Medicare . I have a variable (A)for the number of eligible people and another variable for sum of race and ethnicity. Which of the following two syntax should be used to create the new percentage variable (C) out of 100:
1. generate variable (C)== variable A/ variable B *100
2. generate variable (C)== variable A/((variable B)*100)
Or if I should use a totally different variable ? I’m not good in math as well:-)
Best,
Arif
Related Posts with Generating Percentage Variables
Separating big string variablesDear All, I have downloaded the dataset from the scimago journal ranking website. The downloaded da…
Change labels form another datasetHi Stataitians. I'm new in Stata. I'm trying to change the label of several variables. I have the d…
importing and appending loopsDear all, I tried appending some files using the following codes. Both worked but there are some pr…
looping and exporting multiple regression results into a single tableHello, I am attempting to export the results from multiple univariate regression models estimated us…
getting scatter and lfit to assign the same color for an observationHi All, I am using twoway to generate a scatterplot with an lfit overlay for several individual uni…
Subscribe to:
Post Comments (Atom)
0 Response to Generating Percentage Variables
Post a Comment