Displaying 1 result from an estimated 1 matches for "dslice".
Did you mean:
slice
2008 Aug 02
1
problem with nested loop for regression
...y() to work...
PmatTS<-ts(Pmat)
Preg<-matrix(NA,ncol=maxcol,nrow=2*maxrow)
PmatWt<-matrix(NA, nrow=subdiv,ncol=maxcol)
mult_col<-matrix(1:5, nrow=5, ncol=1)
#rolling calculations...
for (i in (rollstart):maxrow) #test loop - works
{
#extract the relevant timeframe...
dslice<-PmatTS[(i-period):i,] #slicing past 100 days
dslicets<-ts(dslice)
#operating on sliced data...
Pmin<-rollapply(dslicets, wind, by=wind, min, na.rm=F) #getting min
data at per quintile
Pmax<-rollapply(dslicets, wind, by=wind, max, na.rm=F)
Pmult<-Pmin*Pmax...