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
Set baseline category of date variableI want to set the baseline category of a date variable. I thought of using fvset, see below. It does…
Rank with a ConditionHello, I am stuck trying to rank a variable conditionally.....I understand rank is an egen function…
Difference between a classical DID and panel regression wrt interaction termDear Stata Members I have a question related to the interpretation and choosing the right model. Let…
Too much margin on x-axis with graph combineHi Statalists, I am combining four graphs with datetime on the x-axes. The individual graphs have a…
Error 134: too many valuesHello STATA community, i am running a gravity model with exporter_time_FE, importer_time_FE and cou…
Subscribe to:
Post Comments (Atom)
0 Response to Generating Percentage Variables
Post a Comment