You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just saw this issue after reading your comment. collapse::fdiff(x, g = group, t = time, rho = param) deals with this if the time index is integer. Otherwise, you can use collapse::timeid(time), which creates integer steps from any numeric vector based on the greatest common divisor.
library(collapse)
head(D(wlddev[-3, ], by=~iso3c, t=~year))
#> iso3c year D1.decade D1.PCGDP D1.LIFEEX D1.GINI D1.ODA D1.POP#> 1 AFG 1960 NA NA NA NA NA NA#> 2 AFG 1961 0 NA 0.516 NA 115310005 172437#> 4 AFG 1963 NA NA NA NA NA NA#> 5 AFG 1964 0 NA 0.492 NA 58200012 201576#> 6 AFG 1965 0 NA 0.485 NA 45919983 211539#> 7 AFG 1966 0 NA 0.482 NA -30230011 218516
head(with(wlddev[-3, ], fdiff(LIFEEX, 1, 1, iso3c, year)))
#> [1] NA 0.516 NA 0.492 0.485 0.482
Check, how data gaps in the time index within a group could be dealt with.
The text was updated successfully, but these errors were encountered: