\documentclass[6pt]{article} \usepackage{longtable} % allows tables to break \usepackage[pdftex]{lscape} % allows tables to be landscaped %\usepackage[pdftex]{graphicx} \usepackage{pdfpages} \usepackage[letterpaper,margin=1in]{geometry} \usepackage{setspace,relsize} % needed for latex(describe()), \code \usepackage{moreverb} % for verbatimtabinput % \usepackage{tabularx} \usepackage{colortbl} \usepackage{placeins} %\usepackage[dotinlabels]{titletoc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{fancyhdr} \usepackage{graphicx, subfigure} \usepackage{threeparttable} %\usepackage{vmargin} \usepackage{lscape} \usepackage{rotating} \usepackage{endnotes} \usepackage{color} \def\linkcol{blue} \usepackage[pdftex,bookmarks,pagebackref,pdfpagemode=UseOutlines, colorlinks,linkcolor=\linkcol % pdfauthor={Frank E Harrell Jr}, % pdftitle={\titl} ]{hyperref} %% Setting dummy variable to define what code to execute \def\printid{1} \usepackage{tabularx} % required in the preamble %\setpapersize{USletter} \begin{document} <>= rm(list=ls()) library(Hmisc) da<-read.table("Argentina 081309 Bryan.csv",header=TRUE,sep=",") db<-read.table("Baltimore Bryan.csv",header=TRUE,sep=",") dv<-read.table("Template fot Bryan total2.csv",header=TRUE,sep=",") da1<-data.frame(id=da$Patient.ID,site="argentina",status=da$Status,enrolldate=da$EnrollDate,birthdate=da$Birth.date, age.years=da$Age.Years,age.months=da$Age.Months,sex=da$Gender,race=da$Race,ethnicity=da$Ethnicity, severity.classification=da$Severity.Classification,breastfed=da$Breastfed,other.smoker=da$OtherSmoker, sibs=da$Sibs,ast.mo=da$AstMo,ast.fa=da$AstFa,ast.sib=da$AstSib,all.mo=da$AllMo,all.fa=da$AllFa, all.sib=da$AllSib,inh.steroid=da$InhSteroid,tot.hosp=da$TotHosp,ward.hosp=da$WardHosp,icu.hosp=da$ICUHosp, ly.tot.hosp=da$LYTotHosp,ly.ward.hosp=da$LYWardHosp,ly.icu.hosp=da$LYICUHosp,base.severity=da$BaseSeverity) db1<-data.frame(id=db$Patient.ID,site="baltimore",status=db$Status,enrolldate=db$EnrollDate,birthdate=db$Birth.date, age.years=db$Age.Years,age.months=db$Age.Months,sex=db$Gender,race=db$Race,ethnicity=db$Ethnicity, severity.classification=db$Severity.Classification,breastfed=db$Breastfed,other.smoker=db$OtherSmoker, sibs=db$Sibs,ast.mo=db$AstMo,ast.fa=db$AstFa,ast.sib=db$AstSib,all.mo=db$AllMo,all.fa=db$AllFa, all.sib=db$AllSib,inh.steroid=db$InhSteroid,tot.hosp=db$TotHosp,ward.hosp=db$WardHosp,icu.hosp=db$ICUHosp, ly.tot.hosp=db$LYTotHosp,ly.ward.hosp=db$LYWardHosp,ly.icu.hosp=db$LYICUHosp,base.severity=db$BaseSeverity) d1<-rbind(da1,db1) d<-merge(d1,dv,by.x="id",by.y="Patient.ID",all=TRUE) d<-upData(d,drop=c("Status")) d<-d[which(d$site=="argentina"),] id<-d$id status<-d$status enrolldate<-as.Date(d$enrolldate,"%m/%d/%Y") #enrolldate[id==9]<-as.Date("2007-07-30") #enrolldate[id==25]<-as.Date("2007-11-27") #enrolldate[id==1054]<-as.Date("2007-10-03") #enrolldate[id==2078]<-as.Date("2008-04-29") #enrolldate[id==3016]<-as.Date("2007-08-26") birthdate<-as.Date(d$birthdate,"%m/%d/%Y") age.years<-d$age.years age.months<-d$age.months sex<-d$sex race<-d$race ethnicity<-d$ethnicity severity1<-d$severity.classification severity<-ifelse(is.na(severity1),0,severity1) base.severity<-d$base.severity breastfed<-d$breastfed other.smoker<-d$other.smoker sibs<-d$sibs hrv<-d$HRV rsva<-d$RSVA rsvb<-d$RSVB infa<-d$INFA infb<-d$INFB piv1<-d$PIV1 piv2<-d$PIV2 piv3<-d$PIV3 piv4a<-d$PIV4a piv4b<-d$PIV4b hmpv<-d$HMPV adob<-d$AdoB adoc<-d$AdoC adoe<-d$AdoE oc43<-d$Cor.OC43 nl63<-d$Cor.NL63 x229e<-d$Cor.229E ast.mo<-d$ast.mo ast.fa<-d$ast.fa ast.sib<-d$ast.sib all.mo<-d$all.mo all.fa<-d$all.fa all.sib<-d$all.sib inh.steroid<-d$inh.steroid tot.hosp<-d$tot.hosp ward.hosp<-d$ward.hosp icu.hosp<-d$icu.hosp ly.tot.hosp<-d$ly.tot.hosp ly.ward.hosp<-d$ly.ward.hosp ly.icu.hosp<-d$ly.icu.hosp hrv.clade<-d$HRV.Clade age<-as.numeric((enrolldate-birthdate)/365.25) diff<-age-age.years table(sex) table(race) ### ethnicity and site are perfectly correlated, so use race table(severity) t.status<-table(status) age.case<-round(summary(age[status=="Case"]),1) agestuff.case<-paste(age.case[3]," (",age.case[2],", ",age.case[5],")",sep="") age.control<-round(summary(age[status=="Control"]),1) agestuff.control<-paste(age.control[3]," (",age.control[2],", ",age.control[5],")",sep="") age.pvalue<-wilcox.test(age~status)$p.value female.n<-table(sex,status) female.p<-table(sex,status)[1,]/table(status) female.pvalue<-chisq.test(sex,status)$p.value race.n<-table(race,status) race.p<-table(race,status)/t(matrix(rep(table(status),3),2,3)) race.pvalue<-chisq.test(race,status)$p.value base.severity.n<-table(base.severity,status) base.severity.p<-table(base.severity,status)/t(matrix(rep(table(status),4),2,4)) base.severity.pvalue<-chisq.test(table(base.severity,status))$p.value breast.n<-table(breastfed,status) breast.p<-table(breastfed,status)/t(matrix(rep(table(status),3),2,3)) breast.pvalue<-chisq.test(table(breastfed,status)[-3,])$p.value smoke.n<-table(other.smoker,status) smoke.p<-table(other.smoker,status)[2,]/table(status) smoke.pvalue<-chisq.test(table(other.smoker,status))$p.value summary(sibs[status=="Case"]) summary(sibs[status=="Control"]) wilcox.test(sibs~status)$p.value table(sibs,status) chisq.test(table(sibs,status))$p.value sib.cat<-ifelse(sibs>=2,">=2",as.character(sibs)) sib.cat.n<-table(sib.cat,status) sib.cat.p<-table(sib.cat,status)/t(matrix(c(sum(sib.cat.n[,1]),sum(sib.cat.n[,2])),2,3)) sib.cat.pvalue<-chisq.test(sib.cat,status)$p.value tot.hosp.cat<-ifelse(tot.hosp>=2,">=2",as.character(tot.hosp)) tot.hosp.cat.n<-table(tot.hosp.cat,status) tot.hosp.cat.p<-table(tot.hosp.cat,status)/t(matrix(c(sum(tot.hosp.cat.n[,1]),sum(tot.hosp.cat.n[,2])),2,3)) tot.hosp.cat.pvalue<-chisq.test(tot.hosp.cat,status)$p.value icu.hosp.cat<-ifelse(icu.hosp>=2,">=2",as.character(icu.hosp)) icu.hosp.cat.n<-table(icu.hosp.cat,status) icu.hosp.cat.p<-table(icu.hosp.cat,status)/t(matrix(c(sum(icu.hosp.cat.n[,1]),sum(icu.hosp.cat.n[,2])),2,3)) icu.hosp.cat.pvalue<-chisq.test(icu.hosp.cat,status)$p.value sum(hrv!="Missing") sum(rsva!="Missing") hrv.n<-table(hrv,status) hrv.p<-table(hrv,status)[2,]/(table(status)-hrv.n[3,]) hrv.pvalue<-chisq.test(table(hrv,status)[-3,])$p.value n.missing.hrv<-hrv.n[3,] rsva.n<-table(rsva,status) n.missing<-rsva.n[3,] rsva.p<-table(rsva,status)[2,]/(table(status)-n.missing) rsva.pvalue<-chisq.test(table(rsva,status)[-3,])$p.value rsvb.n<-table(rsvb,status) rsvb.p<-table(rsvb,status)[2,]/(table(status)-n.missing) rsvb.pvalue<-fisher.test(table(rsvb,status)[-3,])$p.value infa.n<-table(infa,status) infa.p<-table(infa,status)[2,]/(table(status)-n.missing) infa.pvalue<-chisq.test(table(infa,status)[-3,])$p.value infb.n<-table(infb,status) infb.p<-table(infb,status)[2,]/(table(status)-n.missing) infb.pvalue<-fisher.test(table(infb,status)[-3,])$p.value piv1.n<-table(piv1,status) piv1.p<-table(piv1,status)[2,]/(table(status)-n.missing) piv1.pvalue<-chisq.test(table(piv1,status)[-3,])$p.value piv2.n<-table(piv2,status) piv2.p<-table(piv2,status)[2,]/(table(status)-n.missing) piv2.pvalue<-fisher.test(table(piv2,status)[-3,])$p.value piv3.n<-table(piv3,status) piv3.p<-table(piv3,status)[2,]/(table(status)-n.missing) piv3.pvalue<-fisher.test(table(piv3,status)[-3,])$p.value piv4a.n<-table(piv4a,status) piv4a.p<-table(piv4a,status)[2,]/(table(status)-n.missing) piv4a.pvalue<-fisher.test(table(piv4a,status)[-3,])$p.value piv4b.n<-table(piv4b,status) piv4b.p<-table(piv4b,status)[2,]/(table(status)-n.missing) piv4b.pvalue<-fisher.test(table(piv4b,status)[-3,])$p.value hmpv.n<-table(hmpv,status) hmpv.p<-table(hmpv,status)[2,]/(table(status)-n.missing) hmpv.pvalue<-fisher.test(table(hmpv,status)[-3,])$p.value adob.n<-table(adob,status) adob.p<-table(adob,status)[2,]/(table(status)-n.missing) adob.pvalue<-fisher.test(table(adob,status)[-3,])$p.value adoc.n<-table(adoc,status) adoc.p<-table(adoc,status)[2,]/(table(status)-n.missing) adoc.pvalue<-fisher.test(table(adoc,status)[-3,])$p.value adoe.n<-table(adoe,status) adoe.p<-table(adoe,status)[2,]/(table(status)-n.missing) adoe.pvalue<-fisher.test(table(adoe,status)[-3,])$p.value oc43.n<-table(oc43,status) oc43.p<-table(oc43,status)[2,]/(table(status)-n.missing) oc43.pvalue<-fisher.test(table(oc43,status)[-3,])$p.value nl63.n<-table(nl63,status) nl63.p<-table(nl63,status)[2,]/(table(status)-n.missing) nl63.pvalue<-fisher.test(table(nl63,status)[-3,])$p.value x229e.n<-table(x229e,status) x229e.p<-table(x229e,status)[2,]/(table(status)-n.missing) x229e.pvalue<-fisher.test(table(x229e,status)[-3,])$p.value n.tested<-sum(rsva!="Missing") rsv<-ifelse(rsva=="+"|rsvb=="+",1,0) sum(rsv) sum(rsv)/n.tested rsv.n<-table(rsv,status)[2,] rsv.p<-table(rsv,status)[2,]/(table(status)-n.missing) rsv.pvalue<-fisher.test(table(rsv,status)-rbind(n.missing,c(0,0)))$p.value inf<-ifelse(infa=="+"|infb=="+",1,0) sum(inf) sum(inf)/n.tested inf.n<-table(inf,status)[2,] inf.p<-table(inf,status)[2,]/(table(status)-n.missing) inf.pvalue<-fisher.test(table(inf,status)-rbind(n.missing,c(0,0)))$p.value ado<-ifelse(adob=="+"|adoc=="+"|adoe=="+",1,0) sum(ado) sum(ado)/n.tested ado.n<-table(ado,status)[2,] ado.p<-table(ado,status)[2,]/(table(status)-n.missing) ado.pvalue<-fisher.test(table(ado,status)-rbind(n.missing,c(0,0)))$p.value piv<-ifelse(piv1=="+"|piv2=="+"|piv3=="+"|piv4a=="+"|piv4b=="+",1,0) sum(piv) sum(piv)/n.tested piv.n<-table(piv,status)[2,] piv.p<-table(piv,status)[2,]/(table(status)-n.missing) piv.pvalue<-fisher.test(table(piv,status)-rbind(n.missing,c(0,0)))$p.value hcov<-ifelse(oc43=="+"|nl63=="+"|x229e=="+",1,0) sum(hcov) sum(hcov)/n.tested hcov.n<-table(hcov,status)[2,] hcov.p<-table(hcov,status)[2,]/(table(status)-n.missing) hcov.pvalue<-fisher.test(table(hcov,status)-rbind(n.missing,c(0,0)))$p.value n.virus<-(rsva=="+")+(rsvb=="+")+(infa=="+")+(infb=="+")+(adob=="+")+(adoc=="+")+(adoe=="+")+ (piv1=="+")+(piv2=="+")+(piv3=="+")+(piv4a=="+")+(piv4b=="+")+(oc43=="+")+(nl63=="+")+(x229e=="+")+ (hrv=="+") coinfected1<-ifelse(n.virus>=2,1,0) coinfected<-ifelse(rsva=="Missing",NA,coinfected1) sum(coinfected,na.rm=TRUE) sum(coinfected,na.rm=TRUE)/n.tested coinf.n<-table(coinfected,status) coinf.p<-table(coinfected,status)[2,]/table(status) coinf.pvalue<-chisq.test(table(coinfected,status))$p.value n.virus2<-rsv+inf+ado+piv+hcov any.virus2<-ifelse(n.virus2==0,0,1) any.n<-table(any.virus2,status)[2,] any.p<-table(any.virus2,status)[2,]/(table(status)-n.missing) any.pvalue<-fisher.test(table(any.virus2,status)-rbind(n.missing,c(0,0)))$p.value ast.mo.n<-table(ast.mo,status) ast.mo.p<-table(ast.mo,status)[2,]/table(status) ast.mo.pvalue<-chisq.test(table(ast.mo,status))$p.value ast.fa.n<-table(ast.fa,status) ast.fa.p<-table(ast.fa,status)[2,]/(table(status)-ast.fa.n[3,]) ast.fa.pvalue<-chisq.test(table(ast.fa,status)[-3,])$p.value ast.sib.n<-table(ast.sib,status) ast.sib.p<-table(ast.sib,status)[2,]/(table(status)-ast.sib.n[3,]-ast.sib.n[4,]) ast.sib.pvalue<-chisq.test(table(ast.sib,status)[-c(3,4),])$p.value all.mo.n<-table(all.mo,status) all.mo.p<-table(all.mo,status)[2,]/table(status) all.mo.pvalue<-chisq.test(table(all.mo,status))$p.value all.fa.n<-table(all.fa,status) all.fa.p<-table(all.fa,status)[2,]/(table(status)-all.fa.n[3,]) all.fa.pvalue<-chisq.test(table(all.fa,status)[-3,])$p.value all.sib.n<-table(all.sib,status) all.sib.p<-table(all.sib,status)[2,]/(table(status)-all.sib.n[3,]-all.sib.n[4,]) all.sib.pvalue<-chisq.test(table(all.sib,status)[-c(3,4),])$p.value inh.steroid.n<-table(inh.steroid,status) inh.steroid.p<-table(inh.steroid,status)[2,]/(table(status)-inh.steroid.n[3,]) inh.steroid.pvalue<-chisq.test(table(inh.steroid,status)[-3,])$p.value severity.n<-table(severity,status) severity.p<-table(severity,status)/t(matrix(c(sum(severity.n[,1]),sum(severity.n[,2])),2,4)) severity.pvalue<-fisher.test(severity.n)$p.value @ \begin{table} \scriptsize \caption{Summary of Argentina Patient Characteristics by Status} \centering{ \begin{tabular}{llll} \hline & Case & Control & p-value \\ & (n=\Sexpr{t.status[1]}) & (n=\Sexpr{t.status[2]}) & \\ \hline \\ Age & \Sexpr{agestuff.case} & \Sexpr{agestuff.control} & \Sexpr{ifelse(age.pvalue<0.0001,"<0.001",as.character(round(age.pvalue,3)))} \\ \\ Female & \Sexpr{female.n[1,1]} (\Sexpr{100*round(female.p[1],3)}\%) & \Sexpr{female.n[1,2]} (\Sexpr{100*round(female.p[2],3)}\%) & \Sexpr{ifelse(female.pvalue<0.0001,"<0.001",as.character(round(female.pvalue,3)))} \\ \\ Race \\ \hspace{.2in} Caucasian & \Sexpr{race.n[1,1]} (\Sexpr{100*round(race.p[1,1],3)}\%) & \Sexpr{race.n[1,2]} (\Sexpr{100*round(race.p[1,2],3)}\%) & \Sexpr{ifelse(race.pvalue<0.0001,"<0.001",as.character(round(race.pvalue,3)))} \\ \hspace{.2in} Native American & \Sexpr{race.n[2,1]} (\Sexpr{100*round(race.p[2,1],3)}\%) & \Sexpr{race.n[2,2]} (\Sexpr{100*round(race.p[2,2],3)}\%) \\ \hspace{.2in} African American & \Sexpr{race.n[3,1]} (\Sexpr{100*round(race.p[3,1],3)}\%) & \Sexpr{race.n[3,2]} (\Sexpr{100*round(race.p[3,2],3)}\%) \\ \\ Baseline Severity \\ \hspace{.2in} Mild Intermittent & \Sexpr{base.severity.n[1,1]} (\Sexpr{100*round(base.severity.p[1,1],3)}\%) & \Sexpr{base.severity.n[1,2]} (\Sexpr{100*round(base.severity.p[1,2],3)}\%) & \Sexpr{ifelse(base.severity.pvalue<0.0001,"<0.001",as.character(round(base.severity.pvalue,3)))} \\ \hspace{.2in} Mild Persistent & \Sexpr{base.severity.n[2,1]} (\Sexpr{100*round(base.severity.p[2,1],3)}\%) & \Sexpr{base.severity.n[2,2]} (\Sexpr{100*round(base.severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{base.severity.n[3,1]} (\Sexpr{100*round(base.severity.p[3,1],3)}\%) & \Sexpr{base.severity.n[3,2]} (\Sexpr{100*round(base.severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{base.severity.n[4,1]} (\Sexpr{100*round(base.severity.p[4,1],3)}\%) & \Sexpr{base.severity.n[4,2]} (\Sexpr{100*round(base.severity.p[4,2],3)}\%) \\ \\ Exacerbation Severity Score \\ \hspace{.2in} None & \Sexpr{severity.n[1,1]} (\Sexpr{100*round(severity.p[1,1],3)}\%) & \Sexpr{severity.n[1,2]} (\Sexpr{100*round(severity.p[1,2],3)}\%) & \Sexpr{ifelse(severity.pvalue<0.0001,"<0.001",as.character(round(severity.pvalue,3)))} \\ \hspace{.2in} Mild & \Sexpr{severity.n[2,1]} (\Sexpr{100*round(severity.p[2,1],3)}\%) & \Sexpr{severity.n[2,2]} (\Sexpr{100*round(severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{severity.n[3,1]} (\Sexpr{100*round(severity.p[3,1],3)}\%) & \Sexpr{severity.n[3,2]} (\Sexpr{100*round(severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{severity.n[4,1]} (\Sexpr{100*round(severity.p[4,1],3)}\%) & \Sexpr{severity.n[4,2]} (\Sexpr{100*round(severity.p[4,2],3)}\%) \\ \\ Breastfed \\ \hspace{.2in} No & \Sexpr{breast.n[1,1]} (\Sexpr{100*round(breast.p[1,1],3)}\%) & \Sexpr{breast.n[1,2]} (\Sexpr{100*round(breast.p[1,2],3)}\%) & \Sexpr{ifelse(breast.pvalue<0.0001,"<0.001",as.character(round(breast.pvalue,3)))} \\ \hspace{.2in} Yes & \Sexpr{breast.n[2,1]} (\Sexpr{100*round(breast.p[2,1],3)}\%) & \Sexpr{breast.n[2,2]} (\Sexpr{100*round(breast.p[2,2],3)}\%) \\ \\ Number of Siblings \\ \hspace{.2in} 0 & \Sexpr{sib.cat.n[1,1]} (\Sexpr{100*round(sib.cat.p[1,1],3)}\%) & \Sexpr{sib.cat.n[1,2]} (\Sexpr{100*round(sib.cat.p[1,2],3)}\%) & \Sexpr{ifelse(sib.cat.pvalue<0.0001,"<0.001",as.character(round(sib.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{sib.cat.n[2,1]} (\Sexpr{100*round(sib.cat.p[2,1],3)}\%) & \Sexpr{sib.cat.n[2,2]} (\Sexpr{100*round(sib.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{sib.cat.n[3,1]} (\Sexpr{100*round(sib.cat.p[3,1],3)}\%) & \Sexpr{sib.cat.n[3,2]} (\Sexpr{100*round(sib.cat.p[3,2],3)}\%) \\ \\ Prior Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{tot.hosp.cat.n[1,1]} (\Sexpr{100*round(tot.hosp.cat.p[1,1],3)}\%) & \Sexpr{tot.hosp.cat.n[1,2]} (\Sexpr{100*round(tot.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(tot.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(tot.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{tot.hosp.cat.n[2,1]} (\Sexpr{100*round(tot.hosp.cat.p[2,1],3)}\%) & \Sexpr{tot.hosp.cat.n[2,2]} (\Sexpr{100*round(tot.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{tot.hosp.cat.n[3,1]} (\Sexpr{100*round(tot.hosp.cat.p[3,1],3)}\%) & \Sexpr{tot.hosp.cat.n[3,2]} (\Sexpr{100*round(tot.hosp.cat.p[3,2],3)}\%) \\ \\ Prior ICU Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{icu.hosp.cat.n[1,1]} (\Sexpr{100*round(icu.hosp.cat.p[1,1],3)}\%) & \Sexpr{icu.hosp.cat.n[1,2]} (\Sexpr{100*round(icu.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(icu.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(icu.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{icu.hosp.cat.n[2,1]} (\Sexpr{100*round(icu.hosp.cat.p[2,1],3)}\%) & \Sexpr{icu.hosp.cat.n[2,2]} (\Sexpr{100*round(icu.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{icu.hosp.cat.n[3,1]} (\Sexpr{100*round(icu.hosp.cat.p[3,1],3)}\%) & \Sexpr{icu.hosp.cat.n[3,2]} (\Sexpr{100*round(icu.hosp.cat.p[3,2],3)}\%) \\ \\ Smoker in Home & \Sexpr{smoke.n[2,1]} (\Sexpr{100*round(smoke.p[1],3)}\%) & \Sexpr{smoke.n[2,2]} (\Sexpr{100*round(smoke.p[2],3)}\%) & \Sexpr{ifelse(smoke.pvalue<0.001,"<0.001",as.character(round(smoke.pvalue,3)))} \\ \\ Asthma in Family \\ \hspace{.2in} Mother & \Sexpr{ast.mo.n[2,1]} (\Sexpr{100*round(ast.mo.p[1],3)}\%) & \Sexpr{ast.mo.n[2,2]} (\Sexpr{100*round(ast.mo.p[2],3)}\%) & \Sexpr{ifelse(ast.mo.pvalue<0.001,"<0.001",as.character(round(ast.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{ast.fa.n[2,1]} (\Sexpr{100*round(ast.fa.p[1],3)}\%) & \Sexpr{ast.fa.n[2,2]} (\Sexpr{100*round(ast.fa.p[2],3)}\%) & \Sexpr{ifelse(ast.fa.pvalue<0.001,"<0.001",as.character(round(ast.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{ast.sib.n[2,1]} (\Sexpr{100*round(ast.sib.p[1],3)}\%) & \Sexpr{ast.sib.n[2,2]} (\Sexpr{100*round(ast.sib.p[2],3)}\%) & \Sexpr{ifelse(ast.sib.pvalue<0.001,"<0.001",as.character(round(ast.sib.pvalue,3)))} \\ \\ Allergies in Family \\ \hspace{.2in} Mother & \Sexpr{all.mo.n[2,1]} (\Sexpr{100*round(all.mo.p[1],3)}\%) & \Sexpr{all.mo.n[2,2]} (\Sexpr{100*round(all.mo.p[2],3)}\%) & \Sexpr{ifelse(all.mo.pvalue<0.001,"<0.001",as.character(round(all.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{all.fa.n[2,1]} (\Sexpr{100*round(all.fa.p[1],3)}\%) & \Sexpr{all.fa.n[2,2]} (\Sexpr{100*round(all.fa.p[2],3)}\%) & \Sexpr{ifelse(all.fa.pvalue<0.001,"<0.001",as.character(round(all.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{all.sib.n[2,1]} (\Sexpr{100*round(all.sib.p[1],3)}\%) & \Sexpr{all.sib.n[2,2]} (\Sexpr{100*round(all.sib.p[2],3)}\%) & \Sexpr{ifelse(all.sib.pvalue<0.001,"<0.001",as.character(round(all.sib.pvalue,3)))} \\ \\ Inhaled Steroid Use & \Sexpr{inh.steroid.n[2,1]} (\Sexpr{100*round(inh.steroid.p[1],3)}\%) & \Sexpr{inh.steroid.n[2,2]} (\Sexpr{100*round(inh.steroid.p[2],3)}\%) & \Sexpr{ifelse(inh.steroid.pvalue<0.001,"<0.001",as.character(round(inh.steroid.pvalue,3)))} \\ \\ Human rhinovirus positive & \Sexpr{hrv.n[2,1]} (\Sexpr{100*round(hrv.p[1],3)}\%) & \Sexpr{hrv.n[2,2]} (\Sexpr{100*round(hrv.p[2],3)}\%) & \Sexpr{ifelse(hrv.pvalue<0.001,"<0.001",as.character(round(hrv.pvalue,3)))} \\ \hspace{.2in} Missing & \Sexpr{n.missing.hrv[1]} & \Sexpr{n.missing.hrv[2]} \\ \\ Positive for other viruses \\ \hspace{.2in} Missing & \Sexpr{rsva.n[3,1]} (\Sexpr{100*round(rsva.n[3,1]/sum(rsva.n[,1]),3)}\%) & \Sexpr{rsva.n[3,2]} (\Sexpr{100*round(rsva.n[3,2]/sum(rsva.n[,2]),3)}\%)\\ \hspace{.2in} RSV-A & \Sexpr{rsva.n[2,1]} (\Sexpr{100*round(rsva.p[1],3)}\%) & \Sexpr{rsva.n[2,2]} (\Sexpr{100*round(rsva.p[2],3)}\%) & \Sexpr{ifelse(rsva.pvalue<0.001,"<0.001",as.character(round(rsva.pvalue,3)))} \\ \hspace{.2in} RSV-B & \Sexpr{rsvb.n[2,1]} (\Sexpr{100*round(rsvb.p[1],3)}\%) & \Sexpr{rsvb.n[2,2]} (\Sexpr{100*round(rsvb.p[2],3)}\%) & \Sexpr{ifelse(rsvb.pvalue<0.001,"<0.001",as.character(round(rsvb.pvalue,3)))} \\ \hspace{.2in} INF-A & \Sexpr{infa.n[2,1]} (\Sexpr{100*round(infa.p[1],3)}\%) & \Sexpr{infa.n[2,2]} (\Sexpr{100*round(infa.p[2],3)}\%) & \Sexpr{ifelse(infa.pvalue<0.001,"<0.001",as.character(round(infa.pvalue,3)))} \\ \hspace{.2in} INF-B & \Sexpr{infb.n[2,1]} (\Sexpr{100*round(infb.p[1],3)}\%) & \Sexpr{infb.n[2,2]} (\Sexpr{100*round(infb.p[2],3)}\%) & \Sexpr{ifelse(infb.pvalue<0.001,"<0.001",as.character(round(infb.pvalue,3)))} \\ \hspace{.2in} PIV-1 & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-2 & \Sexpr{piv2.n[2,1]} (\Sexpr{100*round(piv2.p[1],3)}\%) & \Sexpr{piv2.n[2,2]} (\Sexpr{100*round(piv2.p[2],3)}\%) & \Sexpr{ifelse(piv2.pvalue<0.001,"<0.001",as.character(round(piv2.pvalue,3)))} \\ \hspace{.2in} PIV-3 & \Sexpr{piv3.n[2,1]} (\Sexpr{100*round(piv3.p[1],3)}\%) & \Sexpr{piv3.n[2,2]} (\Sexpr{100*round(piv3.p[2],3)}\%) & \Sexpr{ifelse(piv3.pvalue<0.001,"<0.001",as.character(round(piv3.pvalue,3)))} \\ \hspace{.2in} PIV-4A & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-4B & \Sexpr{piv4b.n[2,1]} (\Sexpr{100*round(piv4b.p[1],3)}\%) & \Sexpr{piv4b.n[2,2]} (\Sexpr{100*round(piv4b.p[2],3)}\%) & \Sexpr{ifelse(piv4b.pvalue<0.001,"<0.001",as.character(round(piv4b.pvalue,3)))} \\ \hspace{.2in} HMPV & \Sexpr{hmpv.n[2,1]} (\Sexpr{100*round(hmpv.p[1],3)}\%) & \Sexpr{hmpv.n[2,2]} (\Sexpr{100*round(hmpv.p[2],3)}\%) & \Sexpr{ifelse(hmpv.pvalue<0.001,"<0.001",as.character(round(hmpv.pvalue,3)))} \\ \hspace{.2in} ADO-B & \Sexpr{adob.n[2,1]} (\Sexpr{100*round(adob.p[1],3)}\%) & \Sexpr{adob.n[2,2]} (\Sexpr{100*round(adob.p[2],3)}\%) & \Sexpr{ifelse(adob.pvalue<0.001,"<0.001",as.character(round(adob.pvalue,3)))} \\ \hspace{.2in} ADO-C & \Sexpr{adoc.n[2,1]} (\Sexpr{100*round(adoc.p[1],3)}\%) & \Sexpr{adoc.n[2,2]} (\Sexpr{100*round(adoc.p[2],3)}\%) & \Sexpr{ifelse(adoc.pvalue<0.001,"<0.001",as.character(round(adoc.pvalue,3)))} \\ \hspace{.2in} ADO-E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} OC43 & \Sexpr{oc43.n[2,1]} (\Sexpr{100*round(oc43.p[1],3)}\%) & \Sexpr{oc43.n[2,2]} (\Sexpr{100*round(oc43.p[2],3)}\%) & \Sexpr{ifelse(oc43.pvalue<0.001,"<0.001",as.character(round(oc43.pvalue,3)))} \\ \hspace{.2in} NL63 & \Sexpr{nl63.n[2,1]} (\Sexpr{100*round(nl63.p[1],3)}\%) & \Sexpr{nl63.n[2,2]} (\Sexpr{100*round(nl63.p[2],3)}\%) & \Sexpr{ifelse(nl63.pvalue<0.001,"<0.001",as.character(round(nl63.pvalue,3)))} \\ \hspace{.2in} 229E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} Coinfected & \Sexpr{coinf.n[2,1]} (\Sexpr{100*round(coinf.p[1],3)}\%) & \Sexpr{coinf.n[2,2]} (\Sexpr{100*round(coinf.p[2],3)}\%) & \Sexpr{ifelse(coinf.pvalue<0.001,"<0.001",as.character(round(coinf.pvalue,3)))} \\ \hspace{.2in} Any & \Sexpr{any.n[1]} (\Sexpr{100*round(any.p[1],3)}\%) & \Sexpr{any.n[2]} (\Sexpr{100*round(any.p[2],3)}\%) & \Sexpr{ifelse(any.pvalue<0.001,"<0.001",as.character(round(any.pvalue,3)))} \\ \hspace{.2in} Any RSV & \Sexpr{rsv.n[1]} (\Sexpr{100*round(rsv.p[1],3)}\%) & \Sexpr{rsv.n[2]} (\Sexpr{100*round(rsv.p[2],3)}\%) & \Sexpr{ifelse(rsv.pvalue<0.001,"<0.001",as.character(round(rsv.pvalue,3)))} \\ \hspace{.2in} Any INF & \Sexpr{inf.n[1]} (\Sexpr{100*round(inf.p[1],3)}\%) & \Sexpr{inf.n[2]} (\Sexpr{100*round(inf.p[2],3)}\%) & \Sexpr{ifelse(inf.pvalue<0.001,"<0.001",as.character(round(inf.pvalue,3)))} \\ \hspace{.2in} Any PIV & \Sexpr{piv.n[1]} (\Sexpr{100*round(piv.p[1],3)}\%) & \Sexpr{piv.n[2]} (\Sexpr{100*round(piv.p[2],3)}\%) & \Sexpr{ifelse(piv.pvalue<0.001,"<0.001",as.character(round(piv.pvalue,3)))} \\ \hspace{.2in} Any ADO & \Sexpr{ado.n[1]} (\Sexpr{100*round(ado.p[1],3)}\%) & \Sexpr{ado.n[2]} (\Sexpr{100*round(ado.p[2],3)}\%) & \Sexpr{ifelse(ado.pvalue<0.001,"<0.001",as.character(round(ado.pvalue,3)))} \\ \hspace{.2in} Any HCOV& \Sexpr{hcov.n[1]} (\Sexpr{100*round(hcov.p[1],3)}\%) & \Sexpr{hcov.n[2]} (\Sexpr{100*round(hcov.p[2],3)}\%) & \Sexpr{ifelse(hcov.pvalue<0.001,"<0.001",as.character(round(hcov.pvalue,3)))} \\ \\ \hline \end{tabular} } \end{table} <>= hrv.old<-hrv hrv<-ifelse(hrv.old=="+",1,ifelse(hrv.old=="Missing",NA,0)) t.hrv<-table(hrv) age.pos<-round(summary(age[hrv==1]),1) agestuff.pos<-paste(age.pos[3]," (",age.pos[2],", ",age.pos[5],")",sep="") age.neg<-round(summary(age[hrv==0]),1) agestuff.neg<-paste(age.neg[3]," (",age.neg[2],", ",age.neg[5],")",sep="") age.pvalue<-wilcox.test(age~hrv)$p.value female.n<-table(sex,hrv) female.p<-table(sex,hrv)[1,]/table(hrv) female.pvalue<-chisq.test(sex,hrv)$p.value race.n<-table(race,hrv) race.p<-table(race,hrv)/t(matrix(rep(table(hrv),3),2,3)) race.pvalue<-chisq.test(race,hrv)$p.value base.severity.n<-table(base.severity,hrv) base.severity.p<-table(base.severity,hrv)/t(matrix(rep(table(hrv),4),2,4)) base.severity.pvalue<-chisq.test(table(base.severity,hrv))$p.value breast.n<-table(breastfed,hrv) breast.p<-table(breastfed,hrv)/t(matrix(rep(table(hrv),3),2,3)) breast.pvalue<-chisq.test(table(breastfed,hrv)[-3,])$p.value smoke.n<-table(other.smoker,hrv) smoke.p<-table(other.smoker,hrv)[2,]/table(hrv) smoke.pvalue<-chisq.test(table(other.smoker,hrv))$p.value wilcox.test(sibs~hrv)$p.value table(sibs,hrv) chisq.test(table(sibs,hrv))$p.value sib.cat<-ifelse(sibs>=2,">=2",as.character(sibs)) sib.cat.n<-table(sib.cat,hrv) sib.cat.p<-table(sib.cat,hrv)/t(matrix(c(sum(sib.cat.n[,1]),sum(sib.cat.n[,2])),2,3)) sib.cat.pvalue<-chisq.test(sib.cat,hrv)$p.value tot.hosp.cat<-ifelse(tot.hosp>=2,">=2",as.character(tot.hosp)) tot.hosp.cat.n<-table(tot.hosp.cat,hrv) tot.hosp.cat.p<-table(tot.hosp.cat,hrv)/t(matrix(c(sum(tot.hosp.cat.n[,1]),sum(tot.hosp.cat.n[,2])),2,3)) tot.hosp.cat.pvalue<-chisq.test(tot.hosp.cat,hrv)$p.value icu.hosp.cat<-ifelse(icu.hosp>=2,">=2",as.character(icu.hosp)) icu.hosp.cat.n<-table(icu.hosp.cat,hrv) icu.hosp.cat.p<-table(icu.hosp.cat,hrv)/t(matrix(c(sum(icu.hosp.cat.n[,1]),sum(icu.hosp.cat.n[,2])),2,3)) icu.hosp.cat.pvalue<-chisq.test(icu.hosp.cat,hrv)$p.value rsva.n<-table(rsva,hrv) n.missing<-rsva.n[3,] rsva.p<-table(rsva,hrv)[2,]/(table(hrv)-n.missing) rsva.pvalue<-chisq.test(table(rsva,hrv)[-3,])$p.value rsvb.n<-table(rsvb,hrv) rsvb.p<-table(rsvb,hrv)[2,]/(table(hrv)-n.missing) rsvb.pvalue<-fisher.test(table(rsvb,hrv)[-3,])$p.value infa.n<-table(infa,hrv) infa.p<-table(infa,hrv)[2,]/(table(hrv)-n.missing) infa.pvalue<-chisq.test(table(infa,hrv)[-3,])$p.value infb.n<-table(infb,hrv) infb.p<-table(infb,hrv)[2,]/(table(hrv)-n.missing) infb.pvalue<-fisher.test(table(infb,hrv)[-3,])$p.value piv1.n<-table(piv1,hrv) piv1.p<-table(piv1,hrv)[2,]/(table(hrv)-n.missing) piv1.pvalue<-chisq.test(table(piv1,hrv)[-3,])$p.value piv2.n<-table(piv2,hrv) piv2.p<-table(piv2,hrv)[2,]/(table(hrv)-n.missing) piv2.pvalue<-fisher.test(table(piv2,hrv)[-3,])$p.value piv3.n<-table(piv3,hrv) piv3.p<-table(piv3,hrv)[2,]/(table(hrv)-n.missing) piv3.pvalue<-fisher.test(table(piv3,hrv)[-3,])$p.value piv4a.n<-table(piv4a,hrv) piv4a.p<-table(piv4a,hrv)[2,]/(table(hrv)-n.missing) piv4a.pvalue<-fisher.test(table(piv4a,hrv)[-3,])$p.value piv4b.n<-table(piv4b,hrv) piv4b.p<-table(piv4b,hrv)[2,]/(table(hrv)-n.missing) piv4b.pvalue<-fisher.test(table(piv4b,hrv)[-3,])$p.value piv4b.n<-table(piv4b,hrv) piv4b.p<-table(piv4b,hrv)[2,]/(table(hrv)-n.missing) piv4b.pvalue<-fisher.test(table(piv4b,hrv)[-3,])$p.value hmpv.n<-table(hmpv,hrv) hmpv.p<-table(hmpv,hrv)[2,]/(table(hrv)-n.missing) hmpv.pvalue<-fisher.test(table(hmpv,hrv)[-3,])$p.value adob.n<-table(adob,hrv) adob.p<-table(adob,hrv)[2,]/(table(hrv)-n.missing) adob.pvalue<-fisher.test(table(adob,hrv)[-3,])$p.value adoc.n<-table(adoc,hrv) adoc.p<-table(adoc,hrv)[2,]/(table(hrv)-n.missing) adoc.pvalue<-fisher.test(table(adoc,hrv)[-3,])$p.value adoe.n<-table(adoe,hrv) adoe.p<-table(adoe,hrv)[2,]/(table(hrv)-n.missing) adoe.pvalue<-fisher.test(table(adoe,hrv)[-3,])$p.value oc43.n<-table(oc43,hrv) oc43.p<-table(oc43,hrv)[2,]/(table(hrv)-n.missing) oc43.pvalue<-fisher.test(table(oc43,hrv)[-3,])$p.value nl63.n<-table(nl63,hrv) nl63.p<-table(nl63,hrv)[2,]/(table(hrv)-n.missing) nl63.pvalue<-fisher.test(table(nl63,hrv)[-3,])$p.value x229e.n<-table(x229e,hrv) x229e.p<-table(x229e,hrv)[2,]/(table(hrv)-n.missing) x229e.pvalue<-fisher.test(table(x229e,hrv)[-3,])$p.value n.tested<-sum(rsva!="Missing"&!is.na(hrv)) rsv<-ifelse(rsva=="+"|rsvb=="+",1,0) rsv.n<-table(rsv,hrv)[2,] rsv.p<-table(rsv,hrv)[2,]/(table(hrv)-n.missing) rsv.pvalue<-fisher.test(table(rsv,hrv)-rbind(n.missing,c(0,0)))$p.value inf<-ifelse(infa=="+"|infb=="+",1,0) inf.n<-table(inf,hrv)[2,] inf.p<-table(inf,hrv)[2,]/(table(hrv)-n.missing) inf.pvalue<-fisher.test(table(inf,hrv)-rbind(n.missing,c(0,0)))$p.value ado<-ifelse(adob=="+"|adoc=="+"|adoe=="+",1,0) ado.n<-table(ado,hrv)[2,] ado.p<-table(ado,hrv)[2,]/(table(hrv)-n.missing) ado.pvalue<-fisher.test(table(ado,hrv)-rbind(n.missing,c(0,0)))$p.value piv<-ifelse(piv1=="+"|piv2=="+"|piv3=="+"|piv4a=="+"|piv4b=="+",1,0) piv.n<-table(piv,hrv)[2,] piv.p<-table(piv,hrv)[2,]/(table(hrv)-n.missing) piv.pvalue<-fisher.test(table(piv,hrv)-rbind(n.missing,c(0,0)))$p.value hcov<-ifelse(oc43=="+"|nl63=="+"|x229e=="+",1,0) hcov.n<-table(hcov,hrv)[2,] hcov.p<-table(hcov,hrv)[2,]/(table(hrv)-n.missing) hcov.pvalue<-fisher.test(table(hcov,hrv)-rbind(n.missing,c(0,0)))$p.value n.virus<-(rsva=="+")+(rsvb=="+")+(infa=="+")+(infb=="+")+(adob=="+")+(adoc=="+")+(adoe=="+")+ (piv1=="+")+(piv2=="+")+(piv3=="+")+(piv4a=="+")+(piv4b=="+")+(oc43=="+")+(nl63=="+")+(x229e=="+")+ (hrv.old=="+") coinfected1<-ifelse(n.virus>=2,1,0) coinfected<-ifelse(rsva=="Missing",NA,coinfected1) coinf.n<-table(coinfected,hrv) coinf.p<-table(coinfected,hrv)[2,]/table(hrv) coinf.pvalue<-chisq.test(table(coinfected,hrv))$p.value n.virus2<-rsv+inf+ado+piv+hcov any.virus2<-ifelse(n.virus2==0,0,1) any.n<-table(any.virus2,hrv)[2,] any.p<-table(any.virus2,hrv)[2,]/(table(hrv)-n.missing) any.pvalue<-fisher.test(table(any.virus2,hrv)-rbind(n.missing,c(0,0)))$p.value ast.mo.n<-table(ast.mo,hrv) ast.mo.p<-table(ast.mo,hrv)[2,]/table(hrv) ast.mo.pvalue<-chisq.test(table(ast.mo,hrv))$p.value ast.fa.n<-table(ast.fa,hrv) ast.fa.p<-table(ast.fa,hrv)[2,]/(table(hrv)-ast.fa.n[3,]) ast.fa.pvalue<-chisq.test(table(ast.fa,hrv)[-3,])$p.value ast.sib.n<-table(ast.sib,hrv) ast.sib.p<-table(ast.sib,hrv)[2,]/(table(hrv)-ast.sib.n[3,]-ast.sib.n[4,]) ast.sib.pvalue<-chisq.test(table(ast.sib,hrv)[-c(3,4),])$p.value all.mo.n<-table(all.mo,hrv) all.mo.p<-table(all.mo,hrv)[2,]/table(hrv) all.mo.pvalue<-chisq.test(table(all.mo,hrv))$p.value all.fa.n<-table(all.fa,hrv) all.fa.p<-table(all.fa,hrv)[2,]/(table(hrv)-all.fa.n[3,]) all.fa.pvalue<-chisq.test(table(all.fa,hrv)[-3,])$p.value all.sib.n<-table(all.sib,hrv) all.sib.p<-table(all.sib,hrv)[2,]/(table(hrv)-all.sib.n[3,]-all.sib.n[4,]) all.sib.pvalue<-chisq.test(table(all.sib,hrv)[-c(3,4),])$p.value inh.steroid.n<-table(inh.steroid,hrv) inh.steroid.p<-table(inh.steroid,hrv)[2,]/(table(hrv)-inh.steroid.n[3,]) inh.steroid.pvalue<-chisq.test(table(inh.steroid,hrv)[-3,])$p.value severity.n<-table(severity,hrv) severity.p<-table(severity,hrv)/t(matrix(c(sum(severity.n[,1]),sum(severity.n[,2])),2,4)) severity.pvalue<-chisq.test(hrv.n)$p.value case.n<-table(status,hrv) case.p<-case.n[1,]/table(hrv) case.pvalue<-chisq.test(case.n)$p.value @ \begin{table} \scriptsize \caption{Summary of Argentina Patient Characteristics by HRV} \centering{ \begin{tabular}{llll} \hline & Negative & Positive & p-value \\ & (n=\Sexpr{t.hrv[1]}) & (n=\Sexpr{t.hrv[2]}) & \\ \hline \\ Age & \Sexpr{agestuff.neg} & \Sexpr{agestuff.pos} & \Sexpr{ifelse(age.pvalue<0.0001,"<0.001",as.character(round(age.pvalue,3)))} \\ \\ Female & \Sexpr{female.n[1,1]} (\Sexpr{100*round(female.p[1],3)}\%) & \Sexpr{female.n[1,2]} (\Sexpr{100*round(female.p[2],3)}\%) & \Sexpr{ifelse(female.pvalue<0.0001,"<0.001",as.character(round(female.pvalue,3)))} \\ \\ Race \\ \hspace{.2in} Caucasian & \Sexpr{race.n[1,1]} (\Sexpr{100*round(race.p[1,1],3)}\%) & \Sexpr{race.n[1,2]} (\Sexpr{100*round(race.p[1,2],3)}\%) & \Sexpr{ifelse(race.pvalue<0.0001,"<0.001",as.character(round(race.pvalue,3)))} \\ \hspace{.2in} Native American & \Sexpr{race.n[2,1]} (\Sexpr{100*round(race.p[2,1],3)}\%) & \Sexpr{race.n[2,2]} (\Sexpr{100*round(race.p[2,2],3)}\%) \\ \hspace{.2in} African American & \Sexpr{race.n[3,1]} (\Sexpr{100*round(race.p[3,1],3)}\%) & \Sexpr{race.n[3,2]} (\Sexpr{100*round(race.p[3,2],3)}\%) \\ \\ Baseline Severity \\ \hspace{.2in} Mild Intermittent & \Sexpr{base.severity.n[1,1]} (\Sexpr{100*round(base.severity.p[1,1],3)}\%) & \Sexpr{base.severity.n[1,2]} (\Sexpr{100*round(base.severity.p[1,2],3)}\%) & \Sexpr{ifelse(base.severity.pvalue<0.0001,"<0.001",as.character(round(base.severity.pvalue,3)))} \\ \hspace{.2in} Mild Persistent & \Sexpr{base.severity.n[2,1]} (\Sexpr{100*round(base.severity.p[2,1],3)}\%) & \Sexpr{base.severity.n[2,2]} (\Sexpr{100*round(base.severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{base.severity.n[3,1]} (\Sexpr{100*round(base.severity.p[3,1],3)}\%) & \Sexpr{base.severity.n[3,2]} (\Sexpr{100*round(base.severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{base.severity.n[4,1]} (\Sexpr{100*round(base.severity.p[4,1],3)}\%) & \Sexpr{base.severity.n[4,2]} (\Sexpr{100*round(base.severity.p[4,2],3)}\%) \\ \\ Exacerbation Severity Score \\ \hspace{.2in} None & \Sexpr{severity.n[1,1]} (\Sexpr{100*round(severity.p[1,1],3)}\%) & \Sexpr{severity.n[1,2]} (\Sexpr{100*round(severity.p[1,2],3)}\%) & \Sexpr{ifelse(severity.pvalue<0.0001,"<0.001",as.character(round(severity.pvalue,3)))} \\ \hspace{.2in} Mild & \Sexpr{severity.n[2,1]} (\Sexpr{100*round(severity.p[2,1],3)}\%) & \Sexpr{severity.n[2,2]} (\Sexpr{100*round(severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{severity.n[3,1]} (\Sexpr{100*round(severity.p[3,1],3)}\%) & \Sexpr{severity.n[3,2]} (\Sexpr{100*round(severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{severity.n[4,1]} (\Sexpr{100*round(severity.p[4,1],3)}\%) & \Sexpr{severity.n[4,2]} (\Sexpr{100*round(severity.p[4,2],3)}\%) \\ \\ Breastfed \\ \hspace{.2in} No & \Sexpr{breast.n[1,1]} (\Sexpr{100*round(breast.p[1,1],3)}\%) & \Sexpr{breast.n[1,2]} (\Sexpr{100*round(breast.p[1,2],3)}\%) & \Sexpr{ifelse(breast.pvalue<0.0001,"<0.001",as.character(round(breast.pvalue,3)))} \\ \hspace{.2in} Yes & \Sexpr{breast.n[2,1]} (\Sexpr{100*round(breast.p[2,1],3)}\%) & \Sexpr{breast.n[2,2]} (\Sexpr{100*round(breast.p[2,2],3)}\%) \\ \\ Number of Siblings \\ \hspace{.2in} 0 & \Sexpr{sib.cat.n[1,1]} (\Sexpr{100*round(sib.cat.p[1,1],3)}\%) & \Sexpr{sib.cat.n[1,2]} (\Sexpr{100*round(sib.cat.p[1,2],3)}\%) & \Sexpr{ifelse(sib.cat.pvalue<0.0001,"<0.001",as.character(round(sib.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{sib.cat.n[2,1]} (\Sexpr{100*round(sib.cat.p[2,1],3)}\%) & \Sexpr{sib.cat.n[2,2]} (\Sexpr{100*round(sib.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{sib.cat.n[3,1]} (\Sexpr{100*round(sib.cat.p[3,1],3)}\%) & \Sexpr{sib.cat.n[3,2]} (\Sexpr{100*round(sib.cat.p[3,2],3)}\%) \\ \\ Prior Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{tot.hosp.cat.n[1,1]} (\Sexpr{100*round(tot.hosp.cat.p[1,1],3)}\%) & \Sexpr{tot.hosp.cat.n[1,2]} (\Sexpr{100*round(tot.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(tot.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(tot.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{tot.hosp.cat.n[2,1]} (\Sexpr{100*round(tot.hosp.cat.p[2,1],3)}\%) & \Sexpr{tot.hosp.cat.n[2,2]} (\Sexpr{100*round(tot.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{tot.hosp.cat.n[3,1]} (\Sexpr{100*round(tot.hosp.cat.p[3,1],3)}\%) & \Sexpr{tot.hosp.cat.n[3,2]} (\Sexpr{100*round(tot.hosp.cat.p[3,2],3)}\%) \\ \\ Prior ICU Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{icu.hosp.cat.n[1,1]} (\Sexpr{100*round(icu.hosp.cat.p[1,1],3)}\%) & \Sexpr{icu.hosp.cat.n[1,2]} (\Sexpr{100*round(icu.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(icu.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(icu.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{icu.hosp.cat.n[2,1]} (\Sexpr{100*round(icu.hosp.cat.p[2,1],3)}\%) & \Sexpr{icu.hosp.cat.n[2,2]} (\Sexpr{100*round(icu.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{icu.hosp.cat.n[3,1]} (\Sexpr{100*round(icu.hosp.cat.p[3,1],3)}\%) & \Sexpr{icu.hosp.cat.n[3,2]} (\Sexpr{100*round(icu.hosp.cat.p[3,2],3)}\%) \\ \\ Smoker in Home & \Sexpr{smoke.n[2,1]} (\Sexpr{100*round(smoke.p[1],3)}\%) & \Sexpr{smoke.n[2,2]} (\Sexpr{100*round(smoke.p[2],3)}\%) & \Sexpr{ifelse(smoke.pvalue<0.001,"<0.001",as.character(round(smoke.pvalue,3)))} \\ \\ Asthma in Family \\ \hspace{.2in} Mother & \Sexpr{ast.mo.n[2,1]} (\Sexpr{100*round(ast.mo.p[1],3)}\%) & \Sexpr{ast.mo.n[2,2]} (\Sexpr{100*round(ast.mo.p[2],3)}\%) & \Sexpr{ifelse(ast.mo.pvalue<0.001,"<0.001",as.character(round(ast.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{ast.fa.n[2,1]} (\Sexpr{100*round(ast.fa.p[1],3)}\%) & \Sexpr{ast.fa.n[2,2]} (\Sexpr{100*round(ast.fa.p[2],3)}\%) & \Sexpr{ifelse(ast.fa.pvalue<0.001,"<0.001",as.character(round(ast.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{ast.sib.n[2,1]} (\Sexpr{100*round(ast.sib.p[1],3)}\%) & \Sexpr{ast.sib.n[2,2]} (\Sexpr{100*round(ast.sib.p[2],3)}\%) & \Sexpr{ifelse(ast.sib.pvalue<0.001,"<0.001",as.character(round(ast.sib.pvalue,3)))} \\ \\ Allergies in Family \\ \hspace{.2in} Mother & \Sexpr{all.mo.n[2,1]} (\Sexpr{100*round(all.mo.p[1],3)}\%) & \Sexpr{all.mo.n[2,2]} (\Sexpr{100*round(all.mo.p[2],3)}\%) & \Sexpr{ifelse(all.mo.pvalue<0.001,"<0.001",as.character(round(all.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{all.fa.n[2,1]} (\Sexpr{100*round(all.fa.p[1],3)}\%) & \Sexpr{all.fa.n[2,2]} (\Sexpr{100*round(all.fa.p[2],3)}\%) & \Sexpr{ifelse(all.fa.pvalue<0.001,"<0.001",as.character(round(all.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{all.sib.n[2,1]} (\Sexpr{100*round(all.sib.p[1],3)}\%) & \Sexpr{all.sib.n[2,2]} (\Sexpr{100*round(all.sib.p[2],3)}\%) & \Sexpr{ifelse(all.sib.pvalue<0.001,"<0.001",as.character(round(all.sib.pvalue,3)))} \\ \\ Inhaled Steroid Use & \Sexpr{inh.steroid.n[2,1]} (\Sexpr{100*round(inh.steroid.p[1],3)}\%) & \Sexpr{inh.steroid.n[2,2]} (\Sexpr{100*round(inh.steroid.p[2],3)}\%) & \Sexpr{ifelse(inh.steroid.pvalue<0.001,"<0.001",as.character(round(inh.steroid.pvalue,3)))} \\ \\ Wheezing (case) & \Sexpr{case.n[1,1]} (\Sexpr{100*round(case.p[1],3)}\%) & \Sexpr{case.n[1,2]} (\Sexpr{100*round(case.p[2],3)}\%) & \Sexpr{ifelse(case.pvalue<0.001,"<0.001",as.character(round(case.pvalue,3)))} \\ \\ Positive for other viruses \\ \hspace{.2in} Missing & \Sexpr{rsva.n[3,1]} (\Sexpr{100*round(rsva.n[3,1]/sum(rsva.n[,1]),3)}\%) & \Sexpr{rsva.n[3,2]} (\Sexpr{100*round(rsva.n[3,2]/sum(rsva.n[,2]),3)}\%)\\ \hspace{.2in} RSV-A & \Sexpr{rsva.n[2,1]} (\Sexpr{100*round(rsva.p[1],3)}\%) & \Sexpr{rsva.n[2,2]} (\Sexpr{100*round(rsva.p[2],3)}\%) & \Sexpr{ifelse(rsva.pvalue<0.001,"<0.001",as.character(round(rsva.pvalue,3)))} \\ \hspace{.2in} RSV-B & \Sexpr{rsvb.n[2,1]} (\Sexpr{100*round(rsvb.p[1],3)}\%) & \Sexpr{rsvb.n[2,2]} (\Sexpr{100*round(rsvb.p[2],3)}\%) & \Sexpr{ifelse(rsvb.pvalue<0.001,"<0.001",as.character(round(rsvb.pvalue,3)))} \\ \hspace{.2in} INF-A & \Sexpr{infa.n[2,1]} (\Sexpr{100*round(infa.p[1],3)}\%) & \Sexpr{infa.n[2,2]} (\Sexpr{100*round(infa.p[2],3)}\%) & \Sexpr{ifelse(infa.pvalue<0.001,"<0.001",as.character(round(infa.pvalue,3)))} \\ \hspace{.2in} INF-B & \Sexpr{infb.n[2,1]} (\Sexpr{100*round(infb.p[1],3)}\%) & \Sexpr{infb.n[2,2]} (\Sexpr{100*round(infb.p[2],3)}\%) & \Sexpr{ifelse(infb.pvalue<0.001,"<0.001",as.character(round(infb.pvalue,3)))} \\ \hspace{.2in} PIV-1 & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-2 & \Sexpr{piv2.n[2,1]} (\Sexpr{100*round(piv2.p[1],3)}\%) & \Sexpr{piv2.n[2,2]} (\Sexpr{100*round(piv2.p[2],3)}\%) & \Sexpr{ifelse(piv2.pvalue<0.001,"<0.001",as.character(round(piv2.pvalue,3)))} \\ \hspace{.2in} PIV-3 & \Sexpr{piv3.n[2,1]} (\Sexpr{100*round(piv3.p[1],3)}\%) & \Sexpr{piv3.n[2,2]} (\Sexpr{100*round(piv3.p[2],3)}\%) & \Sexpr{ifelse(piv3.pvalue<0.001,"<0.001",as.character(round(piv3.pvalue,3)))} \\ \hspace{.2in} PIV-4A & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-4B & \Sexpr{piv4b.n[2,1]} (\Sexpr{100*round(piv4b.p[1],3)}\%) & \Sexpr{piv4b.n[2,2]} (\Sexpr{100*round(piv4b.p[2],3)}\%) & \Sexpr{ifelse(piv4b.pvalue<0.001,"<0.001",as.character(round(piv4b.pvalue,3)))} \\ \hspace{.2in} HMPV & \Sexpr{hmpv.n[2,1]} (\Sexpr{100*round(hmpv.p[1],3)}\%) & \Sexpr{hmpv.n[2,2]} (\Sexpr{100*round(hmpv.p[2],3)}\%) & \Sexpr{ifelse(hmpv.pvalue<0.001,"<0.001",as.character(round(hmpv.pvalue,3)))} \\ \hspace{.2in} ADO-B & \Sexpr{adob.n[2,1]} (\Sexpr{100*round(adob.p[1],3)}\%) & \Sexpr{adob.n[2,2]} (\Sexpr{100*round(adob.p[2],3)}\%) & \Sexpr{ifelse(adob.pvalue<0.001,"<0.001",as.character(round(adob.pvalue,3)))} \\ \hspace{.2in} ADO-C & \Sexpr{adoc.n[2,1]} (\Sexpr{100*round(adoc.p[1],3)}\%) & \Sexpr{adoc.n[2,2]} (\Sexpr{100*round(adoc.p[2],3)}\%) & \Sexpr{ifelse(adoc.pvalue<0.001,"<0.001",as.character(round(adoc.pvalue,3)))} \\ \hspace{.2in} ADO-E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} OC43 & \Sexpr{oc43.n[2,1]} (\Sexpr{100*round(oc43.p[1],3)}\%) & \Sexpr{oc43.n[2,2]} (\Sexpr{100*round(oc43.p[2],3)}\%) & \Sexpr{ifelse(oc43.pvalue<0.001,"<0.001",as.character(round(oc43.pvalue,3)))} \\ \hspace{.2in} NL63 & \Sexpr{nl63.n[2,1]} (\Sexpr{100*round(nl63.p[1],3)}\%) & \Sexpr{nl63.n[2,2]} (\Sexpr{100*round(nl63.p[2],3)}\%) & \Sexpr{ifelse(nl63.pvalue<0.001,"<0.001",as.character(round(nl63.pvalue,3)))} \\ \hspace{.2in} 229E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} Coinfected & \Sexpr{coinf.n[2,1]} (\Sexpr{100*round(coinf.p[1],3)}\%) & \Sexpr{coinf.n[2,2]} (\Sexpr{100*round(coinf.p[2],3)}\%) & \Sexpr{ifelse(coinf.pvalue<0.001,"<0.001",as.character(round(coinf.pvalue,3)))} \\ \hspace{.2in} Any & \Sexpr{any.n[1]} (\Sexpr{100*round(any.p[1],3)}\%) & \Sexpr{any.n[2]} (\Sexpr{100*round(any.p[2],3)}\%) & \Sexpr{ifelse(any.pvalue<0.001,"<0.001",as.character(round(any.pvalue,3)))} \\ \hspace{.2in} Any RSV & \Sexpr{rsv.n[1]} (\Sexpr{100*round(rsv.p[1],3)}\%) & \Sexpr{rsv.n[2]} (\Sexpr{100*round(rsv.p[2],3)}\%) & \Sexpr{ifelse(rsv.pvalue<0.001,"<0.001",as.character(round(rsv.pvalue,3)))} \\ \hspace{.2in} Any INF & \Sexpr{inf.n[1]} (\Sexpr{100*round(inf.p[1],3)}\%) & \Sexpr{inf.n[2]} (\Sexpr{100*round(inf.p[2],3)}\%) & \Sexpr{ifelse(inf.pvalue<0.001,"<0.001",as.character(round(inf.pvalue,3)))} \\ \hspace{.2in} Any PIV & \Sexpr{piv.n[1]} (\Sexpr{100*round(piv.p[1],3)}\%) & \Sexpr{piv.n[2]} (\Sexpr{100*round(piv.p[2],3)}\%) & \Sexpr{ifelse(piv.pvalue<0.001,"<0.001",as.character(round(piv.pvalue,3)))} \\ \hspace{.2in} Any ADO & \Sexpr{ado.n[1]} (\Sexpr{100*round(ado.p[1],3)}\%) & \Sexpr{ado.n[2]} (\Sexpr{100*round(ado.p[2],3)}\%) & \Sexpr{ifelse(ado.pvalue<0.001,"<0.001",as.character(round(ado.pvalue,3)))} \\ \hspace{.2in} Any HCOV& \Sexpr{hcov.n[1]} (\Sexpr{100*round(hcov.p[1],3)}\%) & \Sexpr{hcov.n[2]} (\Sexpr{100*round(hcov.p[2],3)}\%) & \Sexpr{ifelse(hcov.pvalue<0.001,"<0.001",as.character(round(hcov.pvalue,3)))} \\ \\ \hline \end{tabular} } \end{table} <>= hrv<-ifelse(hrv.old=="+",1,ifelse(hrv.old=="Missing",NA,0)) t.hrv<-table(hrv) t.status<-table(status[hrv==1]) age.pos<-round(summary(age[hrv==1&status=="Case"]),1) agestuff.pos<-paste(age.pos[3]," (",age.pos[2],", ",age.pos[5],")",sep="") age.neg<-round(summary(age[hrv==1&status=="Control"]),1) agestuff.neg<-paste(age.neg[3]," (",age.neg[2],", ",age.neg[5],")",sep="") age.pvalue<-wilcox.test(age[hrv==1]~status[hrv==1])$p.value female.n<-table(sex[hrv==1],status[hrv==1]) female.p<-table(sex[hrv==1],status[hrv==1])[1,]/table(status[hrv==1]) female.pvalue<-chisq.test(sex[hrv==1],status[hrv==1])$p.value race.n<-table(race[hrv==1],status[hrv==1]) race.p<-table(race[hrv==1],status[hrv==1])/t(matrix(rep(table(status[hrv==1]),3),2,3)) race.pvalue<-chisq.test(race[hrv==1],status[hrv==1])$p.value base.severity.n<-table(base.severity[hrv==1],status[hrv==1]) base.severity.p<-table(base.severity[hrv==1],status[hrv==1])/t(matrix(rep(table(status[hrv==1]),4),2,4)) base.severity.pvalue<-chisq.test(table(base.severity[hrv==1],status[hrv==1]))$p.value breast.n<-table(breastfed[hrv==1],status[hrv==1]) breast.p<-table(breastfed[hrv==1],status[hrv==1])/t(matrix(rep(table(status[hrv==1]),3),2,3)) breast.pvalue<-chisq.test(table(breastfed[hrv==1],status[hrv==1])[-3,])$p.value smoke.n<-table(other.smoker[hrv==1],status[hrv==1]) smoke.p<-table(other.smoker[hrv==1],status[hrv==1])[2,]/table(status[hrv==1]) smoke.pvalue<-chisq.test(table(other.smoker[hrv==1],status[hrv==1]))$p.value wilcox.test(sibs[hrv==1]~status[hrv==1])$p.value table(sibs[hrv==1],status[hrv==1]) chisq.test(table(sibs[hrv==1],status[hrv==1]))$p.value sib.cat<-ifelse(sibs>=2,">=2",as.character(sibs)) sib.cat.n<-table(sib.cat[hrv==1],status[hrv==1]) sib.cat.p<-table(sib.cat[hrv==1],status[hrv==1])/t(matrix(c(sum(sib.cat.n[,1]),sum(sib.cat.n[,2])),2,3)) sib.cat.pvalue<-chisq.test(sib.cat[hrv==1],status[hrv==1])$p.value tot.hosp.cat<-ifelse(tot.hosp>=2,">=2",as.character(tot.hosp)) tot.hosp.cat.n<-table(tot.hosp.cat[hrv==1],status[hrv==1]) tot.hosp.cat.p<-table(tot.hosp.cat[hrv==1],status[hrv==1])/t(matrix(c(sum(tot.hosp.cat.n[,1]),sum(tot.hosp.cat.n[,2])),2,3)) tot.hosp.cat.pvalue<-chisq.test(tot.hosp.cat[hrv==1],status[hrv==1])$p.value icu.hosp.cat<-ifelse(icu.hosp>=2,">=2",as.character(icu.hosp)) icu.hosp.cat.n<-table(icu.hosp.cat[hrv==1],status[hrv==1]) icu.hosp.cat.p<-table(icu.hosp.cat[hrv==1],status[hrv==1])/t(matrix(c(sum(icu.hosp.cat.n[,1]),sum(icu.hosp.cat.n[,2])),2,3)) icu.hosp.cat.pvalue<-chisq.test(icu.hosp.cat[hrv==1],status[hrv==1])$p.value rsva.n<-table(rsva[hrv==1],status[hrv==1]) n.missing<-rsva.n[3,] rsva.p<-table(rsva[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) rsva.pvalue<-chisq.test(table(rsva[hrv==1],status[hrv==1])[-3,])$p.value rsvb.n<-table(rsvb[hrv==1],status[hrv==1]) rsvb.p<-table(rsvb[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) rsvb.pvalue<-fisher.test(table(rsvb[hrv==1],status[hrv==1])[-3,])$p.value infa.n<-table(infa[hrv==1],status[hrv==1]) infa.p<-table(infa[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) infa.pvalue<-chisq.test(table(infa[hrv==1],status[hrv==1])[-3,])$p.value infb.n<-table(infb[hrv==1],status[hrv==1]) infb.p<-table(infb[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) infb.pvalue<-fisher.test(table(infb[hrv==1],status[hrv==1])[-3,])$p.value piv1.n<-table(piv1[hrv==1],status[hrv==1]) piv1.p<-table(piv1[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv1.pvalue<-chisq.test(table(piv1[hrv==1],status[hrv==1])[-3,])$p.value piv2.n<-table(piv2[hrv==1],status[hrv==1]) piv2.p<-table(piv2[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv2.pvalue<-fisher.test(table(piv2[hrv==1],status[hrv==1])[-3,])$p.value piv3.n<-table(piv3[hrv==1],status[hrv==1]) piv3.p<-table(piv3[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv3.pvalue<-fisher.test(table(piv3[hrv==1],status[hrv==1])[-3,])$p.value piv4a.n<-table(piv4a[hrv==1],status[hrv==1]) piv4a.p<-table(piv4a[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv4a.pvalue<-fisher.test(table(piv4a[hrv==1],status[hrv==1])[-3,])$p.value piv4b.n<-table(piv4b[hrv==1],status[hrv==1]) piv4b.p<-table(piv4b[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv4b.pvalue<-fisher.test(table(piv4b[hrv==1],status[hrv==1])[-3,])$p.value piv4b.n<-table(piv4b[hrv==1],status[hrv==1]) piv4b.p<-table(piv4b[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv4b.pvalue<-fisher.test(table(piv4b[hrv==1],status[hrv==1])[-3,])$p.value hmpv.n<-table(hmpv[hrv==1],status[hrv==1]) hmpv.p<-table(hmpv[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) hmpv.pvalue<-fisher.test(table(hmpv[hrv==1],status[hrv==1])[-3,])$p.value adob.n<-table(adob[hrv==1],status[hrv==1]) adob.p<-table(adob[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) adob.pvalue<-fisher.test(table(adob[hrv==1],status[hrv==1])[-3,])$p.value adoc.n<-table(adoc[hrv==1],status[hrv==1]) adoc.p<-table(adoc[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) adoc.pvalue<-fisher.test(table(adoc[hrv==1],status[hrv==1])[-3,])$p.value adoe.n<-table(adoe[hrv==1],status[hrv==1]) adoe.p<-table(adoe[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) adoe.pvalue<-fisher.test(table(adoe[hrv==1],status[hrv==1])[-3,])$p.value oc43.n<-table(oc43[hrv==1],status[hrv==1]) oc43.p<-table(oc43[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) oc43.pvalue<-fisher.test(table(oc43[hrv==1],status[hrv==1])[-3,])$p.value nl63.n<-table(nl63[hrv==1],status[hrv==1]) nl63.p<-table(nl63[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) nl63.pvalue<-fisher.test(table(nl63[hrv==1],status[hrv==1])[-3,])$p.value x229e.n<-table(x229e[hrv==1],status[hrv==1]) x229e.p<-table(x229e[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) x229e.pvalue<-fisher.test(table(x229e[hrv==1],status[hrv==1])[-3,])$p.value n.tested<-sum(rsva[hrv==1]!="Missing") rsv<-ifelse(rsva=="+"|rsvb=="+",1,0) rsv.n<-table(rsv[hrv==1],status[hrv==1])[2,] rsv.p<-table(rsv[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) rsv.pvalue<-fisher.test(table(rsv[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value inf<-ifelse(infa=="+"|infb=="+",1,0) inf.n<-table(inf[hrv==1],status[hrv==1])[2,] inf.p<-table(inf[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) inf.pvalue<-fisher.test(table(inf[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value ado<-ifelse(adob=="+"|adoc=="+"|adoe=="+",1,0) ado.n<-table(ado[hrv==1],status[hrv==1])[2,] ado.p<-table(ado[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) ado.pvalue<-fisher.test(table(ado[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value piv<-ifelse(piv1=="+"|piv2=="+"|piv3=="+"|piv4a=="+"|piv4b=="+",1,0) piv.n<-table(piv[hrv==1],status[hrv==1])[2,] piv.p<-table(piv[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) piv.pvalue<-fisher.test(table(piv[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value hcov<-ifelse(oc43=="+"|nl63=="+"|x229e=="+",1,0) hcov.n<-table(hcov[hrv==1],status[hrv==1])[2,] hcov.p<-table(hcov[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) hcov.pvalue<-fisher.test(table(hcov[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value n.virus<-(rsva=="+")+(rsvb=="+")+(infa=="+")+(infb=="+")+(adob=="+")+(adoc=="+")+(adoe=="+")+ (piv1=="+")+(piv2=="+")+(piv3=="+")+(piv4a=="+")+(piv4b=="+")+(oc43=="+")+(nl63=="+")+(x229e=="+")+ (hrv.old=="+") coinfected1<-ifelse(n.virus>=2,1,0) coinfected<-ifelse(rsva=="Missing",NA,coinfected1) coinf.n<-table(coinfected[hrv==1],status[hrv==1]) coinf.p<-table(coinfected[hrv==1],status[hrv==1])[2,]/table(status[hrv==1]) coinf.pvalue<-chisq.test(table(coinfected[hrv==1],status[hrv==1]))$p.value n.virus2<-rsv+inf+ado+piv+hcov any.virus2<-ifelse(n.virus2==0,0,1) any.n<-table(any.virus2[hrv==1],status[hrv==1])[2,] any.p<-table(any.virus2[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-n.missing) any.pvalue<-fisher.test(table(any.virus2[hrv==1],status[hrv==1])-rbind(n.missing,c(0,0)))$p.value ast.mo.n<-table(ast.mo[hrv==1],status[hrv==1]) ast.mo.p<-table(ast.mo[hrv==1],status[hrv==1])[2,]/table(status[hrv==1]) ast.mo.pvalue<-chisq.test(table(ast.mo[hrv==1],status[hrv==1]))$p.value ast.fa.n<-table(ast.fa[hrv==1],status[hrv==1]) ast.fa.p<-table(ast.fa[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-ast.fa.n[3,]) ast.fa.pvalue<-chisq.test(table(ast.fa[hrv==1],status[hrv==1])[-3,])$p.value ast.sib.n<-table(ast.sib[hrv==1],status[hrv==1]) ast.sib.p<-table(ast.sib[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-ast.sib.n[3,]-ast.sib.n[4,]) ast.sib.pvalue<-chisq.test(table(ast.sib[hrv==1],status[hrv==1])[-c(3,4),])$p.value all.mo.n<-table(all.mo[hrv==1],status[hrv==1]) all.mo.p<-table(all.mo[hrv==1],status[hrv==1])[2,]/table(status[hrv==1]) all.mo.pvalue<-chisq.test(table(all.mo[hrv==1],status[hrv==1]))$p.value all.fa.n<-table(all.fa[hrv==1],status[hrv==1]) all.fa.p<-table(all.fa[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-all.fa.n[3,]) all.fa.pvalue<-chisq.test(table(all.fa[hrv==1],status[hrv==1])[-3,])$p.value all.sib.n<-table(all.sib[hrv==1],status[hrv==1]) all.sib.p<-table(all.sib[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-all.sib.n[3,]-all.sib.n[4,]) all.sib.pvalue<-chisq.test(table(all.sib[hrv==1],status[hrv==1])[-c(3,4),])$p.value inh.steroid.n<-table(inh.steroid[hrv==1],status[hrv==1]) inh.steroid.p<-table(inh.steroid[hrv==1],status[hrv==1])[2,]/(table(status[hrv==1])-inh.steroid.n[3,]) inh.steroid.pvalue<-chisq.test(table(inh.steroid[hrv==1],status[hrv==1])[-3,])$p.value severity.n<-table(severity[hrv==1],status[hrv==1]) severity.p<-table(severity[hrv==1],status[hrv==1])/t(matrix(c(sum(severity.n[,1]),sum(severity.n[,2])),2,4)) severity.pvalue<-chisq.test(hrv.n)$p.value @ \begin{table} \scriptsize \caption{Summary of Argentina Patient Characteristics who were HRV positive by Wheezing Status} \centering{ \begin{tabular}{llll} \hline & Case & Control & p-value \\ & (n=\Sexpr{t.status[1]}) & (n=\Sexpr{t.status[2]}) & \\ \hline \\ Age & \Sexpr{agestuff.neg} & \Sexpr{agestuff.pos} & \Sexpr{ifelse(age.pvalue<0.0001,"<0.001",as.character(round(age.pvalue,3)))} \\ \\ Female & \Sexpr{female.n[1,1]} (\Sexpr{100*round(female.p[1],3)}\%) & \Sexpr{female.n[1,2]} (\Sexpr{100*round(female.p[2],3)}\%) & \Sexpr{ifelse(female.pvalue<0.0001,"<0.001",as.character(round(female.pvalue,3)))} \\ \\ Race \\ \hspace{.2in} Caucasian & \Sexpr{race.n[1,1]} (\Sexpr{100*round(race.p[1,1],3)}\%) & \Sexpr{race.n[1,2]} (\Sexpr{100*round(race.p[1,2],3)}\%) & \Sexpr{ifelse(race.pvalue<0.0001,"<0.001",as.character(round(race.pvalue,3)))} \\ \hspace{.2in} Native American & \Sexpr{race.n[2,1]} (\Sexpr{100*round(race.p[2,1],3)}\%) & \Sexpr{race.n[2,2]} (\Sexpr{100*round(race.p[2,2],3)}\%) \\ \hspace{.2in} African American & \Sexpr{race.n[3,1]} (\Sexpr{100*round(race.p[3,1],3)}\%) & \Sexpr{race.n[3,2]} (\Sexpr{100*round(race.p[3,2],3)}\%) \\ \\ Baseline Severity \\ \hspace{.2in} Mild Intermittent & \Sexpr{base.severity.n[1,1]} (\Sexpr{100*round(base.severity.p[1,1],3)}\%) & \Sexpr{base.severity.n[1,2]} (\Sexpr{100*round(base.severity.p[1,2],3)}\%) & \Sexpr{ifelse(base.severity.pvalue<0.0001,"<0.001",as.character(round(base.severity.pvalue,3)))} \\ \hspace{.2in} Mild Persistent & \Sexpr{base.severity.n[2,1]} (\Sexpr{100*round(base.severity.p[2,1],3)}\%) & \Sexpr{base.severity.n[2,2]} (\Sexpr{100*round(base.severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{base.severity.n[3,1]} (\Sexpr{100*round(base.severity.p[3,1],3)}\%) & \Sexpr{base.severity.n[3,2]} (\Sexpr{100*round(base.severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{base.severity.n[4,1]} (\Sexpr{100*round(base.severity.p[4,1],3)}\%) & \Sexpr{base.severity.n[4,2]} (\Sexpr{100*round(base.severity.p[4,2],3)}\%) \\ \\ Exacerbation Severity Score \\ \hspace{.2in} None & \Sexpr{severity.n[1,1]} (\Sexpr{100*round(severity.p[1,1],3)}\%) & \Sexpr{severity.n[1,2]} (\Sexpr{100*round(severity.p[1,2],3)}\%) & \Sexpr{ifelse(severity.pvalue<0.0001,"<0.001",as.character(round(severity.pvalue,3)))} \\ \hspace{.2in} Mild & \Sexpr{severity.n[2,1]} (\Sexpr{100*round(severity.p[2,1],3)}\%) & \Sexpr{severity.n[2,2]} (\Sexpr{100*round(severity.p[2,2],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{severity.n[3,1]} (\Sexpr{100*round(severity.p[3,1],3)}\%) & \Sexpr{severity.n[3,2]} (\Sexpr{100*round(severity.p[3,2],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{severity.n[4,1]} (\Sexpr{100*round(severity.p[4,1],3)}\%) & \Sexpr{severity.n[4,2]} (\Sexpr{100*round(severity.p[4,2],3)}\%) \\ \\ Breastfed \\ \hspace{.2in} No & \Sexpr{breast.n[1,1]} (\Sexpr{100*round(breast.p[1,1],3)}\%) & \Sexpr{breast.n[1,2]} (\Sexpr{100*round(breast.p[1,2],3)}\%) & \Sexpr{ifelse(breast.pvalue<0.0001,"<0.001",as.character(round(breast.pvalue,3)))} \\ \hspace{.2in} Yes & \Sexpr{breast.n[2,1]} (\Sexpr{100*round(breast.p[2,1],3)}\%) & \Sexpr{breast.n[2,2]} (\Sexpr{100*round(breast.p[2,2],3)}\%) \\ \\ Number of Siblings \\ \hspace{.2in} 0 & \Sexpr{sib.cat.n[1,1]} (\Sexpr{100*round(sib.cat.p[1,1],3)}\%) & \Sexpr{sib.cat.n[1,2]} (\Sexpr{100*round(sib.cat.p[1,2],3)}\%) & \Sexpr{ifelse(sib.cat.pvalue<0.0001,"<0.001",as.character(round(sib.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{sib.cat.n[2,1]} (\Sexpr{100*round(sib.cat.p[2,1],3)}\%) & \Sexpr{sib.cat.n[2,2]} (\Sexpr{100*round(sib.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{sib.cat.n[3,1]} (\Sexpr{100*round(sib.cat.p[3,1],3)}\%) & \Sexpr{sib.cat.n[3,2]} (\Sexpr{100*round(sib.cat.p[3,2],3)}\%) \\ \\ Prior Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{tot.hosp.cat.n[1,1]} (\Sexpr{100*round(tot.hosp.cat.p[1,1],3)}\%) & \Sexpr{tot.hosp.cat.n[1,2]} (\Sexpr{100*round(tot.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(tot.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(tot.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{tot.hosp.cat.n[2,1]} (\Sexpr{100*round(tot.hosp.cat.p[2,1],3)}\%) & \Sexpr{tot.hosp.cat.n[2,2]} (\Sexpr{100*round(tot.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{tot.hosp.cat.n[3,1]} (\Sexpr{100*round(tot.hosp.cat.p[3,1],3)}\%) & \Sexpr{tot.hosp.cat.n[3,2]} (\Sexpr{100*round(tot.hosp.cat.p[3,2],3)}\%) \\ \\ Prior ICU Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{icu.hosp.cat.n[1,1]} (\Sexpr{100*round(icu.hosp.cat.p[1,1],3)}\%) & \Sexpr{icu.hosp.cat.n[1,2]} (\Sexpr{100*round(icu.hosp.cat.p[1,2],3)}\%) & \Sexpr{ifelse(icu.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(icu.hosp.cat.pvalue,3)))} \\ \hspace{.2in} 1 & \Sexpr{icu.hosp.cat.n[2,1]} (\Sexpr{100*round(icu.hosp.cat.p[2,1],3)}\%) & \Sexpr{icu.hosp.cat.n[2,2]} (\Sexpr{100*round(icu.hosp.cat.p[2,2],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{icu.hosp.cat.n[3,1]} (\Sexpr{100*round(icu.hosp.cat.p[3,1],3)}\%) & \Sexpr{icu.hosp.cat.n[3,2]} (\Sexpr{100*round(icu.hosp.cat.p[3,2],3)}\%) \\ \\ Smoker in Home & \Sexpr{smoke.n[2,1]} (\Sexpr{100*round(smoke.p[1],3)}\%) & \Sexpr{smoke.n[2,2]} (\Sexpr{100*round(smoke.p[2],3)}\%) & \Sexpr{ifelse(smoke.pvalue<0.001,"<0.001",as.character(round(smoke.pvalue,3)))} \\ \\ Asthma in Family \\ \hspace{.2in} Mother & \Sexpr{ast.mo.n[2,1]} (\Sexpr{100*round(ast.mo.p[1],3)}\%) & \Sexpr{ast.mo.n[2,2]} (\Sexpr{100*round(ast.mo.p[2],3)}\%) & \Sexpr{ifelse(ast.mo.pvalue<0.001,"<0.001",as.character(round(ast.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{ast.fa.n[2,1]} (\Sexpr{100*round(ast.fa.p[1],3)}\%) & \Sexpr{ast.fa.n[2,2]} (\Sexpr{100*round(ast.fa.p[2],3)}\%) & \Sexpr{ifelse(ast.fa.pvalue<0.001,"<0.001",as.character(round(ast.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{ast.sib.n[2,1]} (\Sexpr{100*round(ast.sib.p[1],3)}\%) & \Sexpr{ast.sib.n[2,2]} (\Sexpr{100*round(ast.sib.p[2],3)}\%) & \Sexpr{ifelse(ast.sib.pvalue<0.001,"<0.001",as.character(round(ast.sib.pvalue,3)))} \\ \\ Allergies in Family \\ \hspace{.2in} Mother & \Sexpr{all.mo.n[2,1]} (\Sexpr{100*round(all.mo.p[1],3)}\%) & \Sexpr{all.mo.n[2,2]} (\Sexpr{100*round(all.mo.p[2],3)}\%) & \Sexpr{ifelse(all.mo.pvalue<0.001,"<0.001",as.character(round(all.mo.pvalue,3)))} \\ \hspace{.2in} Father & \Sexpr{all.fa.n[2,1]} (\Sexpr{100*round(all.fa.p[1],3)}\%) & \Sexpr{all.fa.n[2,2]} (\Sexpr{100*round(all.fa.p[2],3)}\%) & \Sexpr{ifelse(all.fa.pvalue<0.001,"<0.001",as.character(round(all.fa.pvalue,3)))} \\ \hspace{.2in} Siblings & \Sexpr{all.sib.n[2,1]} (\Sexpr{100*round(all.sib.p[1],3)}\%) & \Sexpr{all.sib.n[2,2]} (\Sexpr{100*round(all.sib.p[2],3)}\%) & \Sexpr{ifelse(all.sib.pvalue<0.001,"<0.001",as.character(round(all.sib.pvalue,3)))} \\ \\ Inhaled Steroid Use & \Sexpr{inh.steroid.n[2,1]} (\Sexpr{100*round(inh.steroid.p[1],3)}\%) & \Sexpr{inh.steroid.n[2,2]} (\Sexpr{100*round(inh.steroid.p[2],3)}\%) & \Sexpr{ifelse(inh.steroid.pvalue<0.001,"<0.001",as.character(round(inh.steroid.pvalue,3)))} \\ \\ Positive for other viruses \\ \hspace{.2in} Missing & \Sexpr{rsva.n[3,1]} (\Sexpr{100*round(rsva.n[3,1]/sum(rsva.n[,1]),3)}\%) & \Sexpr{rsva.n[3,2]} (\Sexpr{100*round(rsva.n[3,2]/sum(rsva.n[,2]),3)}\%)\\ \hspace{.2in} RSV-A & \Sexpr{rsva.n[2,1]} (\Sexpr{100*round(rsva.p[1],3)}\%) & \Sexpr{rsva.n[2,2]} (\Sexpr{100*round(rsva.p[2],3)}\%) & \Sexpr{ifelse(rsva.pvalue<0.001,"<0.001",as.character(round(rsva.pvalue,3)))} \\ \hspace{.2in} RSV-B & \Sexpr{rsvb.n[2,1]} (\Sexpr{100*round(rsvb.p[1],3)}\%) & \Sexpr{rsvb.n[2,2]} (\Sexpr{100*round(rsvb.p[2],3)}\%) & \Sexpr{ifelse(rsvb.pvalue<0.001,"<0.001",as.character(round(rsvb.pvalue,3)))} \\ \hspace{.2in} INF-A & \Sexpr{infa.n[2,1]} (\Sexpr{100*round(infa.p[1],3)}\%) & \Sexpr{infa.n[2,2]} (\Sexpr{100*round(infa.p[2],3)}\%) & \Sexpr{ifelse(infa.pvalue<0.001,"<0.001",as.character(round(infa.pvalue,3)))} \\ \hspace{.2in} INF-B & \Sexpr{infb.n[2,1]} (\Sexpr{100*round(infb.p[1],3)}\%) & \Sexpr{infb.n[2,2]} (\Sexpr{100*round(infb.p[2],3)}\%) & \Sexpr{ifelse(infb.pvalue<0.001,"<0.001",as.character(round(infb.pvalue,3)))} \\ \hspace{.2in} PIV-1 & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-2 & \Sexpr{piv2.n[2,1]} (\Sexpr{100*round(piv2.p[1],3)}\%) & \Sexpr{piv2.n[2,2]} (\Sexpr{100*round(piv2.p[2],3)}\%) & \Sexpr{ifelse(piv2.pvalue<0.001,"<0.001",as.character(round(piv2.pvalue,3)))} \\ \hspace{.2in} PIV-3 & \Sexpr{piv3.n[2,1]} (\Sexpr{100*round(piv3.p[1],3)}\%) & \Sexpr{piv3.n[2,2]} (\Sexpr{100*round(piv3.p[2],3)}\%) & \Sexpr{ifelse(piv3.pvalue<0.001,"<0.001",as.character(round(piv3.pvalue,3)))} \\ \hspace{.2in} PIV-4A & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-4B & \Sexpr{piv4b.n[2,1]} (\Sexpr{100*round(piv4b.p[1],3)}\%) & \Sexpr{piv4b.n[2,2]} (\Sexpr{100*round(piv4b.p[2],3)}\%) & \Sexpr{ifelse(piv4b.pvalue<0.001,"<0.001",as.character(round(piv4b.pvalue,3)))} \\ \hspace{.2in} HMPV & \Sexpr{hmpv.n[2,1]} (\Sexpr{100*round(hmpv.p[1],3)}\%) & \Sexpr{hmpv.n[2,2]} (\Sexpr{100*round(hmpv.p[2],3)}\%) & \Sexpr{ifelse(hmpv.pvalue<0.001,"<0.001",as.character(round(hmpv.pvalue,3)))} \\ \hspace{.2in} ADO-B & \Sexpr{adob.n[2,1]} (\Sexpr{100*round(adob.p[1],3)}\%) & \Sexpr{adob.n[2,2]} (\Sexpr{100*round(adob.p[2],3)}\%) & \Sexpr{ifelse(adob.pvalue<0.001,"<0.001",as.character(round(adob.pvalue,3)))} \\ \hspace{.2in} ADO-C & \Sexpr{adoc.n[2,1]} (\Sexpr{100*round(adoc.p[1],3)}\%) & \Sexpr{adoc.n[2,2]} (\Sexpr{100*round(adoc.p[2],3)}\%) & \Sexpr{ifelse(adoc.pvalue<0.001,"<0.001",as.character(round(adoc.pvalue,3)))} \\ \hspace{.2in} ADO-E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} OC43 & \Sexpr{oc43.n[2,1]} (\Sexpr{100*round(oc43.p[1],3)}\%) & \Sexpr{oc43.n[2,2]} (\Sexpr{100*round(oc43.p[2],3)}\%) & \Sexpr{ifelse(oc43.pvalue<0.001,"<0.001",as.character(round(oc43.pvalue,3)))} \\ \hspace{.2in} NL63 & \Sexpr{nl63.n[2,1]} (\Sexpr{100*round(nl63.p[1],3)}\%) & \Sexpr{nl63.n[2,2]} (\Sexpr{100*round(nl63.p[2],3)}\%) & \Sexpr{ifelse(nl63.pvalue<0.001,"<0.001",as.character(round(nl63.pvalue,3)))} \\ \hspace{.2in} 229E & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} Coinfected & \Sexpr{coinf.n[2,1]} (\Sexpr{100*round(coinf.p[1],3)}\%) & \Sexpr{coinf.n[2,2]} (\Sexpr{100*round(coinf.p[2],3)}\%) & \Sexpr{ifelse(coinf.pvalue<0.001,"<0.001",as.character(round(coinf.pvalue,3)))} \\ \hspace{.2in} Any & \Sexpr{any.n[1]} (\Sexpr{100*round(any.p[1],3)}\%) & \Sexpr{any.n[2]} (\Sexpr{100*round(any.p[2],3)}\%) & \Sexpr{ifelse(any.pvalue<0.001,"<0.001",as.character(round(any.pvalue,3)))} \\ \hspace{.2in} Any RSV & \Sexpr{rsv.n[1]} (\Sexpr{100*round(rsv.p[1],3)}\%) & \Sexpr{rsv.n[2]} (\Sexpr{100*round(rsv.p[2],3)}\%) & \Sexpr{ifelse(rsv.pvalue<0.001,"<0.001",as.character(round(rsv.pvalue,3)))} \\ \hspace{.2in} Any INF & \Sexpr{inf.n[1]} (\Sexpr{100*round(inf.p[1],3)}\%) & \Sexpr{inf.n[2]} (\Sexpr{100*round(inf.p[2],3)}\%) & \Sexpr{ifelse(inf.pvalue<0.001,"<0.001",as.character(round(inf.pvalue,3)))} \\ \hspace{.2in} Any PIV & \Sexpr{piv.n[1]} (\Sexpr{100*round(piv.p[1],3)}\%) & \Sexpr{piv.n[2]} (\Sexpr{100*round(piv.p[2],3)}\%) & \Sexpr{ifelse(piv.pvalue<0.001,"<0.001",as.character(round(piv.pvalue,3)))} \\ \hspace{.2in} Any ADO & \Sexpr{ado.n[1]} (\Sexpr{100*round(ado.p[1],3)}\%) & \Sexpr{ado.n[2]} (\Sexpr{100*round(ado.p[2],3)}\%) & \Sexpr{ifelse(ado.pvalue<0.001,"<0.001",as.character(round(ado.pvalue,3)))} \\ \hspace{.2in} Any HCOV& \Sexpr{hcov.n[1]} (\Sexpr{100*round(hcov.p[1],3)}\%) & \Sexpr{hcov.n[2]} (\Sexpr{100*round(hcov.p[2],3)}\%) & \Sexpr{ifelse(hcov.pvalue<0.001,"<0.001",as.character(round(hcov.pvalue,3)))} \\ \\ \hline \end{tabular} } \end{table} <>= hrv.clade.old<-hrv.clade hrv.clade<-ifelse(hrv.old=="-",NA, ifelse(hrv.old=="Missing",NA,as.character(hrv.clade.old))) t.hrv.clade<-table(hrv.clade) hrv.clade.ac<-ifelse(hrv.clade=="B"|hrv.clade=="Unknown",NA,as.character(hrv.clade)) hrv.clade.ab.c<-ifelse(hrv.clade=="B"|hrv.clade=="A","A/B", ifelse(hrv.clade=="Unknown",NA,as.character(hrv.clade))) age.a<-round(summary(age[hrv.clade=="A"]),1) agestuff.a<-paste(age.a[3]," (",age.a[2],", ",age.a[5],")",sep="") age.b<-round(summary(age[hrv.clade=="B"]),1) agestuff.b<-paste(age.b[3]," (",age.b[2],", ",age.b[5],")",sep="") age.c<-round(summary(age[hrv.clade=="C"]),1) agestuff.c<-paste(age.c[3]," (",age.c[2],", ",age.c[5],")",sep="") age.u<-round(summary(age[hrv.clade=="Unknown"]),1) agestuff.u<-paste(age.u[3]," (",age.u[2],", ",age.u[5],")",sep="") age.pvalue<-wilcox.test(age~hrv.clade.ac)$p.value age.pvalue2<-wilcox.test(age~hrv.clade.ab.c)$p.value female.n<-table(sex,hrv.clade) female.p<-table(sex,hrv.clade)[1,]/table(hrv.clade) female.pvalue<-chisq.test(sex,hrv.clade.ac)$p.value female.pvalue2<-chisq.test(sex,hrv.clade.ab.c)$p.value race.n<-table(race,hrv.clade) race.p<-table(race,hrv.clade)/t(matrix(rep(table(hrv.clade),3),4,3)) race.pvalue<-chisq.test(race,hrv.clade.ac)$p.value race.pvalue2<-chisq.test(race,hrv.clade.ab.c)$p.value base.severity.n<-table(base.severity,hrv.clade) base.severity.p<-table(base.severity,hrv.clade)/t(matrix(rep(table(hrv.clade),4),4,4)) base.severity.pvalue<-fisher.test(table(base.severity,hrv.clade.ac))$p.value base.severity.pvalue2<-fisher.test(table(base.severity,hrv.clade.ab.c))$p.value breast.n<-table(breastfed,hrv.clade) breast.p<-table(breastfed,hrv.clade)/t(matrix(rep(table(hrv.clade),3),4,3)) breast.pvalue<-chisq.test(table(breastfed,hrv.clade.ac)[-3,])$p.value breast.pvalue2<-chisq.test(table(breastfed,hrv.clade.ab.c)[-3,])$p.value smoke.n<-table(other.smoker,hrv.clade) smoke.p<-table(other.smoker,hrv.clade)[2,]/table(hrv.clade) smoke.pvalue<-chisq.test(table(other.smoker,hrv.clade.ac))$p.value smoke.pvalue2<-chisq.test(table(other.smoker,hrv.clade.ab.c))$p.value wilcox.test(sibs~hrv.clade.ac)$p.value table(sibs,hrv.clade) sib.cat<-ifelse(sibs>=2,">=2",as.character(sibs)) sib.cat.n<-table(sib.cat,hrv.clade) sib.cat.p<-table(sib.cat,hrv.clade)/t(matrix(c(sum(sib.cat.n[,1]),sum(sib.cat.n[,2])),4,3)) sib.cat.pvalue<-chisq.test(sib.cat,hrv.clade.ac)$p.value sib.cat.pvalue2<-chisq.test(sib.cat,hrv.clade.ab.c)$p.value tot.hosp.cat<-ifelse(tot.hosp>=2,">=2",as.character(tot.hosp)) tot.hosp.cat.n<-table(tot.hosp.cat,hrv.clade) tot.hosp.cat.p<-table(tot.hosp.cat,hrv.clade)/t(matrix(c(sum(tot.hosp.cat.n[,1]),sum(tot.hosp.cat.n[,2])),4,3)) tot.hosp.cat.pvalue<-chisq.test(tot.hosp.cat,hrv.clade.ac)$p.value tot.hosp.cat.pvalue2<-chisq.test(tot.hosp.cat,hrv.clade.ab.c)$p.value icu.hosp.cat<-ifelse(icu.hosp>=2,">=2",as.character(icu.hosp)) icu.hosp.cat.n<-table(icu.hosp.cat,hrv.clade) icu.hosp.cat.p<-table(icu.hosp.cat,hrv.clade)/t(matrix(c(sum(icu.hosp.cat.n[,1]),sum(icu.hosp.cat.n[,2])),4,3)) icu.hosp.cat.pvalue<-chisq.test(icu.hosp.cat,hrv.clade.ac)$p.value icu.hosp.cat.pvalue2<-chisq.test(icu.hosp.cat,hrv.clade.ab.c)$p.value rsva.n<-table(rsva,hrv.clade) n.missing<-rsva.n[3,] rsva.p<-table(rsva,hrv.clade)[2,]/(table(hrv.clade)-n.missing) rsva.pvalue<-chisq.test(table(rsva,hrv.clade.ac)[-3,])$p.value rsva.pvalue2<-chisq.test(table(rsva,hrv.clade.ab.c)[-3,])$p.value rsvb.n<-table(rsvb,hrv.clade) rsvb.p<-table(rsvb,hrv.clade)[2,]/(table(hrv.clade)-n.missing) rsvb.pvalue<-fisher.test(table(rsvb,hrv.clade.ac)[-3,])$p.value rsvb.pvalue2<-fisher.test(table(rsvb,hrv.clade.ab.c)[-3,])$p.value infa.n<-table(infa,hrv.clade) infa.p<-table(infa,hrv.clade)[2,]/(table(hrv.clade)-n.missing) infa.pvalue<-fisher.test(table(infa,hrv.clade.ac)[-3,])$p.value infa.pvalue2<-fisher.test(table(infa,hrv.clade.ab.c)[-3,])$p.value infb.n<-table(infb,hrv.clade) infb.p<-table(infb,hrv.clade)[2,]/(table(hrv.clade)-n.missing) infb.pvalue<-fisher.test(table(infb,hrv.clade.ac)[-3,])$p.value infb.pvalue2<-fisher.test(table(infb,hrv.clade.ab.c)[-3,])$p.value piv1.n<-table(piv1,hrv.clade) piv1.p<-table(piv1,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv1.pvalue<-fisher.test(table(piv1,hrv.clade.ac)[-3,])$p.value piv1.pvalue2<-fisher.test(table(piv1,hrv.clade.ab.c)[-3,])$p.value piv2.n<-table(piv2,hrv.clade) piv2.p<-table(piv2,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv2.pvalue<-fisher.test(table(piv2,hrv.clade.ac)[-3,])$p.value piv2.pvalue2<-fisher.test(table(piv2,hrv.clade.ab.c)[-3,])$p.value piv3.n<-table(piv3,hrv.clade) piv3.p<-table(piv3,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv3.pvalue<-fisher.test(table(piv3,hrv.clade.ac)[-3,])$p.value piv3.pvalue2<-fisher.test(table(piv3,hrv.clade.ab.c)[-3,])$p.value piv4a.n<-table(piv4a,hrv.clade) piv4a.p<-table(piv4a,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv4a.pvalue<-fisher.test(table(piv4a,hrv.clade.ac)[-3,])$p.value piv4a.pvalue2<-fisher.test(table(piv4a,hrv.clade.ab.c)[-3,])$p.value piv4b.n<-table(piv4b,hrv.clade) piv4b.p<-table(piv4b,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv4b.pvalue<-fisher.test(table(piv4b,hrv.clade.ac)[-3,])$p.value piv4b.pvalue2<-fisher.test(table(piv4b,hrv.clade.ab.c)[-3,])$p.value piv4b.n<-table(piv4b,hrv.clade) piv4b.p<-table(piv4b,hrv.clade)[2,]/(table(hrv.clade)-n.missing) piv4b.pvalue<-fisher.test(table(piv4b,hrv.clade.ac)[-3,])$p.value piv4b.pvalue2<-fisher.test(table(piv4b,hrv.clade.ab.c)[-3,])$p.value hmpv.n<-table(hmpv,hrv.clade) hmpv.p<-table(hmpv,hrv.clade)[2,]/(table(hrv.clade)-n.missing) hmpv.pvalue<-fisher.test(table(hmpv,hrv.clade.ac)[-3,])$p.value hmpv.pvalue2<-fisher.test(table(hmpv,hrv.clade.ab.c)[-3,])$p.value adob.n<-table(adob,hrv.clade) adob.p<-table(adob,hrv.clade)[2,]/(table(hrv.clade)-n.missing) adob.pvalue<-fisher.test(table(adob,hrv.clade.ac)[-3,])$p.value adob.pvalue2<-fisher.test(table(adob,hrv.clade.ab.c)[-3,])$p.value adoc.n<-table(adoc,hrv.clade) adoc.p<-table(adoc,hrv.clade)[2,]/(table(hrv.clade)-n.missing) adoc.pvalue<-fisher.test(table(adoc,hrv.clade.ac)[-3,])$p.value adoc.pvalue2<-fisher.test(table(adoc,hrv.clade.ab.c)[-3,])$p.value adoe.n<-table(adoe,hrv.clade) adoe.p<-table(adoe,hrv.clade)[2,]/(table(hrv.clade)-n.missing) adoe.pvalue<-fisher.test(table(adoe,hrv.clade.ac)[-3,])$p.value adoe.pvalue2<-fisher.test(table(adoe,hrv.clade.ab.c)[-3,])$p.value oc43.n<-table(oc43,hrv.clade) oc43.p<-table(oc43,hrv.clade)[2,]/(table(hrv.clade)-n.missing) oc43.pvalue<-fisher.test(table(oc43,hrv.clade.ac)[-3,])$p.value oc43.pvalue2<-fisher.test(table(oc43,hrv.clade.ab.c)[-3,])$p.value nl63.n<-table(nl63,hrv.clade) nl63.p<-table(nl63,hrv.clade)[2,]/(table(hrv.clade)-n.missing) nl63.pvalue<-fisher.test(table(nl63,hrv.clade.ac)[-3,])$p.value nl63.pvalue2<-fisher.test(table(nl63,hrv.clade.ab.c)[-3,])$p.value x229e.n<-table(x229e,hrv.clade) x229e.p<-table(x229e,hrv.clade)[2,]/(table(hrv.clade)-n.missing) x229e.pvalue<-fisher.test(table(x229e,hrv.clade.ac)[-3,])$p.value x229e.pvalue2<-fisher.test(table(x229e,hrv.clade.ab.c)[-3,])$p.value ast.mo.n<-table(ast.mo,hrv.clade) ast.mo.p<-table(ast.mo,hrv.clade)[2,]/table(hrv.clade) ast.mo.pvalue<-chisq.test(table(ast.mo,hrv.clade.ac))$p.value ast.mo.pvalue2<-chisq.test(table(ast.mo,hrv.clade.ab.c))$p.value ast.fa.n<-table(ast.fa,hrv.clade) ast.fa.p<-table(ast.fa,hrv.clade)[2,]/(table(hrv.clade)-ast.fa.n[3,]) ast.fa.pvalue<-chisq.test(table(ast.fa,hrv.clade.ac)[-3,])$p.value ast.fa.pvalue2<-chisq.test(table(ast.fa,hrv.clade.ab.c)[-3,])$p.value ast.sib.n<-table(ast.sib,hrv.clade) ast.sib.p<-table(ast.sib,hrv.clade)[2,]/(table(hrv.clade)-ast.sib.n[3,]-ast.sib.n[4,]) ast.sib.pvalue<-chisq.test(table(ast.sib,hrv.clade.ac)[-c(3,4),])$p.value ast.sib.pvalue2<-chisq.test(table(ast.sib,hrv.clade.ab.c)[-c(3,4),])$p.value all.mo.n<-table(all.mo,hrv.clade) all.mo.p<-table(all.mo,hrv.clade)[2,]/table(hrv.clade) all.mo.pvalue<-chisq.test(table(all.mo,hrv.clade.ac))$p.value all.mo.pvalue2<-chisq.test(table(all.mo,hrv.clade.ab.c))$p.value all.fa.n<-table(all.fa,hrv.clade) all.fa.p<-table(all.fa,hrv.clade)[2,]/(table(hrv.clade)-all.fa.n[3,]) all.fa.pvalue<-chisq.test(table(all.fa,hrv.clade.ac)[-3,])$p.value all.fa.pvalue2<-chisq.test(table(all.fa,hrv.clade.ab.c)[-3,])$p.value all.sib.n<-table(all.sib,hrv.clade) all.sib.p<-table(all.sib,hrv.clade)[2,]/(table(hrv.clade)-all.sib.n[3,]-all.sib.n[4,]) all.sib.pvalue<-chisq.test(table(all.sib,hrv.clade.ac)[-c(3,4),])$p.value all.sib.pvalue2<-chisq.test(table(all.sib,hrv.clade.ab.c)[-c(3,4),])$p.value inh.steroid.n<-table(inh.steroid,hrv.clade) inh.steroid.p<-table(inh.steroid,hrv.clade)[2,]/(table(hrv.clade)-inh.steroid.n[3,]) inh.steroid.pvalue<-chisq.test(table(inh.steroid,hrv.clade.ac)[-3,])$p.value inh.steroid.pvalue2<-chisq.test(table(inh.steroid,hrv.clade.ab.c)[-3,])$p.value severity.n<-table(severity,hrv.clade) severity.p<-table(severity,hrv.clade)/t(matrix(c(sum(severity.n[,1]),sum(severity.n[,2])),4,4)) severity.pvalue<-chisq.test(table(severity,hrv.clade.ac)[-4,])$p.value severity.pvalue2<-chisq.test(table(severity,hrv.clade.ab.c)[-4,])$p.value case.n<-table(status,hrv.clade) case.p<-case.n[1,]/table(hrv.clade) case.pvalue<-chisq.test(table(status,hrv.clade.ac))$p.value case.pvalue2<-chisq.test(table(status,hrv.clade.ab.c))$p.value junk<-glm(status~hrv.clade.ab.c,family="binomial") summary(junk) fisher.test(table(status,hrv.clade.ab.c))$p.value chisq.test(table(status,hrv.clade.ab.c),correct=FALSE)$p.value ###### For Fernando (9/15/10) chisq.test(matrix(c(32,15,30,30),nrow=2)) chisq.test(matrix(c(32,15,8,10),nrow=2)) chisq.test(matrix(c(32,15,36,19),nrow=2)) chisq.test(matrix(c(32,15,74,59),nrow=2)) ### HRV-C vs. all other HRV chisq.test(matrix(c(43,4,48,12),nrow=2)) chisq.test(matrix(c(43,4,10,8),nrow=2)) chisq.test(matrix(c(43,4,46,9),nrow=2)) chisq.test(matrix(c(43,4,104,29),nrow=2)) @ \begin{table} \scriptsize \caption{Summary of HRV-positive Patient Characteristics by Clade in Argentina} \centering{ \begin{tabular}{lllllll} \hline & A & B & C & Unknown & p-value & p-value \\ & (n=\Sexpr{t.hrv.clade[1]}) & (n=\Sexpr{t.hrv.clade[2]}) & (n=\Sexpr{t.hrv.clade[3]}) & (n=\Sexpr{t.hrv.clade[4]}) & (A vs C) & A/B vs C \\ \hline \\ Age & \Sexpr{agestuff.a} & \Sexpr{agestuff.b} & \Sexpr{agestuff.c} & \Sexpr{agestuff.u} & \Sexpr{ifelse(age.pvalue<0.0001,"<0.001",as.character(round(age.pvalue,3)))} & \Sexpr{ifelse(age.pvalue2<0.0001,"<0.001",as.character(round(age.pvalue2,3)))} \\ \\ Female & \Sexpr{female.n[1,1]} (\Sexpr{100*round(female.p[1],3)}\%) & \Sexpr{female.n[1,2]} (\Sexpr{100*round(female.p[2],3)}\%) & \Sexpr{female.n[1,3]} (\Sexpr{100*round(female.p[3],3)}\%) & \Sexpr{female.n[1,4]} (\Sexpr{100*round(female.p[4],3)}\%) & \Sexpr{ifelse(female.pvalue<0.0001,"<0.001",as.character(round(female.pvalue,3)))} & \Sexpr{ifelse(female.pvalue2<0.0001,"<0.001",as.character(round(female.pvalue2,3)))} \\ \\ Race \\ \hspace{.2in} Caucasian & \Sexpr{race.n[1,1]} (\Sexpr{100*round(race.p[1,1],3)}\%) & \Sexpr{race.n[1,2]} (\Sexpr{100*round(race.p[1,2],3)}\%) & \Sexpr{race.n[1,3]} (\Sexpr{100*round(race.p[1,3],3)}\%) & \Sexpr{race.n[1,4]} (\Sexpr{100*round(race.p[1,4],3)}\%) & \Sexpr{ifelse(race.pvalue<0.0001,"<0.001",as.character(round(race.pvalue,3)))} & \Sexpr{ifelse(race.pvalue2<0.0001,"<0.001",as.character(round(race.pvalue2,3)))} \\ \hspace{.2in} Native American & \Sexpr{race.n[2,1]} (\Sexpr{100*round(race.p[2,1],3)}\%) & \Sexpr{race.n[2,2]} (\Sexpr{100*round(race.p[2,2],3)}\%) & \Sexpr{race.n[2,3]} (\Sexpr{100*round(race.p[2,3],3)}\%) & \Sexpr{race.n[2,4]} (\Sexpr{100*round(race.p[2,4],3)}\%) \\ \hspace{.2in} African American & \Sexpr{race.n[3,1]} (\Sexpr{100*round(race.p[3,1],3)}\%) & \Sexpr{race.n[3,2]} (\Sexpr{100*round(race.p[3,2],3)}\%) & \Sexpr{race.n[3,3]} (\Sexpr{100*round(race.p[3,3],3)}\%) & \Sexpr{race.n[3,4]} (\Sexpr{100*round(race.p[3,4],3)}\%) \\ \\ Baseline Severity \\ \hspace{.2in} Mild Intermittent & \Sexpr{base.severity.n[1,1]} (\Sexpr{100*round(base.severity.p[1,1],3)}\%) & \Sexpr{base.severity.n[1,2]} (\Sexpr{100*round(base.severity.p[1,2],3)}\%) & \Sexpr{base.severity.n[1,3]} (\Sexpr{100*round(base.severity.p[1,3],3)}\%) & \Sexpr{base.severity.n[1,4]} (\Sexpr{100*round(base.severity.p[1,4],3)}\%) & \Sexpr{ifelse(base.severity.pvalue<0.0001,"<0.001",as.character(round(base.severity.pvalue,3)))} & \Sexpr{ifelse(base.severity.pvalue2<0.0001,"<0.001",as.character(round(base.severity.pvalue2,3)))} \\ \hspace{.2in} Mild Persistent & \Sexpr{base.severity.n[2,1]} (\Sexpr{100*round(base.severity.p[2,1],3)}\%) & \Sexpr{base.severity.n[2,2]} (\Sexpr{100*round(base.severity.p[2,2],3)}\%) & \Sexpr{base.severity.n[2,3]} (\Sexpr{100*round(base.severity.p[2,3],3)}\%) & \Sexpr{base.severity.n[2,4]} (\Sexpr{100*round(base.severity.p[2,4],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{base.severity.n[3,1]} (\Sexpr{100*round(base.severity.p[3,1],3)}\%) & \Sexpr{base.severity.n[3,2]} (\Sexpr{100*round(base.severity.p[3,2],3)}\%) & \Sexpr{base.severity.n[3,3]} (\Sexpr{100*round(base.severity.p[3,3],3)}\%) & \Sexpr{base.severity.n[3,4]} (\Sexpr{100*round(base.severity.p[3,4],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{base.severity.n[4,1]} (\Sexpr{100*round(base.severity.p[4,1],3)}\%) & \Sexpr{base.severity.n[4,2]} (\Sexpr{100*round(base.severity.p[4,2],3)}\%) & \Sexpr{base.severity.n[4,3]} (\Sexpr{100*round(base.severity.p[4,3],3)}\%) & \Sexpr{base.severity.n[4,4]} (\Sexpr{100*round(base.severity.p[4,4],3)}\%) \\ \\ Exacerbation Severity Score \\ \hspace{.2in} None & \Sexpr{severity.n[1,1]} (\Sexpr{100*round(severity.p[1,1],3)}\%) & \Sexpr{severity.n[1,2]} (\Sexpr{100*round(severity.p[1,2],3)}\%) & \Sexpr{severity.n[1,3]} (\Sexpr{100*round(severity.p[1,3],3)}\%) & \Sexpr{severity.n[1,4]} (\Sexpr{100*round(severity.p[1,4],3)}\%) & \Sexpr{ifelse(severity.pvalue<0.0001,"<0.001",as.character(round(severity.pvalue,3)))} & \Sexpr{ifelse(severity.pvalue2<0.0001,"<0.001",as.character(round(severity.pvalue2,3)))} \\ \hspace{.2in} Mild & \Sexpr{severity.n[2,1]} (\Sexpr{100*round(severity.p[2,1],3)}\%) & \Sexpr{severity.n[2,2]} (\Sexpr{100*round(severity.p[2,2],3)}\%) & \Sexpr{severity.n[2,3]} (\Sexpr{100*round(severity.p[2,3],3)}\%) & \Sexpr{severity.n[2,4]} (\Sexpr{100*round(severity.p[2,4],3)}\%) \\ \hspace{.2in} Moderate & \Sexpr{severity.n[3,1]} (\Sexpr{100*round(severity.p[3,1],3)}\%) & \Sexpr{severity.n[3,2]} (\Sexpr{100*round(severity.p[3,2],3)}\%) & \Sexpr{severity.n[3,3]} (\Sexpr{100*round(severity.p[3,3],3)}\%) & \Sexpr{severity.n[3,4]} (\Sexpr{100*round(severity.p[3,4],3)}\%) \\ \hspace{.2in} Severe & \Sexpr{severity.n[4,1]} (\Sexpr{100*round(severity.p[4,1],3)}\%) & \Sexpr{severity.n[4,2]} (\Sexpr{100*round(severity.p[4,2],3)}\%) & \Sexpr{severity.n[4,3]} (\Sexpr{100*round(severity.p[4,3],3)}\%) & \Sexpr{severity.n[4,4]} (\Sexpr{100*round(severity.p[4,4],3)}\%) \\ \\ Breastfed \\ \hspace{.2in} No & \Sexpr{breast.n[1,1]} (\Sexpr{100*round(breast.p[1,1],3)}\%) & \Sexpr{breast.n[1,2]} (\Sexpr{100*round(breast.p[1,2],3)}\%) & \Sexpr{breast.n[1,3]} (\Sexpr{100*round(breast.p[1,3],3)}\%) & \Sexpr{breast.n[1,4]} (\Sexpr{100*round(breast.p[1,4],3)}\%) & \Sexpr{ifelse(breast.pvalue<0.0001,"<0.001",as.character(round(breast.pvalue,3)))} & \Sexpr{ifelse(breast.pvalue2<0.0001,"<0.001",as.character(round(breast.pvalue2,3)))} \\ \hspace{.2in} Yes & \Sexpr{breast.n[2,1]} (\Sexpr{100*round(breast.p[2,1],3)}\%) & \Sexpr{breast.n[2,2]} (\Sexpr{100*round(breast.p[2,2],3)}\%) & \Sexpr{breast.n[2,3]} (\Sexpr{100*round(breast.p[2,3],3)}\%) & \Sexpr{breast.n[2,4]} (\Sexpr{100*round(breast.p[2,4],3)}\%) \\ \\ Number of Siblings \\ \hspace{.2in} 0 & \Sexpr{sib.cat.n[1,1]} (\Sexpr{100*round(sib.cat.p[1,1],3)}\%) & \Sexpr{sib.cat.n[1,2]} (\Sexpr{100*round(sib.cat.p[1,2],3)}\%) & \Sexpr{sib.cat.n[1,3]} (\Sexpr{100*round(sib.cat.p[1,3],3)}\%) & \Sexpr{sib.cat.n[1,4]} (\Sexpr{100*round(sib.cat.p[1,4],3)}\%) & \Sexpr{ifelse(sib.cat.pvalue<0.0001,"<0.001",as.character(round(sib.cat.pvalue,3)))} & \Sexpr{ifelse(sib.cat.pvalue2<0.0001,"<0.001",as.character(round(sib.cat.pvalue2,3)))} \\ \hspace{.2in} 1 & \Sexpr{sib.cat.n[2,1]} (\Sexpr{100*round(sib.cat.p[2,1],3)}\%) & \Sexpr{sib.cat.n[2,2]} (\Sexpr{100*round(sib.cat.p[2,2],3)}\%) & \Sexpr{sib.cat.n[2,3]} (\Sexpr{100*round(sib.cat.p[2,3],3)}\%) & \Sexpr{sib.cat.n[2,4]} (\Sexpr{100*round(sib.cat.p[2,4],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{sib.cat.n[3,1]} (\Sexpr{100*round(sib.cat.p[3,1],3)}\%) & \Sexpr{sib.cat.n[3,2]} (\Sexpr{100*round(sib.cat.p[3,2],3)}\%) & \Sexpr{sib.cat.n[3,3]} (\Sexpr{100*round(sib.cat.p[3,3],3)}\%) & \Sexpr{sib.cat.n[3,4]} (\Sexpr{100*round(sib.cat.p[3,4],3)}\%) \\ \\ Prior Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{tot.hosp.cat.n[1,1]} (\Sexpr{100*round(tot.hosp.cat.p[1,1],3)}\%) & \Sexpr{tot.hosp.cat.n[1,2]} (\Sexpr{100*round(tot.hosp.cat.p[1,2],3)}\%) & \Sexpr{tot.hosp.cat.n[1,3]} (\Sexpr{100*round(tot.hosp.cat.p[1,3],3)}\%) & \Sexpr{tot.hosp.cat.n[1,4]} (\Sexpr{100*round(tot.hosp.cat.p[1,4],3)}\%) & \Sexpr{ifelse(tot.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(tot.hosp.cat.pvalue,3)))} & \Sexpr{ifelse(tot.hosp.cat.pvalue2<0.0001,"<0.001",as.character(round(tot.hosp.cat.pvalue2,3)))} \\ \hspace{.2in} 1 & \Sexpr{tot.hosp.cat.n[2,1]} (\Sexpr{100*round(tot.hosp.cat.p[2,1],3)}\%) & \Sexpr{tot.hosp.cat.n[2,2]} (\Sexpr{100*round(tot.hosp.cat.p[2,2],3)}\%) & \Sexpr{tot.hosp.cat.n[2,3]} (\Sexpr{100*round(tot.hosp.cat.p[2,3],3)}\%) & \Sexpr{tot.hosp.cat.n[2,4]} (\Sexpr{100*round(tot.hosp.cat.p[2,4],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{tot.hosp.cat.n[3,1]} (\Sexpr{100*round(tot.hosp.cat.p[3,1],3)}\%) & \Sexpr{tot.hosp.cat.n[3,2]} (\Sexpr{100*round(tot.hosp.cat.p[3,2],3)}\%) & \Sexpr{tot.hosp.cat.n[3,3]} (\Sexpr{100*round(tot.hosp.cat.p[3,3],3)}\%) & \Sexpr{tot.hosp.cat.n[3,4]} (\Sexpr{100*round(tot.hosp.cat.p[3,4],3)}\%) \\ \\ Prior ICU Asthma Hospitalizations \\ \hspace{.2in} 0 & \Sexpr{icu.hosp.cat.n[1,1]} (\Sexpr{100*round(icu.hosp.cat.p[1,1],3)}\%) & \Sexpr{icu.hosp.cat.n[1,2]} (\Sexpr{100*round(icu.hosp.cat.p[1,2],3)}\%) & \Sexpr{icu.hosp.cat.n[1,3]} (\Sexpr{100*round(icu.hosp.cat.p[1,3],3)}\%) & \Sexpr{icu.hosp.cat.n[1,4]} (\Sexpr{100*round(icu.hosp.cat.p[1,4],3)}\%) & \Sexpr{ifelse(icu.hosp.cat.pvalue<0.0001,"<0.001",as.character(round(icu.hosp.cat.pvalue,3)))} & \Sexpr{ifelse(icu.hosp.cat.pvalue2<0.0001,"<0.001",as.character(round(icu.hosp.cat.pvalue2,3)))} \\ \hspace{.2in} 1 & \Sexpr{icu.hosp.cat.n[2,1]} (\Sexpr{100*round(icu.hosp.cat.p[2,1],3)}\%) & \Sexpr{icu.hosp.cat.n[2,2]} (\Sexpr{100*round(icu.hosp.cat.p[2,2],3)}\%) & \Sexpr{icu.hosp.cat.n[2,3]} (\Sexpr{100*round(icu.hosp.cat.p[2,3],3)}\%) & \Sexpr{icu.hosp.cat.n[2,4]} (\Sexpr{100*round(icu.hosp.cat.p[2,4],3)}\%) \\ \hspace{.2in} $ \ge 2$ & \Sexpr{icu.hosp.cat.n[3,1]} (\Sexpr{100*round(icu.hosp.cat.p[3,1],3)}\%) & \Sexpr{icu.hosp.cat.n[3,2]} (\Sexpr{100*round(icu.hosp.cat.p[3,2],3)}\%) & \Sexpr{icu.hosp.cat.n[3,3]} (\Sexpr{100*round(icu.hosp.cat.p[3,3],3)}\%) & \Sexpr{icu.hosp.cat.n[3,4]} (\Sexpr{100*round(icu.hosp.cat.p[3,4],3)}\%) \\ \\ Smoker in Home & \Sexpr{smoke.n[2,1]} (\Sexpr{100*round(smoke.p[1],3)}\%) & \Sexpr{smoke.n[2,2]} (\Sexpr{100*round(smoke.p[2],3)}\%) & \Sexpr{smoke.n[2,3]} (\Sexpr{100*round(smoke.p[3],3)}\%) & \Sexpr{smoke.n[2,4]} (\Sexpr{100*round(smoke.p[4],3)}\%) & \Sexpr{ifelse(smoke.pvalue<0.001,"<0.001",as.character(round(smoke.pvalue,3)))} & \Sexpr{ifelse(smoke.pvalue2<0.001,"<0.001",as.character(round(smoke.pvalue2,3)))} \\ \\ Asthma in Family \\ \hspace{.2in} Mother & \Sexpr{ast.mo.n[2,1]} (\Sexpr{100*round(ast.mo.p[1],3)}\%) & \Sexpr{ast.mo.n[2,2]} (\Sexpr{100*round(ast.mo.p[2],3)}\%) & \Sexpr{ast.mo.n[2,3]} (\Sexpr{100*round(ast.mo.p[3],3)}\%) & \Sexpr{ast.mo.n[2,4]} (\Sexpr{100*round(ast.mo.p[4],3)}\%) & \Sexpr{ifelse(ast.mo.pvalue<0.001,"<0.001",as.character(round(ast.mo.pvalue,3)))} & \Sexpr{ifelse(ast.mo.pvalue2<0.001,"<0.001",as.character(round(ast.mo.pvalue2,3)))} \\ \hspace{.2in} Father & \Sexpr{ast.fa.n[2,1]} (\Sexpr{100*round(ast.fa.p[1],3)}\%) & \Sexpr{ast.fa.n[2,2]} (\Sexpr{100*round(ast.fa.p[2],3)}\%) & \Sexpr{ast.fa.n[2,3]} (\Sexpr{100*round(ast.fa.p[3],3)}\%) & \Sexpr{ast.fa.n[2,4]} (\Sexpr{100*round(ast.fa.p[4],3)}\%) & \Sexpr{ifelse(ast.fa.pvalue<0.001,"<0.001",as.character(round(ast.fa.pvalue,3)))} & \Sexpr{ifelse(ast.fa.pvalue2<0.001,"<0.001",as.character(round(ast.fa.pvalue2,3)))} \\ \hspace{.2in} Siblings & \Sexpr{ast.sib.n[2,1]} (\Sexpr{100*round(ast.sib.p[1],3)}\%) & \Sexpr{ast.sib.n[2,2]} (\Sexpr{100*round(ast.sib.p[2],3)}\%) & \Sexpr{ast.sib.n[2,3]} (\Sexpr{100*round(ast.sib.p[3],3)}\%) & \Sexpr{ast.sib.n[2,4]} (\Sexpr{100*round(ast.sib.p[4],3)}\%) & \Sexpr{ifelse(ast.sib.pvalue<0.001,"<0.001",as.character(round(ast.sib.pvalue,3)))} & \Sexpr{ifelse(ast.sib.pvalue2<0.001,"<0.001",as.character(round(ast.sib.pvalue2,3)))} \\ \\ Allergies in Family \\ \hspace{.2in} Mother & \Sexpr{all.mo.n[2,1]} (\Sexpr{100*round(all.mo.p[1],3)}\%) & \Sexpr{all.mo.n[2,2]} (\Sexpr{100*round(all.mo.p[2],3)}\%) & \Sexpr{all.mo.n[2,3]} (\Sexpr{100*round(all.mo.p[3],3)}\%) & \Sexpr{all.mo.n[2,4]} (\Sexpr{100*round(all.mo.p[4],3)}\%) & \Sexpr{ifelse(all.mo.pvalue<0.001,"<0.001",as.character(round(all.mo.pvalue,3)))} & \Sexpr{ifelse(all.mo.pvalue2<0.001,"<0.001",as.character(round(all.mo.pvalue2,3)))} \\ \hspace{.2in} Father & \Sexpr{all.fa.n[2,1]} (\Sexpr{100*round(all.fa.p[1],3)}\%) & \Sexpr{all.fa.n[2,2]} (\Sexpr{100*round(all.fa.p[2],3)}\%) & \Sexpr{all.fa.n[2,3]} (\Sexpr{100*round(all.fa.p[3],3)}\%) & \Sexpr{all.fa.n[2,4]} (\Sexpr{100*round(all.fa.p[4],3)}\%) & \Sexpr{ifelse(all.fa.pvalue<0.001,"<0.001",as.character(round(all.fa.pvalue,3)))} & \Sexpr{ifelse(all.fa.pvalue2<0.001,"<0.001",as.character(round(all.fa.pvalue2,3)))} \\ \hspace{.2in} Siblings & \Sexpr{all.sib.n[2,1]} (\Sexpr{100*round(all.sib.p[1],3)}\%) & \Sexpr{all.sib.n[2,2]} (\Sexpr{100*round(all.sib.p[2],3)}\%) & \Sexpr{all.sib.n[2,3]} (\Sexpr{100*round(all.sib.p[3],3)}\%) & \Sexpr{all.sib.n[2,4]} (\Sexpr{100*round(all.sib.p[4],3)}\%) & \Sexpr{ifelse(all.sib.pvalue<0.001,"<0.001",as.character(round(all.sib.pvalue,3)))} & \Sexpr{ifelse(all.sib.pvalue2<0.001,"<0.001",as.character(round(all.sib.pvalue2,3)))} \\ \\ Inhaled Steroid Use & \Sexpr{inh.steroid.n[2,1]} (\Sexpr{100*round(inh.steroid.p[1],3)}\%) & \Sexpr{inh.steroid.n[2,2]} (\Sexpr{100*round(inh.steroid.p[2],3)}\%) & \Sexpr{inh.steroid.n[2,3]} (\Sexpr{100*round(inh.steroid.p[3],3)}\%) & \Sexpr{inh.steroid.n[2,4]} (\Sexpr{100*round(inh.steroid.p[4],3)}\%) & \Sexpr{ifelse(inh.steroid.pvalue<0.001,"<0.001",as.character(round(inh.steroid.pvalue,3)))} & \Sexpr{ifelse(inh.steroid.pvalue2<0.001,"<0.001",as.character(round(inh.steroid.pvalue2,3)))} \\ \\ Wheezing (case) & \Sexpr{case.n[1,1]} (\Sexpr{100*round(case.p[1],3)}\%) & \Sexpr{case.n[1,2]} (\Sexpr{100*round(case.p[2],3)}\%) & \Sexpr{case.n[1,3]} (\Sexpr{100*round(case.p[3],3)}\%) & \Sexpr{case.n[1,4]} (\Sexpr{100*round(case.p[4],3)}\%) & \Sexpr{ifelse(case.pvalue<0.001,"<0.001",as.character(round(case.pvalue,3)))} & \Sexpr{ifelse(case.pvalue2<0.001,"<0.001",as.character(round(case.pvalue2,3)))} \\ \\ Positive for other viruses \\ \hspace{.2in} Missing & \Sexpr{rsva.n[3,1]} (\Sexpr{100*round(rsva.n[3,1]/sum(rsva.n[,1]),3)}\%) & \Sexpr{rsva.n[3,2]} (\Sexpr{100*round(rsva.n[3,2]/sum(rsva.n[,2]),3)}\%) & \Sexpr{rsva.n[3,3]} (\Sexpr{100*round(rsva.n[3,1]/sum(rsva.n[,1]),3)}\%) & \Sexpr{rsva.n[3,4]} (\Sexpr{100*round(rsva.n[3,2]/sum(rsva.n[,2]),3)}\%)\\ \hspace{.2in} RSV-A & \Sexpr{rsva.n[2,1]} (\Sexpr{100*round(rsva.p[1],3)}\%) & \Sexpr{rsva.n[2,2]} (\Sexpr{100*round(rsva.p[2],3)}\%) & \Sexpr{rsva.n[2,3]} (\Sexpr{100*round(rsva.p[3],3)}\%) & \Sexpr{rsva.n[2,4]} (\Sexpr{100*round(rsva.p[4],3)}\%) & \Sexpr{ifelse(rsva.pvalue<0.001,"<0.001",as.character(round(rsva.pvalue,3)))} & \Sexpr{ifelse(rsva.pvalue2<0.001,"<0.001",as.character(round(rsva.pvalue2,3)))} \\ \hspace{.2in} RSV-B & \Sexpr{rsvb.n[2,1]} (\Sexpr{100*round(rsvb.p[1],3)}\%) & \Sexpr{rsvb.n[2,2]} (\Sexpr{100*round(rsvb.p[2],3)}\%) & \Sexpr{rsvb.n[2,3]} (\Sexpr{100*round(rsvb.p[3],3)}\%) & \Sexpr{rsvb.n[2,4]} (\Sexpr{100*round(rsvb.p[4],3)}\%) & \Sexpr{ifelse(rsvb.pvalue<0.001,"<0.001",as.character(round(rsvb.pvalue,3)))} & \Sexpr{ifelse(rsvb.pvalue2<0.001,"<0.001",as.character(round(rsvb.pvalue2,3)))} \\ \hspace{.2in} INF-A & \Sexpr{infa.n[2,1]} (\Sexpr{100*round(infa.p[1],3)}\%) & \Sexpr{infa.n[2,2]} (\Sexpr{100*round(infa.p[2],3)}\%) & \Sexpr{infa.n[2,3]} (\Sexpr{100*round(infa.p[3],3)}\%) & \Sexpr{infa.n[2,4]} (\Sexpr{100*round(infa.p[4],3)}\%) & \Sexpr{ifelse(infa.pvalue<0.001,"<0.001",as.character(round(infa.pvalue,3)))} & \Sexpr{ifelse(infa.pvalue2<0.001,"<0.001",as.character(round(infa.pvalue2,3)))} \\ \hspace{.2in} INF-B & \Sexpr{infb.n[2,1]} (\Sexpr{100*round(infb.p[1],3)}\%) & \Sexpr{infb.n[2,2]} (\Sexpr{100*round(infb.p[2],3)}\%) & \Sexpr{infb.n[2,3]} (\Sexpr{100*round(infb.p[3],3)}\%) & \Sexpr{infb.n[2,4]} (\Sexpr{100*round(infb.p[4],3)}\%) & \Sexpr{ifelse(infb.pvalue<0.001,"<0.001",as.character(round(infb.pvalue,3)))} & \Sexpr{ifelse(infb.pvalue2<0.001,"<0.001",as.character(round(infb.pvalue2,3)))} \\ \hspace{.2in} PIV-1 & 0 (0\%) & 0 (0\%) & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-2 & \Sexpr{piv2.n[2,1]} (\Sexpr{100*round(piv2.p[1],3)}\%) & \Sexpr{piv2.n[2,2]} (\Sexpr{100*round(piv2.p[2],3)}\%) & \Sexpr{piv2.n[2,3]} (\Sexpr{100*round(piv2.p[3],3)}\%) & \Sexpr{piv2.n[2,4]} (\Sexpr{100*round(piv2.p[4],3)}\%) & \Sexpr{ifelse(piv2.pvalue<0.001,"<0.001",as.character(round(piv2.pvalue,3)))} & \Sexpr{ifelse(piv2.pvalue2<0.001,"<0.001",as.character(round(piv2.pvalue2,3)))} \\ \hspace{.2in} PIV-3 & \Sexpr{piv3.n[2,1]} (\Sexpr{100*round(piv3.p[1],3)}\%) & \Sexpr{piv3.n[2,2]} (\Sexpr{100*round(piv3.p[2],3)}\%) & \Sexpr{piv3.n[2,3]} (\Sexpr{100*round(piv3.p[3],3)}\%) & \Sexpr{piv3.n[2,4]} (\Sexpr{100*round(piv3.p[4],3)}\%) & \Sexpr{ifelse(piv3.pvalue<0.001,"<0.001",as.character(round(piv3.pvalue,3)))} & \Sexpr{ifelse(piv3.pvalue2<0.001,"<0.001",as.character(round(piv3.pvalue2,3)))} \\ \hspace{.2in} PIV-4A & 0 (0\%) & 0 (0\%) & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} PIV-4B & \Sexpr{piv4b.n[2,1]} (\Sexpr{100*round(piv4b.p[1],3)}\%) & \Sexpr{piv4b.n[2,2]} (\Sexpr{100*round(piv4b.p[2],3)}\%) & \Sexpr{piv4b.n[2,3]} (\Sexpr{100*round(piv4b.p[3],3)}\%) & \Sexpr{piv4b.n[2,4]} (\Sexpr{100*round(piv4b.p[4],3)}\%) & \Sexpr{ifelse(piv4b.pvalue<0.001,"<0.001",as.character(round(piv4b.pvalue,3)))} & \Sexpr{ifelse(piv4b.pvalue2<0.001,"<0.001",as.character(round(piv4b.pvalue2,3)))} \\ \hspace{.2in} HMPV & \Sexpr{hmpv.n[2,1]} (\Sexpr{100*round(hmpv.p[1],3)}\%) & \Sexpr{hmpv.n[2,2]} (\Sexpr{100*round(hmpv.p[2],3)}\%) & \Sexpr{hmpv.n[2,3]} (\Sexpr{100*round(hmpv.p[3],3)}\%) & \Sexpr{hmpv.n[2,4]} (\Sexpr{100*round(hmpv.p[4],3)}\%) & \Sexpr{ifelse(hmpv.pvalue<0.001,"<0.001",as.character(round(hmpv.pvalue,3)))} & \Sexpr{ifelse(hmpv.pvalue2<0.001,"<0.001",as.character(round(hmpv.pvalue2,3)))} \\ \hspace{.2in} ADO-B & \Sexpr{adob.n[2,1]} (\Sexpr{100*round(adob.p[1],3)}\%) & \Sexpr{adob.n[2,2]} (\Sexpr{100*round(adob.p[2],3)}\%) & \Sexpr{adob.n[2,3]} (\Sexpr{100*round(adob.p[3],3)}\%) & \Sexpr{adob.n[2,4]} (\Sexpr{100*round(adob.p[4],3)}\%) & \Sexpr{ifelse(adob.pvalue<0.001,"<0.001",as.character(round(adob.pvalue,3)))} & \Sexpr{ifelse(adob.pvalue2<0.001,"<0.001",as.character(round(adob.pvalue2,3)))} \\ \hspace{.2in} ADO-C & \Sexpr{adoc.n[2,1]} (\Sexpr{100*round(adoc.p[1],3)}\%) & \Sexpr{adoc.n[2,2]} (\Sexpr{100*round(adoc.p[2],3)}\%) & \Sexpr{adoc.n[2,3]} (\Sexpr{100*round(adoc.p[3],3)}\%) & \Sexpr{adoc.n[2,4]} (\Sexpr{100*round(adoc.p[4],3)}\%) & \Sexpr{ifelse(adoc.pvalue<0.001,"<0.001",as.character(round(adoc.pvalue,3)))} & \Sexpr{ifelse(adoc.pvalue2<0.001,"<0.001",as.character(round(adoc.pvalue2,3)))} \\ \hspace{.2in} ADO-E & 0 (0\%) & 0 (0\%) & 0 (0\%) & 0 (0\%) & -- \\ \hspace{.2in} OC43 & \Sexpr{oc43.n[2,1]} (\Sexpr{100*round(oc43.p[1],3)}\%) & \Sexpr{oc43.n[2,2]} (\Sexpr{100*round(oc43.p[2],3)}\%) & \Sexpr{oc43.n[2,3]} (\Sexpr{100*round(oc43.p[3],3)}\%) & \Sexpr{oc43.n[2,4]} (\Sexpr{100*round(oc43.p[4],3)}\%) & \Sexpr{ifelse(oc43.pvalue<0.001,"<0.001",as.character(round(oc43.pvalue,3)))} & \Sexpr{ifelse(oc43.pvalue2<0.001,"<0.001",as.character(round(oc43.pvalue2,3)))} \\ \hspace{.2in} NL63 & \Sexpr{nl63.n[2,1]} (\Sexpr{100*round(nl63.p[1],3)}\%) & \Sexpr{nl63.n[2,2]} (\Sexpr{100*round(nl63.p[2],3)}\%) & \Sexpr{nl63.n[2,3]} (\Sexpr{100*round(nl63.p[3],3)}\%) & \Sexpr{nl63.n[2,4]} (\Sexpr{100*round(nl63.p[4],3)}\%) & \Sexpr{ifelse(nl63.pvalue<0.001,"<0.001",as.character(round(nl63.pvalue,3)))} & \Sexpr{ifelse(nl63.pvalue2<0.001,"<0.001",as.character(round(nl63.pvalue2,3)))} \\ \hspace{.2in} 229E & 0 (0\%) & 0 (0\%) & 0 (0\%) & 0 (0\%) & -- \\ \\ \hline \end{tabular} } \end{table} <>= wheezing<-ifelse(status=="Case",1,0) female<-ifelse(sex=="Male",0,1) bsev.mild.pers<-ifelse(base.severity=="Mild Persistent",1,0) bsev.mod.sev<-ifelse(base.severity=="Moderate"|base.severity=="Severe",1,0) mother.asthma<-ifelse(ast.mo=="Yes",1,0) family.asthma<-ifelse(ast.mo=="Yes"|ast.fa=="Yes"|ast.sib=="Yes",1,0) mod<-glm(wheezing~hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), family="binomial") summary(mod) or<-round(exp(mod$coeff),2) lower.ci<-round(exp(mod$coeff-1.96*summary(mod)$coeff[,2]),2) upper.ci<-round(exp(mod$coeff+1.96*summary(mod)$coeff[,2]),2) p.value<-ifelse(summary(mod)$coeff[,4]<0.001,as.character("<0.001"),as.character(round(summary(mod)$coeff[,4],3))) d.later<-data.frame(id,wheezing,female,bsev.mild.pers,bsev.mod.sev,mother.asthma,family.asthma,age,tot.hosp.cat) save(d.later,file="For-later.Rda") @ \begin{table} \footnotesize \caption{Risk Factors for Wheezing in Argentina} \centering{ \begin{tabular}{lllll} \hline & Odds Ratio & \multicolumn{2}{c}{95\% CI} & p-value \\ \hline \\ \\ Human rhinovirus positive &\Sexpr{or[2]} &\Sexpr{lower.ci[2]} &\Sexpr{upper.ci[2]} &\Sexpr{p.value[2]} \\ \\ Age (years) &\Sexpr{or[3]} &\Sexpr{lower.ci[3]} &\Sexpr{upper.ci[3]} &\Sexpr{p.value[3]} \\ \\ Female &\Sexpr{or[4]} &\Sexpr{lower.ci[4]} &\Sexpr{upper.ci[4]} &\Sexpr{p.value[4]} \\ \\ Baseline Severity \\ \hspace{.2in} Mild Intermittent (reference) & 1 \\ \hspace{.2in} Mild Persistent &\Sexpr{or[5]} &\Sexpr{lower.ci[5]} &\Sexpr{upper.ci[5]} &\Sexpr{p.value[5]} \\ \hspace{.2in} Moderate/Severe &\Sexpr{or[6]} &\Sexpr{lower.ci[6]} &\Sexpr{upper.ci[6]} &\Sexpr{p.value[6]} \\ \\ Family History of Asthma &\Sexpr{or[7]} &\Sexpr{lower.ci[7]} &\Sexpr{upper.ci[7]} &\Sexpr{p.value[7]} \\ \hspace{.2in} Mother with Asthma (given family history of asthma) &\Sexpr{or[8]} &\Sexpr{lower.ci[8]} &\Sexpr{upper.ci[8]} &\Sexpr{p.value[8]} \\ \\ Prior Asthma Hospitalizations \\ \hspace{.2in} 0 (reference) & 1 \\ \hspace{.2in} 1 &\Sexpr{or[9]} &\Sexpr{lower.ci[9]} &\Sexpr{upper.ci[9]} &\Sexpr{p.value[9]} \\ \hspace{.2in} $\ge 2$ &\Sexpr{or[10]} &\Sexpr{lower.ci[10]} &\Sexpr{upper.ci[10]} &\Sexpr{p.value[10]} \\ \\ \\ \hline \end{tabular} } \end{table} <>= titer<-read.csv("Titers.csv") vl<-titer$Titer HRV<-titer$HRV wheeze<-titer$Status vl1<-vl[HRV=="+"] wheeze1<-wheeze[HRV=="+"] vload1<-as.numeric(ifelse(vl1==" ",NA,as.character(vl1))) summary(vload1[wheeze1=="Case"]) summary(vload1[wheeze1=="Control"]) wilcox.test(vload1~wheeze1) @ \clearpage The median (IQR) HRV viral load for cases and controls was \Sexpr{summary(vload1[wheeze1=="Case"])[3]} (\Sexpr{summary(vload1[wheeze1=="Case"])[2]},\Sexpr{summary(vload1[wheeze1=="Case"])[5]}) and \Sexpr{summary(vload1[wheeze1=="Control"])[3]} (\Sexpr{summary(vload1[wheeze1=="Control"])[2]},\Sexpr{summary(vload1[wheeze1=="Control"])[5]}), respectively. (p=\Sexpr{round(wilcox.test(vload1~wheeze1)$p.value,2)}) <>= rm(list=ls()) d<-read.csv("Cytokines for Bryan-cytokines.csv") status1<-d$Status status<-ifelse(status1=="case","Case",as.character(status1)) il6<-d$IL.6..ng.mL. il13<-d$IL.13..pg.mL. il8<-d$IL.8..ng.mL. ifn.gamma<-d$IFNg..ng.mL. il10<-d$IL.10 virus1<-d$Viruses hrv<-ifelse(virus1=="",0,1) p.il6<-wilcox.test(il6~status)$p.value boxplot(il6~status) p.il13<-wilcox.test(il13~status)$p.value boxplot(il13~status) p.il8<-wilcox.test(il8~status)$p.value boxplot(il8~status) p.il10<-wilcox.test(il10~status)$p.value boxplot(il10~status) p.ifngamma<-wilcox.test(ifn.gamma~status)$p.value boxplot(ifn.gamma~status) wilcox.test(il6~hrv) wilcox.test(il13~hrv) wilcox.test(il8~hrv) wilcox.test(il10~hrv) wilcox.test(ifn.gamma~hrv) d<-read.csv("Cytokines for Bryan-IgE.csv") status1<-d$Status status<-ifelse(status1=="case","Case",as.character(status1)) ige.all.pos<-d$No..Allergens.Positive ige.tot.score<-d$Total.Score p.ige.all<-wilcox.test(ige.all.pos~status)$p.value boxplot(ige.all.pos~status) p.ige.tot.score<-wilcox.test(ige.tot.score~status)$p.value boxplot(ige.tot.score~status) hrv1<-d$Viruses hrv<-ifelse(hrv1=="FluB HRV",1, ifelse(hrv1=="HRV",1, ifelse(hrv1==" HRV",1, ifelse(hrv1=="PIV4b, HRV",1, ifelse(hrv1=="RSVA, HRV",1, ifelse(hrv1=="",0, ifelse(hrv1=="Flu A",0,NA))))))) wilcox.test(ige.all.pos~hrv) wilcox.test(ige.tot.score~hrv) @ \bigskip There were no significant differences in cases compared to controls for IL-10 (p=\Sexpr{round(p.il10,2)}), IL-13 (p=\Sexpr{round(p.il13,2)}), IL-6 (p=\Sexpr{round(p.il6,2)}), IL-8 (p=\Sexpr{round(p.il8,2)}), IFN-$\gamma$ (p=\Sexpr{round(p.ifngamma,2)}), the number of allergens positive (p=\Sexpr{round(p.ige.all,2)}), or the \lq\lq total score" (p=\Sexpr{round(p.ige.tot.score,2)}). <>= rm(list=ls()) d<-read.csv("IFN lambda for Bryan-hrv.csv") hrv<-d$HRV y1<-d$OD.Exp.1 y2<-d$OD.Exp.2 arg<-d$argentina status<-d$Status sev1<-d$Severity.Classification sev<-ifelse(is.na(sev1),0,sev1) y3<-ifelse(!is.na(y1),y1, ifelse(!is.na(y2),y2,NA)) y<-ifelse(y3<0,0,y3) ifnl.hrv.case<-summary(y[arg==1&hrv=="+"&status=="Case"]) ifnl.hrv.control<-summary(y[arg==1&hrv=="+"&status=="Control"]) p.ifnl.status<-wilcox.test(y[arg==1&hrv=="+"&status=="Case"],y[arg==1&hrv=="+"&status=="Control"])$p.value ifnl.nhrv.case<-summary(y[arg==1&hrv=="-"&status=="Case"]) summary(y[arg==1&hrv=="+"&status=="Case"]) p.ifnl.hrv<-wilcox.test(y[arg==1&hrv=="+"&status=="Case"],y[arg==1&hrv=="-"&status=="Case"])$p.value ifnl.nhrv.case<-summary(y[arg==1&hrv=="-"&status=="Case"]) ifnl.nhrv.control<-summary(y[arg==1&hrv=="-"&status=="Control"]) p.ifnl.nhrv.status<-wilcox.test(y[arg==1&hrv=="-"&status=="Case"],y[arg==1&hrv=="-"&status=="Control"])$p.value ifnl.hrv.sev0<-summary(y[arg==1&hrv=="+"&sev==0]) ifnl.hrv.sev1<-summary(y[arg==1&hrv=="+"&sev==1]) ifnl.hrv.sev2<-summary(y[arg==1&hrv=="+"&sev==2]) # kruskal.test(y[arg==1&hrv=="+"]~sev[arg==1&hrv=="+"]) p.ifnl.hrv.sev<-cor.test(y[arg==1&hrv=="+"],sev[arg==1&hrv=="+"],method="spearman")$p.value ### This is the better test ### Correlation exists for the negatives also ifnl.nhrv.sev0<-summary(y[arg==1&hrv=="-"&sev==0]) ifnl.nhrv.sev1<-summary(y[arg==1&hrv=="-"&sev==1]) ifnl.nhrv.sev2<-summary(y[arg==1&hrv=="-"&sev==2]) p.ifnl.nhrv.sev<-cor.test(y[arg==1&hrv=="-"],sev[arg==1&hrv=="-"],method="spearman")$p.value y.log<-ifelse(y==0,0,log(y)) mod.ifn<-lm(y.log~hrv+sev,subset=arg==1) mod.ifn1<-lm(y.log~hrv*sev,subset=arg==1&hrv!="Missing") ### Use this one for test of interaction mod.ifn2<-lm(y.log~hrv+factor(sev),subset=arg==1) mod.ifn3<-lm(y.log~hrv*factor(sev),subset=arg==1) #### Now doing it in Baltimore p.balt.hrv<-cor.test(y[arg==0&hrv=="+"],sev[arg==0&hrv=="+"],method="spearman")$p.value stripchart(y[arg==0&hrv=="+"]~sev[arg==0&hrv=="+"],vertical=TRUE,pch=1) boxplot(y[arg==0&hrv=="+"]~sev[arg==0&hrv=="+"]) p.balt.nhrv<-cor.test(y[arg==0&hrv=="-"],sev[arg==0&hrv=="-"],method="spearman")$p.value stripchart(y[arg==0&hrv=="-"]~sev[arg==0&hrv=="-"],vertical=TRUE,pch=1) boxplot(y[arg==0&hrv=="-"]~sev[arg==0&hrv=="-"]) #### Now doing the overall mediation status1<-ifelse(status=="Case",1,0) mod1<-glm(status1~hrv,family="binomial",subset=arg==1&hrv!="Missing") mod2<-glm(hrv~y.log,family="binomial",subset=arg==1&hrv!="Missing") summary(y[hrv=="+"&arg==1]) summary(y[hrv=="-"&arg==1]) wilcox.test(y[hrv=="+"&arg==1],y[hrv=="-"&arg==1]) mod3<-glm(status1~y.log,family="binomial",subset=arg==1&hrv!="Missing") summary(y[status1==1&arg==1]) summary(y[status1==0&arg==1]) wilcox.test(y[status1==1&arg==1],y[status1==0&arg==1]) mod4<-glm(status1~y.log+hrv,family="binomial",subset=arg==1&hrv!="Missing") or1<-round(exp(mod1$coeff[2]),2) low1<-round(exp(mod1$coeff[2]-1.96*summary(mod1)$coeff[2,2]) ,2) up1<-round(exp(mod1$coeff[2]+1.96*summary(mod1)$coeff[2,2]) ,2) pval1<-round(summary(mod1)$coeff[2,4],4) or2<-round(exp(mod4$coeff[3]),2) low2<-round(exp(mod4$coeff[3]-1.96*summary(mod4)$coeff[3,2]) ,2) up2<-round(exp(mod4$coeff[3]+1.96*summary(mod4)$coeff[3,2]) ,2) pval2<-round(summary(mod4)$coeff[3,4],2) hrv.num<-ifelse(hrv=="+",1,ifelse(hrv=="-",0,NA)) d.now<-data.frame(id=d$Patient.ID[arg==1],y.log=y.log[arg==1],y=y[arg==1],status1=status1[arg==1],hrv=hrv[arg==1],hrv.num=hrv.num[arg==1]) load("For-later.Rda") d.next<-merge(d.now,d.later,by="id",all=TRUE) mod5<-glm(status1~y.log+hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), family="binomial",data=d.next,subset=hrv!="Missing") or3<-round(exp(mod5$coeff[3]),2) low3<-round(exp(mod5$coeff[3]-1.96*summary(mod5)$coeff[3,2]) ,2) up3<-round(exp(mod5$coeff[3]+1.96*summary(mod5)$coeff[3,2]) ,2) pval3<-round(summary(mod5)$coeff[3,4],2) mod6<-glm(status1~hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), family="binomial",data=d.next,subset=hrv!="Missing") or4<-round(exp(mod6$coeff[2]),2) low4<-round(exp(mod6$coeff[2]-1.96*summary(mod6)$coeff[2,2]) ,2) up4<-round(exp(mod6$coeff[2]+1.96*summary(mod6)$coeff[2,2]) ,2) pval4<-round(summary(mod6)$coeff[2,4],2) #### Extra stuff for my own edification: mod7<-lm(y.log~status1+hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), family="binomial",data=d.next,subset=hrv!="Missing") summary(mod7) #### Sobel Test (1982) fit1<-lm(status1~hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=d.next,subset=hrv!="Missing") fit1a<-lm(status1~hrv.num+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=d.next,subset=hrv!="Missing") fit2<-lm(status1~hrv+y.log+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=d.next,subset=hrv!="Missing") fit3<-lm(status1~y.log+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=d.next,subset=hrv!="Missing") fit4<-lm(y.log~hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=d.next,subset=hrv!="Missing") fit2$coeff[2]+fit2$coeff[3]*fit4$coeff[2] fit1$coeff[2] fit2$coeff[3]*fit4$coeff[2] d4boot<-d.next[d.next$hrv!="Missing",] Nboot<-10 # 10000 bootstraps used for the one in the manuscript, but it takes a while to run. ts<-NULL for (i in 1:Nboot) { boot<-sample(1:dim(d4boot)[1],dim(d4boot)[1],replace=TRUE) dboot<-d4boot[boot,] fitboot2<-lm(status1~hrv+y.log+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=dboot) fitboot4<-lm(y.log~hrv+age+female+bsev.mild.pers+bsev.mod.sev+family.asthma+mother.asthma+factor(tot.hosp.cat), data=dboot) ts[i]<-fitboot2$coeff[3]*fitboot4$coeff[2] } 2*sum(ts<0)/length(ts) # =0.0008 when using 10000 bootstraps ###### Plot of viral load by IFN lambda titer<-read.csv("Titers.csv") d2<-merge(d,titer,by="Patient.ID",all=TRUE) vl<-d2$Titer HRV<-d2$HRV.x wheeze<-d2$Status.x vl1<-vl[HRV=="+"] wheeze1<-wheeze[HRV=="+"] vload1<-as.numeric(ifelse(vl1==" ",NA,as.character(vl1))) y1<-d2$OD.Exp.1 y2<-d2$OD.Exp.2 arg<-d2$argentina status<-d2$Status sev1<-d2$Severity.Classification sev<-ifelse(is.na(sev1),0,sev1) y3<-ifelse(!is.na(y1),y1, ifelse(!is.na(y2),y2,NA)) y<-ifelse(y3<0,0,y3)[HRV=="+"] y.log<-ifelse(y==0,0,log10(y)) plot(y.log,log10(vload1)) lines(lowess(y.log[!is.na(y.log)&!is.na(vload1)],log10(vload1[!is.na(y.log)&!is.na(vload1)]))) mod1<-lm(log10(vload1)~y.log) summary(mod1) plot(log10(vload1),y.log) lines(lowess(log10(vload1[!is.na(y.log)&!is.na(vload1)]),y.log[!is.na(y.log)&!is.na(vload1)])) mod2<-lm(y.log~log10(vload1)) summary(mod2) @ \bigskip Type III IFN$\lambda$1 was elevated in HRV-positive cases compared with HRV-positive controls (median \Sexpr{round(ifnl.hrv.case[3])} (IQR=\Sexpr{round(ifnl.hrv.case[2])}-\Sexpr{round(ifnl.hrv.case[5])}) vs (median \Sexpr{round(ifnl.hrv.control[3])} (IQR=\Sexpr{round(ifnl.hrv.control[2])}-\Sexpr{round(ifnl.hrv.control[5])}), p=\Sexpr{round(p.ifnl.status,4)}) or HRV-negative cases (median\Sexpr{round(ifnl.nhrv.case[3])} (IQR=\Sexpr{round(ifnl.nhrv.case[2])}-\Sexpr{round(ifnl.nhrv.case[5])}), p=\Sexpr{round(p.ifnl.hrv,4)}). Type III IFN$\lambda$1 was elevated in HRV-negative cases compared with HRV-negative controls (median \Sexpr{round(ifnl.nhrv.case[3])} (IQR=\Sexpr{round(ifnl.nhrv.case[2])}-\Sexpr{round(ifnl.nhrv.case[5])}) vs (median \Sexpr{round(ifnl.nhrv.control[3])} (IQR=\Sexpr{round(ifnl.nhrv.control[2])}-\Sexpr{round(ifnl.nhrv.control[5])}), p=\Sexpr{round(p.ifnl.nhrv.status,4)}). There was a dose-dependent correlation between IFN$\lambda$1 and HRV-associated symptom severity. Patients with mild HRV disease had a median IFN$\lambda$1 of \Sexpr{round(ifnl.hrv.sev0[3])} (IQR=\Sexpr{round(ifnl.hrv.sev0[2])}-\Sexpr{round(ifnl.hrv.sev0[5])}), those with moderate HRV disease severity had a median IFN$\lambda$1 of \Sexpr{round(ifnl.hrv.sev1[3])} (IQR=\Sexpr{round(ifnl.hrv.sev1[2])}-\Sexpr{round(ifnl.hrv.sev1[5])}), and those with severe HRV disease had a median IFN$\lambda$1 of \Sexpr{round(ifnl.hrv.sev2[3])} (IQR=\Sexpr{round(ifnl.hrv.sev2[2])}-\Sexpr{round(ifnl.hrv.sev2[5])}), (p=\Sexpr{round(p.ifnl.hrv.sev,4)}). There was also a correlation between IFN$\lambda$1 and symptom severity for those who were HRV-negative. The median (IQR) for those with mild, moderate, and severe disease was \Sexpr{round(ifnl.nhrv.sev0[3])} (IQR=\Sexpr{round(ifnl.nhrv.sev0[2])}-\Sexpr{round(ifnl.nhrv.sev0[5])}), \Sexpr{round(ifnl.nhrv.sev1[3])} (IQR=\Sexpr{round(ifnl.nhrv.sev1[2])}-\Sexpr{round(ifnl.nhrv.sev1[5])}), and \Sexpr{round(ifnl.nhrv.sev2[3])} (IQR=\Sexpr{round(ifnl.nhrv.sev2[2])}-\Sexpr{round(ifnl.nhrv.sev2[5])}), respectively (p=\Sexpr{round(p.ifnl.nhrv.sev,4)}). There was weak evidence suggesting that the correlation between IFN$\lambda$1 and disease severity was weaker among those who were HRV-negative than among those who were HRV-positive, although this test of interaction was not statistically significant (p=\Sexpr{round(summary(mod.ifn1)$coeff[4,4],2)}). \bigskip Among HRV-positive persons at Baltimore, there was no evidence of correlation between IFN$\lambda$1 and symptom severity for those who were HRV-positive (p=\Sexpr{round(p.balt.hrv,2)}), whereas there was some weak evidence of increased IFN$\lambda$1 among those with more severe disease who were HRV-negative at Baltimore (p=\Sexpr{round(p.balt.nhrv,2)}). \bigskip \bigskip Returning to the data from Argentina: We have seen that those who were HRV-positive were more likely to be wheezers than those who were HRV negative (OR=\Sexpr{or1}; 95\% CI=\Sexpr{low1}-\Sexpr{up1}; p=\Sexpr{pval1}). We also saw that higher levels of IFN$\lambda$1 were associated with both HRV and wheezing. To examine whether IFN$\lambda$1 is the mechanism through which HRV leads to wheezing, we consider the association between HRV and wheezing after adjusting for IFN$\lambda$1. If this association is weakened by including IFN$\lambda$1 and if there are 1) no unmeasured confounding variables for the causal effect of HRV on IFN$\lambda$1, and 2) no unmeasured confounding variables for the causal effect of IFN$\lambda$1 on disease severity, then we can conclude that IFN$\lambda$1 is the mechanism through which HRV leads to wheezing (Cole SR and Hernan MA (2002), Fallibility in estimating direct effects, International Journal of Epidemiology 31: 163-165). After adjusting for IFN$\lambda$1, those who were HRV-positive were no longer more likely to be wheezers than those who were HRV-negative (OR=\Sexpr{or2}; 95\% CI=\Sexpr{low2}-\Sexpr{up2}; p=\Sexpr{pval2}). (Note that the odds ratio is non-significant in the opposite direction.) After adjusting for IFN$\lambda$1 as well as age, gender, baseline severity, family history of asthma, and prior asthma hospitalizations, those who were HRV-positive were still no longer more likely to be wheezers than those who were HRV-negative (OR=\Sexpr{or3}; 95\% CI=\Sexpr{low3}-\Sexpr{up3}; p=\Sexpr{pval3}). (When the same model was fit without IFN$\lambda$1, the adjusted OR was \Sexpr{or4}; 95\% CI=\Sexpr{low4}-\Sexpr{up4}; p=\Sexpr{pval4}.) Therefore, this is evidence supporting the hypothesis that IFN$\lambda$1 is the mechanism through which HRV leads to wheezing. \begin{figure} \caption{IFN-$\lambda$ levels by Viral Load in HRV-infected Children.} \begin{center} <>= plot(log10(vload1),y.log,xlab="Log10 Viral Load",ylab="Log10 IFN-Lambda") lines(lowess(log10(vload1[!is.na(y.log)&!is.na(vload1)]),y.log[!is.na(y.log)&!is.na(vload1)])) text(labels=paste("p=",as.character(round(summary(mod2)$coeff[2,4],2))),x=7.5,y=.25) @ \end{center} \end{figure} <>= #### Now doing by clade rm(list=ls()) d<-read.csv("IFN lambda for Bryan-hrv.csv") dv<-read.table("Template fot Bryan total2.csv",header=TRUE,sep=",") m<-merge(d,dv,by="Patient.ID",all=TRUE) y1<-m$OD.Exp.1 y2<-m$OD.Exp.2 arg<-m$argentina status<-m$Status.x y3<-ifelse(!is.na(y1),y1, ifelse(!is.na(y2),y2,NA)) y<-ifelse(y3<0,0,y3) hrv.clade<-m$HRV.Clade hrv.c<-ifelse(hrv.clade=="C",1, ifelse(hrv.clade=="Unknown",NA,0)) hrv.ab<-ifelse(hrv.clade=="A"|hrv.clade=="B",1, ifelse(hrv.clade=="Unknown",NA,0)) summary(y[hrv.c==1&arg==1]) summary(y[hrv.ab==1&arg==1]) wilcox.test(y[hrv.c==1&arg==1],y[hrv.ab==1&arg==1]) pdf("boxplot-cases-controls.pdf") boxplot(y[arg==1]~hrv.clade[arg==1],ylab="Interferon lambda",xlab="HRV clade") title("Cases and Controls") mtext("Negative",side=1,line=1,at=1) dev.off() summary(y[hrv.c==0&arg==1]) wilcox.test(y[hrv.c==1&arg==1],y[hrv.c==0&arg==1]) summary(y[hrv.c==1&arg==1&status=="Case"]) summary(y[hrv.ab==1&arg==1&status=="Case"]) wilcox.test(y[hrv.c==1&arg==1&status=="Case"],y[hrv.ab==1&arg==1&status=="Case"]) pdf("boxplot-cases.pdf") boxplot(y[arg==1&status=="Case"]~hrv.clade[arg==1&status=="Case"],ylab="Interferon lambda",xlab="HRV clade") mtext("Negative",side=1,line=1,at=1) title("Cases") dev.off() summary(y[hrv.c==0&arg==1&status=="Case"]) wilcox.test(y[hrv.c==1&arg==1&status=="Case"],y[hrv.c==0&arg==1&status=="Case"]) hrv<-m$HRV.x chisq.test(table(hrv[arg==1],status[arg==1])) mod1<-glm(status~hrv,subset=arg==1,family="binomial") mod2<-glm(status~hrv,subset=arg==1&!is.na(y),family="binomial") mod3<-glm(status~hrv+sqrt(y),subset=arg==1&!is.na(y),family="binomial") summary(mod1) summary(mod2) summary(mod3) chisq.test(table(hrv.c[arg==1],status[arg==1])) mod1c<-glm(status~hrv.c,subset=arg==1,family="binomial") mod2c<-glm(status~hrv.c,subset=arg==1&!is.na(y),family="binomial") mod3c<-glm(status~hrv.c+sqrt(y),subset=arg==1&!is.na(y),family="binomial") summary(mod1c) summary(mod2c) summary(mod3c) known.clade<-ifelse(hrv.clade=="A"|hrv.clade=="B"|hrv.clade=="C",1,0) fit1c<-glm(sqrt(y)~hrv.c,subset=arg==1&known.clade==1) fit2c<-glm(status~hrv.c,subset=arg==1&known.clade==1, family="binomial") fit3c<-glm(status~hrv.c+sqrt(y),subset=arg==1&known.clade==1, family="binomial") exp(-fit2c$coeff[2]) exp(-fit2c$coeff[2]-1.96*summary(fit2c)$coeff[2,2]) exp(-fit2c$coeff[2]+1.96*summary(fit2c)$coeff[2,2]) exp(-fit3c$coeff[2]) exp(-fit3c$coeff[2]-1.96*summary(fit3c)$coeff[2,2]) exp(-fit3c$coeff[2]+1.96*summary(fit3c)$coeff[2,2]) #### RSV stuff r<-read.csv("IFN lambda for Bryan-rsv.csv") rsv<-r$RSVA x1<-r$OD.Exp.2 x2<-r$OD.Exp3 rarg<-r$argentina rstatus<-r$Status x3<-ifelse(!is.na(x1),x1, ifelse(!is.na(x2),x2,NA)) x<-ifelse(x3<0,0,x3) summary(x[rarg==1&rsv=="+"&rstatus=="Case"]) wilcox.test(x[rarg==1&rsv=="+"&rstatus=="Case"],y[arg==1&hrv=="+"&status=="Case"]) wilcox.test(x[rarg==1&rsv=="+"&rstatus=="Case"],x[rarg==1&rsv=="+"&rstatus=="Control"]) #### For Figures 4e and 4g (1/17/2011) rm(list=ls()) d1<-read.csv("IFNlambda mRNA in HRV-infected, by wheezing status-severity-fig4e.csv") d2<-read.csv("IFNlambda mRNA in HRV-infected, by wheezing status-severity-fig4g.csv") p.wheeze<-wilcox.test(d1$Wheezing,d1$Non.Wheezing)$p.value ifnl<-c(d2$No.Wheezing,d2$Mild.Wheezing,d2$Moderate.Severe.Wheezing) level<-as.factor(c(rep("none",length(!is.na(d2$No.Wheezing))),rep("mild",length(!is.na(d2$Mild.Wheezing))),rep("sev",length(!is.na(d2$Moderate.Severe.Wheezing))))) p.sev<-kruskal.test(ifnl[!is.na(ifnl)]~level[!is.na(ifnl)])$p.value @ Wheezing children infected with HRV had higher type III IFN-$\lambda_1$ mRNA levels than non-wheezing HRV-infected asthmatic controls (p=\Sexpr{round(p.wheeze,4)}; Fig.4e). \ldots These observations [dose-response relationship] were confirmed by assaying mRNA levels of the antiviral cytokine by real time RT-PCR (p=\Sexpr{round(p.sev,4)}; Fig.4g). \end{document}