search for: nlag

Displaying 5 results from an estimated 5 matches for "nlag".

Did you mean: flag
2006 Jan 06
2
panel data unit root tests
...1 ... id=(N=20)---T=21---variable1 Thus, a good test case. For first id I was considering something like this: lag <- as.integer(lags) lags.p <- lags + 1 id <- unique(group) id.l <- length(id) y.l <- length(y) yid.l <- length(y)/id.l if (lag > yid.l -2) stop("\nlag too long for defined cross-sections.\n") #for (i in id) { lagy <- y[2:yid.l] lagy.em <- embed(lagy, lags) id.l <- length(id) dy <- diff(y)[1:yid.l-1] dy.em <- embed(dy, lags) # } print(levinlin(ws, year, id, lags = 3)) Couldn't figure the loop over un...
2005 Aug 14
1
Panel data handling (lags, growth rates)
...vious posting on this subject, Gabor showed me that my code: # Blast this function for all the values that A$person takes -- new <- NULL for (f in levels(A$person)) { new <- rbind(new, make.additional.variables(subset(A, A$person==f), nlags=2, Q=1)) } A <- new; rm(new) can be replaced by one do.call() (as used above). It's awesome, but I don't understand it! :-) Could someone please explain how and why this works? I know by() and I see that when I do by(A,A$x), it gives me a list containing as many entries as are levels o...
2019 Jun 04
0
tsdiag should pass the fitdf parameter to Box.test
...se that lag > fitdf. This implies that we should pass the `fitdf' parameter when applying `Box.test' to residuals. When checking the source code for `getS3method("tsdiag", "Arima?)?, however, I noticed that it didn?t pass this parameter. The relevant line is `for (i in 1L:nlag) pval[i] <- Box.test(rs, i, type = "Ljung-Box")$p.value?. I suppose this could be fixed by passing an additional `fitdf = sum(object$arma[1:4])?. See also this thread on Cross Validated: https://stats.stackexchange.com/questions/411432/significance-of-the-parameter-fitdf-in-box-test
2009 Sep 17
0
geoR, variofit
...n locations <- cbind(wl1$X,wl1$Y) extent <- max(dist(locations)) max.dist <- extent/2 data1 <- cbind(wl1$X,wl1$Y,wl1$PSI*1000) geodata1 <- as.geodata(data1, coords.col = 1:2, data.col = 3) # Calculate the sample variogram vario_var1 <- variog(geodata1, uvec = nlags, trend = trend, option = "bin", estimator.type = "modulus", max.dist = max.dist, pairs.min = 10., direction = "omnidirectional", messages = TRUE) # Fit a model variofit_var1 <- variofi...
2008 Apr 04
1
Problems with Unit Root testing using ur.df function
...quot;trend"), lags = 1) { if (ncol(as.matrix(y)) > 1) stop("\ny is not a vector or univariate time series.\n") if (any(is.na(y))) stop("\nNAs in y.\n") y <- as.vector(y) lag <- as.integer(lags) if (lag < 0) stop("\nLags must be set to an non negative integer value.\n") CALL <- match.call() DNAME <- deparse(substitute(y)) type <- type[1] x.name <- deparse(substitute(y)) lags <- lags + 1 z <- diff(y) n <- length(z) x <- embed(z, lags) z.diff <- x[,...