search for: lag0

Displaying 2 results from an estimated 2 matches for "lag0".

Did you mean: lag
2004 Feb 20
0
setting options when using eval
...rasts=c("contr.sum", "contr.poly")) in the correct environment so that I don't need my hack. Some insights to what in the enviroments are in the context of eval would also be most helpful. here is the version of the lm parameters that does what I want. model next.choice ~ Lag0 , data = the.matrix, contrasts =list( Lag0 =contr.sum ) I don't want to have to add the last parameter contrasts =list( Lag0 =contr.sum ) if possible. Lag0 is a factor with 4 levels 0,1,2,3 the following is the function that I call to evaluate models the.model <- function(the.matrix, m...
2023 Jan 16
1
(no subject)
...how to create the lag variable for my data. # Load data and create time series object ---- oil <- read_xlsx("crudefinal.xlsx") pricet=ts(oil$price, start = c(2020, 22), frequency = 365) roilt=ts(diff(log(oil$price))*100,start=c(2020,22),freq=365) # Fit MSW model ---- roilt.lag0 = window(roilt,start=c(2020,23),end=c(2021,215),freq=365) # get al the lags right roilt.lag1 = window(roilt,start=c(2020,22),end=c(2021,214),freq=365) roilt.lag2 = window(roilt,start=c(2020,20),end=c(2021,213),freq=365) roilt.lag3 = window(roilt,start=c(2020,20),end=c(2021,212),freq=365) roilt....