Displaying 2 results from an estimated 2 matches for "stratn".
Did you mean:
strain
2008 Mar 07
0
How to do a time-stratified case-crossover analysis for air pollution data?
...date1<-as.Date(startdate)
dates<-date1 + (ti-1)
tyda<-weekdays(dates)
tymo<-months(dates)
tyyear<-as.character(dates)
for (i in 1:n)
{
ask<-tyyear[i]
tyyear[i]<-substr(ask,1,4)
}
#replicate cases
air<-data.frame(mi, tyda, tymo, tyyear, pm10, dates)
air$stratn<-as.numeric(strata(air$tyda, air$tymo,air$tyyear))
lest<-unique(air$stratn)
air$nctrl<-0
airbase<-air
#find the number of controls whithin each stratum
for (i in 1:length(lest))
{
a<-which(air$stratn==lest[i])
for (j in 1:length(a))
{
air$nctrl[a[j]]<...
2008 Mar 07
0
How to do a time-stratified case-crossover analysis for air pollution data? Unformatted text-version, with an additional note
...e),lambda=rate)
date1<-as.Date(startdate)
dates<-date1 + (ti-1)
tyda<-weekdays(dates)
tymo<-months(dates)
tyyear<-as.character(dates)
for (i in 1:n)
{
? ask<-tyyear[i]
? tyyear[i]<-substr(ask,1,4)
}
#replicate cases
air<-data.frame(mi, tyda, tymo, tyyear, pm10, dates)
air$stratn<-as.numeric(strata(air$tyda, air$tymo,air$tyyear))
lest<-unique(air$stratn)
air$nctrl<-0
airbase<-air
#find the number of controls whithin each stratum
for (i in 1:length(lest))
{
?? a<-which(air$stratn==lest[i])
?? for (j in 1:length(a))
?? {
????? air$nctrl[a[j]]<-sum(air$mi[a...