Hi all,
does anyone know how to compute the International Competitive Advantage Index (ICA) in Stata? For example, if we would have the following dataset (Note: It is not in -dataex-, but that is because I do not have this data in Stata yet):
If the first two variables are given, I would like to compute variable ICA in Stata. The ICA Index is computes as follows:
ICA_ab = (C_ab / C_b) / (C_a / C_n)
where
C_ab = is the number of observations of variable A for a given observation b of variable B.
C_b = is the total number of observations b of variable B.
C_a = is the total number of observations a of variable A.
C_n = is the total number of observations (number of rows).
To make this clear, these variables would take on the following values for the first ICA index:
C_ab = 2 (because the 10 exists twice for all the 1s in variable A)
C_b = 4 (there are four 10s in variable B)
C_a = 4 (there are four 1s in variable A)
C_n = 10 (there are 10 rows)
Hence, the ICA for the first row computes to 1.25.
I would appreciate any help. Thank you very much.
does anyone know how to compute the International Competitive Advantage Index (ICA) in Stata? For example, if we would have the following dataset (Note: It is not in -dataex-, but that is because I do not have this data in Stata yet):
A | B | ICA |
1 | 10 | 1.25 |
1 | 10 | 1.25 |
1 | 20 | 0.83 |
1 | 30 | 0.83 |
2 | 20 | 1.67 |
2 | 30 | 1.67 |
3 | 10 | 1.25 |
3 | 20 | 0.83 |
3 | 30 | 0.83 |
3 | 10 | 1.25 |
ICA_ab = (C_ab / C_b) / (C_a / C_n)
where
C_ab = is the number of observations of variable A for a given observation b of variable B.
C_b = is the total number of observations b of variable B.
C_a = is the total number of observations a of variable A.
C_n = is the total number of observations (number of rows).
To make this clear, these variables would take on the following values for the first ICA index:
C_ab = 2 (because the 10 exists twice for all the 1s in variable A)
C_b = 4 (there are four 10s in variable B)
C_a = 4 (there are four 1s in variable A)
C_n = 10 (there are 10 rows)
Hence, the ICA for the first row computes to 1.25.
I would appreciate any help. Thank you very much.
Comment