search for: country2

Displaying 7 results from an estimated 7 matches for "country2".

Did you mean: country
2012 Jun 24
2
Defining multiple variables in a loop
...matrix. plmcoef <- array(0, c(1000, 4)) #creates an empty array to store regression coefficients plmfixef <- array(0, c(1000, 3)) #creates an empty array to store fixed effects intercepts from regressions for (i in 1:1000) { country1 <- as.data.frame(subset(OECDFiscal2, Country == 1)) country2 <- as.data.frame(subset(OECDFiscal2, Country == 2)) country3 <- as.data.frame(subset(OECDFiscal2, Country == 3)) exp1 <- as.matrix(sample(country1$lagexpVSgdp, size = (nrow(country1)), replace = T)) exp2 <- as.matrix(sample(country2$lagexpVSgdp, size = (nrow(country2)), replace = T)) e...
2009 Apr 06
1
political maps world maps in R, wrld_simpl
...world map. Here my code: ######################################################### ### plot the world map patramp = colorRamp(c(rgb(0,0,.7),"red"))# my personal ramp color palette library(maptools) load(url("http://spatial.nhh.no/R/etc/TM_WORLD_BORDERS_SIMPL-0.2.RData")) country2 = c("Albania", "Argentina", "Australia", "Austria", "Belgium", "Belarus", "Brazil", "Bulgaria", "Canada", "China", "Colombia", "Croatia", "Denmark", "Egypt"...
2012 Apr 22
10
Assignment problems
The text below is a part of, some work I have to do, which is due in 2 days and I am strung up with a lot of other stuff, so I was hoping someone would take 5 mins and help me ?? Here is a part of my data.frame: year country1 country2 contig comlang pop1 gdp1 pop2 gdp2 rta dist avgflow 1 1992 AUS AUT 0 0 17.4950008 321708.281 7.7825189 194684.078 0 15608.4 1.075999e+02 2 1992 AUS BEL 0 0 17.4950008 321708.281 10.0450001 231762.094...
2010 Jul 20
2
loop through files and create object
Hi R users, I am a newbie and therefore the naive question. Sorry but I was unable to find an answer online. I would like to read 47 data sets (country1.raw, country2.raw, ... country47.raw) and save into a matrix each time (data1, data2, ....data47). for (i in 1:47){ data(?) <- read.csv(file.path("country", i, ".raw", fsep = ""), header = TRUE) } The read.cvs statement seems to be right, but how to include "i" in &qu...
2012 Apr 17
6
How to add specific column to data.set?
Hi I have a data.set with 7 lists, with over 7000 observations in each list. to of the lists contain country names. like: aus dnk fra aus usa aut itl usa . . . etc. My dilemma is that I want to add an extra column/list to my data.set. If the countries are both european it should be assigned 1 or true AND if one or both the countries are non-european it should be assigned 0 or false.
2009 Dec 01
1
LMER: How to specify Random Effects
I saw different specifications for Random Effects and I'm confused about the use of "/" and the use of "(0+...|)" . Let say we have a nested structure where some countries have some several plants in different states and we measure the reaction to a drug. The list of Countries = USA, France, Italy The States for USA = Michigan, Florida, California The States for France
2006 Jun 18
13
Currency calculation
I''m thinking of experimenting with some currency conversion. However, I''d like the conversions to be in synch with the current rates. Anyone know (and this maybe out in left field) if there is some online (perhaps xml) or other data stream I can connect with in my code to output values based on user selection ? TIA Stuart