[R] creating a new variable.

Nicole Ford nicoleford74 at gmail.com
Tue Mar 19 05:30:29 CET 2013


Hello, all.

The following is for my own research.

I have attached the relevant data in pdf from Transparency International.  I am only interested in the "CPI 2010 scores" column.

I am interested in creating a variable for several of these countries.  The idea is, they will become a country level aggregate IV "corruption".  I am running models on about 10 countries, individually.  The DV will be essentially "democracy" with some other controls.

I have the dv coded and need help with the IV.

I am interested in how to create a new variable for CPI.  This is new to me. I have created some variables (some complex some not so complex) but usually I do not need to create variables my own variables from scratch so I really don't know how to do this.  I looked online but have not been able to find anything relevant.  I am sure something is out there and I am missing it.

CPI is ranked 1-10.  10= least amount of corruption, 1 being the most.  It is continuous.

For example, Russia is ranked at 2.1; how would I create a variable for Russia?  Once I get one, I know I will get the others.  

Any direction would be very helpful:  a link, command, etc.  

Thanks in advance.

~Nicole Ford
Ph.D. student
Graduate Assistant/ Instructor
University of South Florida
Government and International Affairs
office: SOC 012M







More information about the R-help mailing list