################################################### ### chunk number 1: Options ################################################### options(width=90,scipen=3,digits=4) ################################################### ### chunk number 2: Reading data ################################################### library(foreign) FNSEM <- data.frame(read.dta("3685.dta", convert.underscore=TRUE)) ################################################### ### chunk number 3: Selecting variables ################################################### FNSEM<-subset(FNSEM,select=c( a1an,a1e,a3,a4n,area,ethnic, f14a,f14b,f15a,f15bn:f15dn,f16a,f16b1n:f16b3n, hh2a.s,hh2c.b,hh2c.c,hh2c.d,hh2c.e,hh2c.f, hh2c.g,hh2c.h,hh2c.i,hh2c.j,hh2c.k, hh2c.l,hh2c.m,hh5d.s,hh40, j1b,j2,j3occ,j55a,j63a, q1,q3,question, s6,s7,s9,s12a,s12b,s12c,s24a,s34a,s34b,s39, v1a,v1b,v1c,v1d,v9a, weightis,wown,wunemp, year, ..q2a1,..q2a2,..q2a3,..q2a4,..q2a5,..q2a6, ..q2a7,..q2a8,..q2a9,..q2a10,..q2a11, ..q2a12,..q2a13,..q2a14,..q2a15, ..q2a16,..q2a17,..q2a18,..q2a19, ..q2a20,..q2a21,..q2a22,..q2a23, ..q2a24,..q2a25,..q2a26,..q2a27, ..q2a28,..q2a29,..q2a30,..q2a31, ..q2a32,..q2a33, ..s12f1,..s12f2, ..s12f3, ..s12f4, ..s12f5, ..s12f6, ..s12f7, ..s12f8, ..s12f9, ..s12f10,..s12f11,..s12f12,..s12f13, ..s12f14,..s12f15,..s12f16,..s12f17, ..s12f18, ..s12g1,..s12g2, ..s12g3, ..s12g4, ..s12g5, ..s12g6, ..s12g7, ..s12g8, ..s12g9, ..s12g10,..s12g11,..s12g12,..s12g13, ..s12g14,..s12g15,..s12g16,..s12g17, ..s12g18, ..s12h1,..s12h2, ..s12h3, ..s12h4, ..s12h5, ..s12h6, ..s12h7, ..s12h8, ..s12h9, ..s12h10,..s12h11,..s12h12,..s12h13, ..s12h14,..s12h15,..s12h16,..s12h17, ..s12h18, ..s12i1,..s12i2, ..s12i3, ..s12i4, ..s12i5, ..s12i6, ..s12i7, ..s12i8, ..s12i9, ..s12i10,..s12i11,..s12i12,..s12i13, ..s12i14,..s12i15,..s12i16,..s12i17, ..s12i18 )) ################################################### ### chunk number 4: Ethnic ################################################### t(table(FNSEM$ethnic,exclude=c())) ################################################### ### chunk number 5: Religious ################################################### table(FNSEM$s6,exclude=c()) ################################################### ### chunk number 6: Singles ################################################### table(FNSEM$a1e,exclude=c()) ################################################### ### chunk number 7: Questionnaire ################################################### table(FNSEM$question,exclude=c()) ################################################### ### chunk number 8: The ethnic minority sample 1 ################################################### # table(U$ethnic,exclude=c()) # table(U$s6,exclude=c()) # table(U$a1e,exclude=c()) ################################################### ### chunk number 9: The ethnic minority sample 2 ################################################### FNSEM <- FNSEM[FNSEM$ethnic!="white" & !is.na(FNSEM$ethnic),] ################################################### ### chunk number 10: The ethnic minority sample 3 ################################################### write(nrow(FNSEM),file="crossreference1.tex") ################################################### ### chunk number 11: The ethnic minority sample 4 ################################################### FNSEM <- FNSEM[FNSEM$s6!=2,] FNSEM <- FNSEM[FNSEM$a1e!=3,] U <- FNSEM <- FNSEM[FNSEM$question==1,] ################################################### ### chunk number 12: The ethnic minority sample 5 ################################################### # table(U$ethnic,exclude=c()) # table(U$s6,exclude=c()) # table(U$a1e,exclude=c()) ################################################### ### chunk number 13: Recoding of missing values ################################################### is.na(U) <- U==-1 ################################################### ### chunk number 14: Religious Affiliation 1 ################################################### # table(U$s7,exclude=c()) ################################################### ### chunk number 15: Religious Affiliation 2 ################################################### is.na(U$s7) <- U$s7=="na" U$Religion <- ifelse(U$s7=="muslim","muslim","non-muslim") ################################################### ### chunk number 16: Religious Affiliation 3 ################################################### # table(U$Religion,exclude=c()) ################################################### ### chunk number 17: Importance of religion 1 ################################################### # table(U$s9,exclude=c()) ################################################### ### chunk number 18: Importance of religion 2 ################################################### is.na(U$s9) <- U$s9==8 | U$s9==9 U$Importance.of.Religion <- U$s9 == 4 ################################################### ### chunk number 19: Importance of religion 3 ################################################### # table(U$Importance.of.Religion,exclude=c()) ################################################### ### chunk number 20: Rowtable function ################################################### RowTable <- function(x1,x2) round(cbind(table(x1,x2,exclude=c()),table(x1,exclude=c()))/c(table(x1, exclude=c())),2) ################################################### ### chunk number 21: Religion vs Importance of Religion ################################################### RowTable(U$s7,U$s9) ################################################### ### chunk number 22: Attitude towards inter-marriage 1 ################################################### # table(U$s34a,exclude=c()) # table(U$s34b,exclude=c()) ################################################### ### chunk number 23: Attitude towards inter-marriage 2 ################################################### is.na(U$s34a) <- U$s34a==8 | U$s34a==9 is.na(U$s34b) <- U$s34b==8 U$Attitude.Towards.Inter.Marriage <- U$s34a==1 & U$s34b==1 ################################################### ### chunk number 24: Attitude towards inter-marriage 3 ################################################### # table(U$Attitude.Towards.Inter.Marriage,exclude=c()) ################################################### ### chunk number 25: Attitudes ################################################### RowTable(U$s7,U$Attitude.Towards.Inter.Marriage) ################################################### ### chunk number 26: Importance of racial composition in schools 1 ################################################### # table(U$s24a,exclude=c()) ################################################### ### chunk number 27: Importance of racial composition in schools 2 ################################################### is.na(U$s24a) <- U$s24a==8 | U$s24a==9 U$Importance.of.Racial.Composition.in.Schools <- U$s24a==3 ################################################### ### chunk number 28: Importance of racial composition in schools 3 ################################################### # table(U$Importance.of.Racial.Composition.in.Schools, # exclude=c()) ################################################### ### chunk number 29: Importance ################################################### RowTable(U$Religion, U$Importance.of.Racial.Composition.in.Schools) ################################################### ### chunk number 30: Born in the UK 1 ################################################### #table(U$a3,exclude=c()) ################################################### ### chunk number 31: Born in the UK 2 ################################################### is.na(U$a3)<- U$a3==99 U$Born.in.the.UK <- U$a3==16 | U$a3==17 | U$a3==18 ################################################### ### chunk number 32: Born in the UK 3 ################################################### #table(U$Born.in.the.UK,exclude=c()) ################################################### ### chunk number 33: Age at and years since arrival 1 ################################################### # table(U$a4n,exclude=c()) # table(U$a1an,exclude=c()) # table(U$year,exclude=c()) ################################################### ### chunk number 34: Age at and years since arrival 2 ################################################### is.na(U$a4n) <- U$a4n==98 | U$a4n==99 is.na(U$year)<- U$year==99 U$Age <- U$a1an U$Years.Since.Arrival <- ifelse(U$Born.in.the.UK==TRUE, 0, U$year-U$a4n) U$Age.at.Arrival <- U$Age - U$Years.Since.Arrival U$Age.at.Arrival <- replace(U$Age.at.Arrival, U$Born.in.the.UK==TRUE, 0) ################################################### ### chunk number 35: Age at and years since arrival 3 ################################################### # table(U$Years.Since.Arrival,exclude=c()) # table(U$Age.at.Arrival,exclude=c()) ################################################### ### chunk number 36: Female 1 ################################################### # table(U$hh2a.s,exclude=c()) ################################################### ### chunk number 37: Female 2 ################################################### is.na(U$hh2a.s) <- U$hh2a.s =="na" U$Female <- U$hh2a=="female" ################################################### ### chunk number 38: Female 3 ################################################### # table(U$Female,exclude=c()) ################################################### ### chunk number 39: Arranged marriage 1 ################################################### # table(U$s39,exclude=c()) ################################################### ### chunk number 40: Arranged marriage 2 ################################################### is.na(U$s39) <- U$s39==8 | U$s39==9 U$Arranged.Marriage <- ifelse( U$s39==3 | U$s39==4 | U$s39==5 | U$ethnic=="caribbean", FALSE , TRUE) ################################################### ### chunk number 41: Arranged marriage 3 ################################################### # table(U$Arranged.Marriage,exclude=c()) ################################################### ### chunk number 42: Discrimination 1 ################################################### vjlist <- c(paste("v1",letters[1:4],sep=""), "v9a","j55a","j63a") ################################################### ### chunk number 43: Discrimination 3 ################################################### is.na(U[vjlist]) <- U[vjlist]==8 | U[vjlist]==9 is.na(U$v1b) <- U$v1b==7 | U$v1b==8 | U$v1b==9 U$Discrimination <- (U$v1a==1 & U$v1b==1 & U$v1c==1) | (U$v1a==1 & (U$v1b >= 2 & U$v1b <= 6) & U$v1d==1) | U$v9a==1 | U$j55a==1 | U$j63a==1 ################################################### ### chunk number 44: Discrimination 4 ################################################### # table(U$Discrimination,exclude=c()) ################################################### ### chunk number 45: Children 1 ################################################### # table(U$f16a,exclude=c()) # table(U$f16b1n,exclude=c()) # table(U$f16b2n,exclude=c()) # table(U$f16b3n,exclude=c()) ################################################### ### chunk number 46: Children 2 ################################################### is.na(U$f16a) <- U$f16a==8 | U$f16a==9 is.na(U$f16b1n) <- U$f16b1n==99 is.na(U$f16b2n) <- U$f16b2n==99 is.na(U$f16b3n) <- U$f16b3n==98 | U$f16b3n==99 U$Child.not.at.Home <- ifelse(U$f16a==1, U$f16b1n+U$f16b2n+U$f16b3n,0) ################################################### ### chunk number 47: Children 3 ################################################### hhlist <- c(paste("hh2c.", letters[2:13], sep="")) ################################################### ### chunk number 48: Children 4 ################################################### is.na(U[hhlist]) <- U[hhlist]==98 | U[hhlist]==99 U$Children <- U$Child.not.at.Home + apply(apply(subset(U, select=c(hh2c.b:hh2c.m)), 2, function(x) x==5),1, function(x) sum(x, na.rm=TRUE)) ################################################### ### chunk number 49: Children 5 ################################################### # table(U$Children,exclude=c()) ################################################### ### chunk number 50: No British Education 1 ################################################### # table(U$q1,exclude=c()) ################################################### ### chunk number 51: No British Education 2 ################################################### is.na(U$q1) <- U$q1==9 U$No.British.Education <- U$q1==2 ################################################### ### chunk number 52: No British Education 3 ################################################### # table(U$No.British.Education,exclude=c()) ################################################### ### chunk number 53: British basic education 1 ################################################### q2alist <- c(paste("..q2a", c(1:8,12:18), sep="")) ################################################### ### chunk number 54: British basic education 2 ################################################### # apply(U[q2alist], 2, function(x) table(x, # exclude=c())) ################################################### ### chunk number 55: British basic education 3 ################################################### U$British.Basic.Education <- apply(apply(U[q2alist] ,2,function(x) x==1),1, function(x) sum(x, na.rm=TRUE))!=0 U$British.Basic.Education <- ifelse( is.na(U$No.British.Education), NA,U$British.Basic.Education) ################################################### ### chunk number 56: British basic education 4 ################################################### # table(U$British.Basic.Education,exclude=c()) ################################################### ### chunk number 57: British higher education 1 ################################################### # table(U$..q2a9,exclude=c()) # table(U$..q2a10,exclude=c()) # table(U$..q2a11,exclude=c()) ################################################### ### chunk number 58: British higher education 2 ################################################### U$British.Higher.Education <- apply(apply(subset( U,select=c(..q2a9:..q2a11,..q2a19,..q2a20)) ,2,function(x) x==1),1, function(x) sum(x, na.rm=TRUE))!=0 U$British.Higher.Education <- ifelse( is.na(U$No.British.Education), NA,U$British.Higher.Education) ################################################### ### chunk number 59: British higher education 3 ################################################### # table(U$British.Higher.Education,exclude=c()) ################################################### ### chunk number 60: Foreign education 1 ################################################### # table(U$q3,exclude=c()) ################################################### ### chunk number 61: Foreign education 2 ################################################### is.na(U$q3) <- U$q3==8 | U$q3==9 U$Foreign.Education <- U$q3==1 ################################################### ### chunk number 62: Foreign education 3 ################################################### # table(U$Foreign.Education,exclude=c()) ################################################### ### chunk number 63: Labour market status 1 ################################################### # table(U$j1b,exclude=c()) # table(U$j3occ,exclude=c()) ################################################### ### chunk number 64: Labour market status 2 ################################################### is.na(U$j3occ) <- U$j3occ==10 | U$j3occ==11 U$Labour.Market.Status <- ifelse(U$j1b==1 & U$j3occ==9 & !is.na(U$j1b==1 & U$j3occ==9), "Employee","NotAssigned") ################################################### ### chunk number 65: Labour market status 3 ################################################### U$Labour.Market.Status <- replace( U$Labour.Market.Status, (U$j3occ==1 | U$j3occ==2 | U$j3occ==3 | U$j3occ==4) & U$j1b==1,"SelfEmployed") ################################################### ### chunk number 66: Labour market status 4 ################################################### U$Labour.Market.Status <- replace(U$Labour.Market.Status, U$j1b==1 & U$j3occ>4 & U$j3occ<9, "Manager") ################################################### ### chunk number 67: Labour market status 5 ################################################### U$Labour.Market.Status <- replace(U$Labour.Market.Status, (U$hh5d.s==6 | U$hh5d.s == 7) & U$Labour.Market.Status!="NotAssigned", "Unclear") U$Labour.Market.Status <- replace(U$Labour.Market.Status, (U$hh5d.s==6 | U$hh5d.s == 7) & U$Labour.Market.Status=="NotAssigned", "Unemployed") ################################################### ### chunk number 68: Labour market status 6 ################################################### U$Labour.Market.Status <- replace(U$Labour.Market.Status, (U$hh5d.s==1 | U$hh5d.s == 2 | U$hh5d.s==5 | U$hh5d.s == 8 | U$hh5d.s==9 | U$hh5d.s == 10| U$hh5d.s==11 | U$j1b == 2 | U$j2 == 2 ) & U$Labour.Market.Status=="NotAssigned", "OutOfLabourForce") ################################################### ### chunk number 69: Labour market status 8 ################################################### is.na(U$Labour.Market.Status) <- U$Labour.Market.Status == "NotAssigned" is.na(U$Labour.Market.Status) <- U$Labour.Market.Status == "Unclear" ################################################### ### chunk number 70: Labour market status 9 ################################################### # table(U$Labour.Market.Status,exclude=c()) ################################################### ### chunk number 71: No parents 1 ################################################### # table(U$f14a,exclude=c()) # table(U$f14b,exclude=c()) ################################################### ### chunk number 72: No parents 2 ################################################### is.na(U$f14a) <- U$f14a==9 is.na(U$f14b) <- U$f14b==9 U$No.Parents <- U$f14a==8 | U$f14b==2 ################################################### ### chunk number 73: No parents 3 ################################################### # table(U$No.Parents,exclude=c()) ################################################### ### chunk number 74: Contacts with parents 1 ################################################### # table(U$f15bn,exclude=c()) # table(U$f15cn,exclude=c()) # table(U$f15dn,exclude=c()) ################################################### ### chunk number 75: Contacts with parents 2 ################################################### is.na(U$f15bn) <- U$f15bn==997 | U$f15bn==999 is.na(U$f15cn) <- U$f15cn==999 is.na(U$f15dn) <- U$f15dn==999 U$Parents.Physical.Contacts <- ifelse( U$f14a!=8, U$f15bn,0) U$Parents.Telephone.Calls <- ifelse( U$f14a!=8, U$f15cn,0) U$Parents.Letters <- ifelse( U$f14a!=8, U$f15dn,0) ################################################### ### chunk number 76: Contacts with parents 3 ################################################### # table(U$Parents.Physical.Contacts,exclude=c()) # table(U$Parents.Telephone.Calls,exclude=c()) # table(U$Parents.Letters,exclude=c()) ################################################### ### chunk number 77: English language 1 ################################################### # table(U$s12a,exclude=c()) # table(U$..s12f1,exclude=c()) # table(U$..s12g1,exclude=c()) # table(U$..s12h1,exclude=c()) # table(U$..s12i1,exclude=c()) ################################################### ### chunk number 78: English language 2 ################################################### is.na(U$s12a) <- U$s12a== 8 | U$s12a == 9 s12flist <- c(paste("..s12f", 2:16, sep="")) U$oOLD <- apply(U[s12flist]=="yes", 1, sum) U$English.Spoken.at.Home.with.Older <- ((U$s12a==1 | is.na(U$s12a)) & U$..s12f1=="yes") | U$s12a==2 is.na(U$English.Spoken.at.Home.with.Older) <- U$oOLD==0 & U$English.Spoken.at.Home.with.Older==FALSE U$English.Spoken.at.Home.with.Older <- replace(U$English.Spoken.at.Home.with.Older, U$oOLD>0 & is.na(U$English.Spoken.at.Home.with.Older),FALSE) U$DO.NOT.SPEAK.WITH.OLDER <- ifelse(U$..s12f16=="no",0,1) ################################################### ### chunk number 79: English language 3 ################################################### s12glist <- c(paste("..s12g", 2:16, sep="")) U$oYOUNG <- apply(U[s12glist]=="yes", 1, sum) U$English.Spoken.at.Home.with.Younger <- ((U$s12a==1 | is.na(U$s12a)) & U$..s12g1=="yes") | U$s12a==2 is.na(U$English.Spoken.at.Home.with.Younger) <- U$oYOUNG==0 & U$English.Spoken.at.Home.with.Younger==FALSE U$English.Spoken.at.Home.with.Younger <- replace(U$English.Spoken.at.Home.with.Younger, U$oYOUNG>0 & is.na(U$English.Spoken.at.Home.with.Younger), FALSE) U$DO.NOT.SPEAK.WITH.YOUNGER <- ifelse(U$..s12g16=="no",0,1) ################################################### ### chunk number 80: English language 4 ################################################### s12hlist <- c(paste("..s12h", 2:16, sep="")) U$oWORK <- apply(U[s12hlist]=="yes", 1, sum) U$English.Spoken.at.Work <- ((U$s12a==1 | is.na(U$s12a)) & U$..s12h1=="yes") | U$s12a==2 is.na(U$English.Spoken.at.Work) <- U$oWORK==0 & U$English.Spoken.at.Work==FALSE U$English.Spoken.at.Work <- replace(U$English.Spoken.at.Work, U$oWORK>0 & is.na(U$English.Spoken.at.Work), FALSE) U$DO.NOT.SPEAK.AT.WORK <- ifelse(U$..s12h16=="no",0,1) ################################################### ### chunk number 81: English language 5 ################################################### s12ilist <- c(paste("..s12i", 2:16, sep="")) U$oFRIENDS <- apply(U[s12ilist]=="yes",1,sum) U$English.Spoken.With.Friends <- ((U$s12a==1 | is.na(U$s12a)) & U$..s12i1=="yes") | U$s12a==2 is.na(U$English.Spoken.With.Friends) <- U$oFRIENDS==0 & U$English.Spoken.With.Friends==FALSE U$English.Spoken.With.Friends <- replace(U$English.Spoken.With.Friends, U$oFRIENDS>0 & is.na(U$English.Spoken.With.Friends), FALSE) U$DO.NOT.SPEAK.WITH.FRIENDS <- ifelse(U$..s12i16=="no",0,1) ################################################### ### chunk number 82: English language 6 ################################################### # table(U$English.Spoken.at.Home.with.Older, # exclude=c()) # table(U$English.Spoken.at.Home.with.Younger, # exclude=c()) # table(U$English.Spoken.at.Work,exclude=c()) # table(U$English.Spoken.With.Friends,exclude=c()) ################################################### ### chunk number 83: Household income 1 ################################################### # table(U$hh40,exclude=c()) ################################################### ### chunk number 84: Household income 2 ################################################### is.na(U$hh40) <- {U$hh40=="refused" | U$hh40=="can't say" | U$hh40=="na"} U$Household.Income <- c(38.5,96.5,135.0, 173.5,230.5,260.0,318.0,366.0,414.0, 471.5,529.5,587.0,649.5,702.0,759.5, 817.5)[U$hh40] ################################################### ### chunk number 85: Household income 3 ################################################### # table(U$Household.Income,exclude=c()) ################################################### ### chunk number 86: Ward variables 1 ################################################### # table(U$wown,exclude=c()) ################################################### ### chunk number 87: Ward variables 2 ################################################### U$Ward.Density.Own.Ethnicity <- (c(1.0,3.5, 7.5,12.5,20.0,29.0,37.0)[U$wown])/100 U$Ward.Unemployment.Rate <- c(1.0,3.5,7.5,12.5, 17.5,22.5)[U$wunemp] ################################################### ### chunk number 88: Ward variables 3 ################################################### # table(U$Ward.Density.Own.Ethnicity,exclude=c()) # table(U$Ward.Unemployment.Rate,exclude=c()) ################################################### ### chunk number 89: Another variable definition ################################################### GroupDiscrimination <- tapply(U$Discrimination,U$ethnic, function(x) mean(x, na.rm=TRUE)) U$Discrimination.Own.Ethnicity <- GroupDiscrimination[U$ethnic] ################################################### ### chunk number 90: Defining dummies for Labour Market Status ################################################### U$Employee <- as.numeric(U$Labour.Market.Status=="Employee") U$Manager <- as.numeric(U$Labour.Market.Status=="Manager") U$Self.Employed <- as.numeric(U$Labour.Market.Status=="SelfEmployed") U$OUT.OF.LABOUR.FORCE <- as.numeric(U$Labour.Market.Status=="OutOfLabourForce") U$Unemployed <- as.numeric(U$Labour.Market.Status=="Unemployed") ################################################### ### chunk number 91: Defining the subset 1 ################################################### U.Original <- U ################################################### ### chunk number 92: Defining the subset 2 ################################################### U <- subset(U, select=c( Religion, s7, ethnic, Importance.of.Religion, Attitude.Towards.Inter.Marriage, Importance.of.Racial.Composition.in.Schools, Age.at.Arrival, Age, Female, Born.in.the.UK, Arranged.Marriage, Discrimination, Children, Years.Since.Arrival, No.British.Education, British.Basic.Education, British.Higher.Education, Foreign.Education, Employee, Manager, Self.Employed, OUT.OF.LABOUR.FORCE, Unemployed, No.Parents, Parents.Physical.Contacts, Parents.Telephone.Calls, Parents.Letters, English.Spoken.at.Home.with.Older, DO.NOT.SPEAK.WITH.OLDER, English.Spoken.at.Home.with.Younger, DO.NOT.SPEAK.WITH.YOUNGER, English.Spoken.at.Work, DO.NOT.SPEAK.AT.WORK, English.Spoken.With.Friends, DO.NOT.SPEAK.WITH.FRIENDS, Household.Income, Ward.Density.Own.Ethnicity, Ward.Unemployment.Rate, Discrimination.Own.Ethnicity, area, weightis)) ################################################### ### chunk number 93: Defining the subset 3 ################################################### U <- na.omit(U) ################################################### ### chunk number 94: Defining models for regressions ################################################### # Defining the regression model for # Importance of Religion # DO.NOT.SPEAK.WITH.YOUNGER, removed, # no observations for Muslims. # only two observations for non-Muslims # table(U$DO.NOT.SPEAK.WITH.YOUNGER, U$Religion) model1 <- {formula(Importance.of.Religion ~ Age.at.Arrival + Female + Born.in.the.UK + Arranged.Marriage + Discrimination + Children + Years.Since.Arrival + No.British.Education + British.Basic.Education + British.Higher.Education + Foreign.Education + Employee+ Manager + Self.Employed + Unemployed+ No.Parents + Parents.Physical.Contacts + Parents.Telephone.Calls + Parents.Letters + English.Spoken.at.Home.with.Older + English.Spoken.at.Home.with.Younger + English.Spoken.at.Work + English.Spoken.With.Friends + Household.Income + Discrimination.Own.Ethnicity + Ward.Density.Own.Ethnicity + Ward.Unemployment.Rate + area + factor(DO.NOT.SPEAK.WITH.OLDER)+ factor(DO.NOT.SPEAK.AT.WORK) + factor(DO.NOT.SPEAK.WITH.FRIENDS))} # Defining the model using the same regressors as # in Model 1 and Attitude.Towards.Inter.Marriage # as dependent variable model2 <- {update(model1, Attitude.Towards.Inter.Marriage ~ .)} # Defining the model using the same regressors as # in Model 1 and Importance.of.Racial.Composition.in.Schools # as dependent variable model3 <- {update(model2, Importance.of.Racial.Composition.in.Schools ~ .)} ################################################### ### chunk number 95: Regressions ################################################### library(sandwich,warn.conflicts=FALSE) library(lmtest,warn.conflicts=FALSE) Umuslim <- U[U$Religion=="muslim",] UNmuslim <- U[U$Religion!="muslim",] ESTIMATE <- function(x,df) {fm <- lm(x, weights=weightis, data=df) rbind(coeftest(fm, vcov = vcovHC(fm, type ="HC1")), summary(fm)$adj.r.squared)} result1.muslim <- ESTIMATE(model1, Umuslim) result2.muslim <- ESTIMATE(model2, Umuslim) result3.muslim <- ESTIMATE(model3, Umuslim) result1.non.muslim <- ESTIMATE(model1, UNmuslim) result2.non.muslim <- ESTIMATE(model2, UNmuslim) result3.non.muslim <- ESTIMATE(model3, UNmuslim) ################################################### ### chunk number 96: Loading xtable ################################################### library(xtable) ################################################### ### chunk number 97: Table 1 ################################################### # Defining variables to use in the table OnonMuslim <- table(FNSEM$s7!="muslim")[2] names(OnonMuslim) <- "nonMuslim" SnonMuslim <- table(U$Religion!="muslim")[2] names(SnonMuslim) <- "nonMuslim" # Defining the table header Header <- paste("Religious affiliation", "&\\multicolumn{1}{c}{(1)}", "&\\multicolumn{1}{c}{(2)}", "&\\multicolumn{1}{c}{(3)}", "&\\multicolumn{1}{c}{(4)}", "&\\multicolumn{1}{c}{(5)}", "&\\multicolumn{1}{c}{(6)}", "\\\\\\hline", "&\\multicolumn{2}{c}{Before}", "&\\multicolumn{2}{c}{After}", "&\\multicolumn{2}{c}{Bisin et al.}", "\\\\", "&\\multicolumn{2}{c}{$n=",length(U.Original$s7),"$}", "&\\multicolumn{2}{c}{$n=",length(U$s7),"$}", "&\\multicolumn{2}{c}{$n=5963$}", "\\\\\\cline{2-7}", "&\\multicolumn{1}{r}{\\#}&\\multicolumn{1}{r}{\\%}", "&\\multicolumn{1}{r}{\\#}&\\multicolumn{1}{r}{\\%}", "&\\multicolumn{1}{r}{\\#}&\\multicolumn{1}{r}{\\%}\\\\", sep="") # Defining table footer Footer <- paste("\\hline All non-Muslims", "&",OnonMuslim,"&", round(100*OnonMuslim/table(FNSEM$s7=="na")[[1]],2), "&",SnonMuslim,"&", round(100*SnonMuslim/length(U$Religion),2), "&3594&",round(100*3594/(3594+2369),2), "\\\\\\hline", "\\multicolumn{7}{l}{\\multirow{2}{10.5cm}", "{\\footnotesize NOTE: The row names shows exactly ", "how the original data is coded, so that e.g., ", "`NA's' are true missing values whereas `na' is ", "coded as religious affiliation `na'. On the last ", "line non--Muslims are calculated excluding na and ", "NA.}}\\\\", sep="") addtorow <- list() addtorow$pos <- list() addtorow$pos[[1]] <- 0 addtorow$pos[[2]] <- 13 addtorow$command <- c(Header,Footer) # Defining the data to use in the table DiffSample <- cbind( summary(FNSEM$s7), 100*summary(U.Original$s7)/length(U.Original$s7), c(summary(U$s7), length(U$s7)-table(is.na(U$s7))[[1]]), c(100*summary(U$s7)/length(U$s7), 100*(length(U$s7)-table(is.na(U$s7))[[1]])), matrix(list(c(),c(),round(2369,0),c(),c(),c(), c(),c(),c(),c(),c(),c(),c())), matrix(list(c(),c(),39.73,c(),c(),c(),c(),c(), c(),c(),c(),c(),c())) ) # Taking dimnames from original data dimnames(DiffSample)[[1]] <- names(summary(U.Original$s7)) # Generate the table TabDiffSample <- print(xtable(DiffSample,align=c("lrrrrrr"), caption=c("Religious affiliation (absolute (\\#) and relative (\\%) numbers), before (columns 1 and 2) and after (columns 3 and 4) removal of \\code{NA} compared with \\citet{Bisin08} (columns 5 and 6)."), label="ta:diffsample", digits=c(0,0,2,0,2,0,2)), table.placement = "h", caption.placement="top", include.colnames=FALSE, add.to.row=addtorow, hline.after=c(-1,0,11)) ################################################### ### chunk number 98: Table 2-3 ################################################### # Generate sample with all NA removed SampleU <- subset(U,select=c( Importance.of.Religion, Attitude.Towards.Inter.Marriage, Importance.of.Racial.Composition.in.Schools, Age.at.Arrival, Age, Female, Born.in.the.UK, Arranged.Marriage, Discrimination, Children, Years.Since.Arrival, No.British.Education, British.Basic.Education, British.Higher.Education, Foreign.Education, Employee, Manager, Self.Employed, OUT.OF.LABOUR.FORCE, Unemployed, No.Parents, Parents.Physical.Contacts, Parents.Telephone.Calls, Parents.Letters, English.Spoken.at.Home.with.Older, DO.NOT.SPEAK.WITH.OLDER, English.Spoken.at.Home.with.Younger, DO.NOT.SPEAK.WITH.YOUNGER, English.Spoken.at.Work, DO.NOT.SPEAK.AT.WORK, English.Spoken.With.Friends, DO.NOT.SPEAK.WITH.FRIENDS, Household.Income, Ward.Density.Own.Ethnicity, Ward.Unemployment.Rate, Discrimination.Own.Ethnicity )) # Generate sample with no NA removed SampleU.Original <- subset(U.Original,select=c( Importance.of.Religion, Attitude.Towards.Inter.Marriage, Importance.of.Racial.Composition.in.Schools, Age.at.Arrival, Age, Female, Born.in.the.UK, Arranged.Marriage, Discrimination, Children, Years.Since.Arrival, No.British.Education, British.Basic.Education, British.Higher.Education, Foreign.Education, Employee, Manager, Self.Employed, OUT.OF.LABOUR.FORCE, Unemployed, No.Parents, Parents.Physical.Contacts, Parents.Telephone.Calls, Parents.Letters, English.Spoken.at.Home.with.Older, DO.NOT.SPEAK.WITH.OLDER, English.Spoken.at.Home.with.Younger, DO.NOT.SPEAK.WITH.YOUNGER, English.Spoken.at.Work, DO.NOT.SPEAK.AT.WORK, English.Spoken.With.Friends, DO.NOT.SPEAK.WITH.FRIENDS, Household.Income, Ward.Density.Own.Ethnicity, Ward.Unemployment.Rate, Discrimination.Own.Ethnicity )) # Set Age.at.Arrival and Years.Since.Arrival # for those Born.in.the.UK to NA. This is only for the # sample statistics. is.na(SampleU.Original$Age.at.Arrival) <- SampleU.Original$Born.in.the.UK==1 is.na(SampleU.Original$Years.Since.Arrival) <- SampleU.Original$Born.in.the.UK==1 # A function to compute weighted mean # for a variable in a data set (x), with # weights (w) and column (n). WMEAN <- function (x,W,n) { weighted.mean(x[!is.na(x[,n]),n], W[!is.na(x[, n])])} # Weights to use in computing weighted means for Muslims Muslim.weight <- U$weightis[U$Religion=="muslim"] Orig.Muslim.weight <- U.Original$weightis[U.Original$Religion=="muslim"] Non.Muslim.weight <- U$weightis[U$Religion=="non-muslim"] Orig.Non.Muslim.weight <- U.Original$weightis[U.Original$Religion=="non-muslim"] # Create a matrix to gather means # Columns 1:5 for Muslims: # 1:2 weighted means, 3:4 unweighted, 5 Bisin et al. # Columns 6:10 for non-Muslims: # 6:7 weighted means, 8:9 unweighted, 10 Bisin et al. Means.Table <- matrix(,ncol(SampleU),10) rownames(Means.Table) <- colnames(SampleU) # Compute weighted means in columns 1:36 for (i in 1:ncol(SampleU.Original)) {Means.Table[i,1]<- WMEAN(SampleU.Original[U.Original$Religion=="muslim",], Orig.Muslim.weight, i)} # Compute weighted means in columns 1:36 for (i in 1:ncol(SampleU)) {Means.Table[i,2]<- WMEAN(SampleU[U$Religion=="muslim",] , Muslim.weight, i)} # Unweighted Means for Muslims Means.Table[,3] <- mean(SampleU.Original[U.Original$Religion=="muslim",], na.rm=TRUE) Means.Table[,4] <- mean(SampleU[U$Religion=="muslim",], na.rm=TRUE) # Bisin et al. Muslims Means.Table[,5] <- c(0.79,0.70,0.65,39.18, NA, 0.47,0.21,0.22,0.17,2.17, 26.43,0.81,0.06,0.08,0.25,0.38,0.02,0.09,NA,0.19, 0.34,3.05,3.38,0.67,0.03,NA,0.20,NA,0.19,NA,0.22, NA,200.74,0.15,16.57,0.21) # Compute weighted means SampleU.Original for (i in 1:ncol(SampleU.Original)) {Means.Table[i,6]<- WMEAN(SampleU.Original[U.Original$Religion=="non-muslim",], Orig.Non.Muslim.weight, i)} # Compute weighted means SampleU for (i in 1:ncol(SampleU)) {Means.Table[i,7]<- WMEAN(SampleU[U$Religion=="non-muslim",], Non.Muslim.weight, i)} # Unweighted Means for non-Muslims Means.Table[,8] <- mean(SampleU.Original[U.Original$Religion=="non-muslim",], na.rm=TRUE) Means.Table[,9] <- mean(SampleU[U$Religion=="non-muslim",],na.rm=TRUE) # Bisin et al. non-Muslims Means.Table[,10] <- c(0.42,0.37,0.33,42.57,NA,0.48,0.28,0.12,0.19,1.68, 27.08,0.52,0.13,0.16,0.29,0.59,0.04,0.14,NA,0.08, 0.32,3.87,4.74,0.37,0.08,NA,0.25,NA,0.27,NA,0.27, NA,330.26,0.11,12.60,0.18) # Replace "." with " " in variable names to appear in the table rownames(Means.Table) <- gsub("\\." , " ", rownames(Means.Table)) # Creating the table i LaTeX code print(xtable(Means.Table[1:17,],align=c("lrrrrrrrrrr"), caption="Weighted and Unweighted Means for Muslims and non--Muslims before and after removal of \\code{NA} compared with \\citet{Bisin08}.", label="tab:descriptive"), table.placement = "p", floating.environment = "sidewaystable", caption.placement="top", add.to.row=list(pos=list(0), command=paste( "&\\multicolumn{5}{c}{Muslim}", "&\\multicolumn{5}{c}{Non-Muslim}\\\\\\hline", "&\\multicolumn{2}{c}{W e i g h t e d}", "&\\multicolumn{3}{c}{U n w e i g h t e d}", "&\\multicolumn{2}{c}{W e i g h t e d}", "&\\multicolumn{3}{c}{U n w e i g h t e d}\\\\", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Bisin}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Bisin}\\\\", "&&&&&et al.&&&&&et al.\\\\\\hline", sep="")), include.colnames=FALSE, hline.after=c(-1,0,NULL)) # Table 3: Continuation of Table 2 print(xtable(Means.Table[18:nrow(Means.Table),], align=c("lrrrrrrrrrr"), caption="Table 2 continued. Weighted and Unweighted Means for Muslims and non--Muslims before and after removal of \\code{NA} compared with \\citet{Bisin08}.", label="tab:descriptive2"), table.placement = "p", floating.environment = "sidewaystable", caption.placement="top", add.to.row=list(pos=list(0), command=paste( "&\\multicolumn{5}{c}{Muslim}", "&\\multicolumn{5}{c}{Non-Muslim}\\\\\\hline", "&\\multicolumn{2}{c}{W e i g h t e d}", "&\\multicolumn{3}{c}{U n w e i g h t e d}", "&\\multicolumn{2}{c}{W e i g h t e d}", "&\\multicolumn{3}{c}{U n w e i g h t e d}\\\\", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Bisin}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Before}", "&\\multicolumn{1}{c}{After}", "&\\multicolumn{1}{c}{Bisin}\\\\", "&&&&&et al.&&&&&et al.\\\\\\hline", sep="")), include.colnames=FALSE, hline.after=c(-1,0,NULL)) ################################################### ### chunk number 99: Table 4 prepare ################################################### MakeTable <- function(x, n=2) { # take coef() objects and makes table Stars <- ifelse(x[,4]<0.05, paste("*"), paste("")) names(Stars) <- NULL Estimates <- format(round(x[,1],n)) Std.errors <- format(round(x[,2],n)) x <- cbind(Estimates,Std.errors, Stars) Table <- matrix(,2*nrow(x),1) Table[seq(1,2*nrow(x)-1,2),1] <- paste(x[,1],x[,3], sep="") Table[seq(2,2*nrow(x),2 ),1] <- paste("(",x[,2],")",sep="") Xname <- unlist(strsplit(unlist(strsplit(rownames(x), "TRUE")), "yes") ) Xname <- gsub("\\.", " ", Xname) Xnames <- matrix(,2*nrow(x),1) Xnames[seq(1,2*nrow(x)-1,2),1] <- Xname Xnames[seq(2,2*nrow(x) ,2),1] <- "" strsplit(Xnames, "TRUE") strsplit(Xnames, "yes") rownames(Table) <- Xnames Table } Table.Reg <- cbind( rbind(MakeTable(result1.muslim [1:28,]), format(round(result1.muslim[39,1],2), nsmall=2)), rbind(MakeTable(result1.non.muslim[1:28,]), round(result1.non.muslim[40,1],2)), rbind(MakeTable(result2.muslim [1:28,]), round(result2.muslim[39,1],2)), rbind(MakeTable(result2.non.muslim[1:28,]), round(result2.non.muslim[40,1],2)), rbind(MakeTable(result3.muslim [1:28,]), round(result3.muslim[39,1],2)), rbind(MakeTable(result3.non.muslim[1:28,]), round(result3.non.muslim[40,1],2)) ) ################################################### ### chunk number 100: Print Table 4 ################################################### rownames(Table.Reg)[nrow(Table.Reg)] <- "Adjusted R-square" varnames <- rownames(Table.Reg) rownames(Table.Reg) <- NULL Table.Reg.dat <- data.frame(varnames, Table.Reg) print(xtable(Table.Reg.dat[1:28,],align=c("llcccccc"), caption=paste("Regression Results for Muslims", nrow(Umuslim),"and non-Muslims", nrow(UNmuslim), "to be compared with Table 2 in \\citet{Bisin08}. ", "Heteroskedasticity corrected (HC1) Standard Errors ", "are in parentheses. P-values $< 0.05$ are ", "marked with *.",sep=" "), label="ta:regressions"), table.placement = "p", floating.environment = "sidewaystable", caption.placement="top", include.rownames=FALSE, include.colnames=FALSE, add.to.row=list(pos=list(0), command=paste( "&\\multicolumn{2}{c}{Importance of}", "&\\multicolumn{2}{c}{Inter Ethnic }", "&\\multicolumn{2}{c}{Ethnic Composition}\\\\", "&\\multicolumn{2}{c}{Religion}", "&\\multicolumn{2}{c}{Marriage}", "&\\multicolumn{2}{c}{of Schools}", "\\\\\\cline{2-7}\\\\", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}\\\\\\hline", sep="")) ,hline.after=c(-1,0,NULL)) # Table 5: Continuation of Table 4 Footer <- paste("\\hline", "\\multicolumn{7}{l}{\\multirow{3}{20cm}", "{\\footnotesize NOTE: All estimated models include ", "7 UK-region dummies, and ", "the variables \\code{DO.NOT.SPEAK.WITH.OLDER}, ", "\\code{DO.NOT.SPEAK.AT.WORK}, and ", "\\code{DO.NOT.SPEAK.WITH.FRIENDS}. It turned out ", "that the variable \\code{DO.NOT.SPEAK.WITH.YOUNGER} ", "is TRUE for few observations and cannot be ", "included in the model.}}\\\\", sep="") Header <- paste( "&\\multicolumn{2}{c}{Importance of}", "&\\multicolumn{2}{c}{Inter Ethnic }", "&\\multicolumn{2}{c}{Ethnic Composition}\\\\", "&\\multicolumn{2}{c}{Religion}", "&\\multicolumn{2}{c}{Marriage}", "&\\multicolumn{2}{c}{of Schools}", "\\\\\\cline{2-7}\\\\", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}", "&\\multicolumn{1}{c}{Muslims}", "&\\multicolumn{1}{c}{non--Muslims}\\\\\\hline", sep="") print(xtable(Table.Reg.dat[29:57,],align=c("llcccccc"), caption=paste("Table 4 continued. Regression Results ", "for Muslims", nrow(Umuslim)," and non-Muslims", nrow(UNmuslim), "to be compared with Table 2 in ", "\\citet{Bisin08}. Heteroskedasticity corrected ", "(HC1) Standard Errors are in parentheses. P-values ", "$< 0.05$ are marked with *.", sep=" "), label="ta:regressions2"), table.placement = "p", floating.environment = "sidewaystable", caption.placement="top", include.rownames=FALSE, include.colnames=FALSE, add.to.row=list(pos=list(0,29), command=c(Header,Footer)) ,hline.after=c(-1,0,NULL)) ################################################### ### chunk number 101: Cross-references ################################################### RelativeSampleSize <-round(100*nrow(U)/nrow(FNSEM), digits=0) BisinRelativeSampleSize <- round(100*5963/nrow(FNSEM), digits=0) write(BisinRelativeSampleSize,file="crossreference0.tex") write(100-RelativeSampleSize,file="crossreference2.tex") write(nrow(U.Original),file="crossreference3.tex") write(nrow(U),file="crossreference4.tex") ################################################### ### chunk number 102: LaTeX ################################################### write(paste( "\\input docstrip.tex", "\\keepsilent", "\\askforoverwritefalse", "\\nopreamble", "\\nopostamble", "\\generate{", "\\file{araietal_paper_bis.tex}{", " \\from{araietal_source_bis.tex}{paper}}", "\\file{araietal_techreport_bis.tex}{", " \\from{araietal_source_bis.tex}{techreport}}", "\\file{araietal_present_bis.tex}{", " \\from{araietal_source_bis.tex}{present}}", "}", "\\endbatchfile", "\n",sep="\n"),file="araietal_bis.ins") ################################################### ### chunk number 103: BibTex ################################################### write(paste( "@Manual{FNSEM,", "author = {FNSEM},", "title = {P1312 Fourth National Study of Etnic Minorities. {P}roject instructions},", "note = {Project 3685},", "organization = {Social and Community Planning Research}, ", "address = {London},", "year = {1993},", "url = {http://www.data-archive.ac.uk/doc/3685/mrdoc/pdf/a3685uab.pdf}", "}", "\n", "@Manual{FNSEM93b,", "author = {FNSEM},", "title = {UK Data Archive Data Dictionary}, ", "note = {An RTF file called \\url{UKDA-3685-tab/mrdoc/allissue/3685_UKDA_Data_Dictionary.rtf} available when the FNSEM data set is downloaded from the UK Data Archive}, ", "organization = {Social andCommunity Planning Research}, ", "address = {London},", "year = {1993}", "}", "\n", "@Article{ Bisin08,", "author = {Alberto Bisin and Eleonora Patacchini and Thierry Verdier and Yves Zenou},", "title = {Are Muslim Immigrants Different in Terms of Cultural Integration?},", "journal = {Journal of the European Economic Association},", "pages = {445--456},", "volume = {6},", "year = {2008}", "}", "\n", "@Manual{Rcore,", "title = {R: A Language and Environment for Statistical Computing},", "author = {{R Development Core Team}},", "organization = {R Foundation for Statistical Computing},", "address = {Vienna, Austria},", "year = {2008},", "note = {{ISBN} 3-900051-07-0},", "url = {http://www.R-project.org}", "}", "\n", "@Unpublished{Koenker07,", "author = {Koenker, Roger and Zeileis, Achim},", "year = {2007},", "title = {Reproducible Econometric Research (A Critical Review of the State of the Art)},", "note = {Report 60, Department of Statistics and Mathematics, Wirtschaftsuniversit�t Wien, Research Report Series},", "url = {http:epub.wu-wien.ac.at/dyn/virlib/wp/eng/mediate/epub-wu-01_c75.pdf?ID=epub-wu-01_c75}", "}", "\n", "@Unpublished{Araietal08a,", "author = {Arai, Mahmood and Karlsson, Jonas and Lundholm, Michael},", "year = {2009},", "title = {On Fragile Grounds: A replication of \\emph{Are Muslim immigrants different in terms of cultural integration?}},", "note = {Under publication in the Journal of the European Economic Association}", "}", "\n", "@Unpublished{Araietal08b,", "author = {Arai, Mahmood and Karlsson, Jonas and Lundholm, Michael},", "year = {2009},", "title = {On Fragile Grounds: {A} replication of \\emph{Are Muslim immigrants different in terms of cultural integration? {T}echnical documentation}},", "note = {Unpublished manuscript, Department of Economics and SULCIS, Stockholm University},", "url = {http://people.su.se/~lundh/fragile_grounds/", "}", "\n", "@Unpublished{Leisch02,", "author = {Friedrich Leisch},", "title = {Sweave User Manual},", "year = {2002},", "url = {http://www.ci.tuwien.ac.at/~leisch/Sweave/}", "}", "\n", "@Manual{Berthoud,", "title = {Fourth National Survey of Ethnic Minorities, 1993-1994 [computer file]},", "author = {Berthoud, R.G. and Modood, T. and Smith, P. and Prior, G.},", "publisher = {UK Data Archive [distributor]},", "address = {Colchester, Essex: UK},", "year = {1997},", "note = {SN: 3685},", "url = {http://www.data-archive.ac.uk/doc/3685%5Cmrdoc%5CUKDA%5CUKDA_Study_3685_Information.htm}", "}", sep="\n"),file="araietal.bib") ################################################### ### chunk number 104: Extracting R code ################################################### Stangle("araietal_source_bis.Rnw") ################################################### ### chunk number 105: Script to make LaTeX files ################################################### write(paste( "system(\"latex araietal_bis.ins\")", "system(\"pdflatex araietal_techreport_bis.tex\")", "system(\"bibtex araietal_techreport_bis\")", "system(\"pdflatex araietal_techreport_bis.tex\")", "system(\"pdflatex araietal_techreport_bis.tex\")", "system(\"latex araietal_paper_bis.tex\")", "system(\"bibtex araietal_paper_bis\")", "system(\"latex araietal_paper_bis.tex\")", "system(\"latex araietal_paper_bis.tex\")", "system(\"dvips araietal_paper_bis.dvi\")", "system(\"ps2pdf araietal_paper_bis.ps\")", "system(\"latex araietal_present_bis.tex\")", "system(\"dvips -o araietal_present1.ps -pp 1:14 araietal_present_bis.dvi\")", "system(\"dvips -o araietal_present2.ps -pp 11:15 -x 1095 araietal_paper_bis.dvi\")", "system(\"dvips -o araietal_present3.ps -p 20 araietal_present_bis.dvi\")", "system(\"gs -q -r2400 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=araietal_present_bis.pdf -f araietal_present1.ps araietal_present2.ps araietal_present3.ps\")", "system(\"pdflatex araietal_paper_bis.tex\")", sep="\n"),file="script.R")