Lines Matching +refs:is +refs:pconsecutive +refs:pdata +refs:frame

3 \name{make.pconsecutive}
4 \alias{make.pconsecutive}
5 \alias{make.pconsecutive.data.frame}
6 \alias{make.pconsecutive.pdata.frame}
7 \alias{make.pconsecutive.pseries}
10 make.pconsecutive(x, ...)
12 \method{make.pconsecutive}{data.frame}(x, balanced = FALSE, index = NULL, ...)
14 \method{make.pconsecutive}{pdata.frame}(x, balanced = FALSE, ...)
16 \method{make.pconsecutive}{pseries}(x, balanced = FALSE, ...)
19 \item{x}{an object of class \code{pdata.frame}, \code{data.frame},
27 \item{index}{only relevant for \code{data.frame} interface; if
28 \code{NULL}, the first two columns of the data.frame are
32 further details see \code{\link[=pdata.frame]{pdata.frame()}},}
36 pdata.frame, data.frame or a pseries which is made
45 (p)data.frame and pseries objects are made consecutive, meaning their time
47 dimension is interpreted to be numeric, and the data are extended to a
50 t+2, \ldots{} where t is an integer). Non--index variables are filled with
60 Looking at the number of rows of the resulting (pdata.frame) (elements for
61 pseries), this results in nrow(make.pconsecutive, balanced = FALSE) <=
62 nrow(make.pconsecutive, balanced = TRUE). For making the data only
68 data are made consecutive. In this case, it is not clear which individual or
69 time period is meant by the missing value(s). Especially, this means: If
73 series is taken to be the min and max (w/o \code{NA} values) of the original
76 before applying make.pconsecutive, and especially check for \code{NA} values
87 is.pconsecutive(Grunfeld_missing_period) # check for consecutiveness
88 make.pconsecutive(Grunfeld_missing_period) # make it consecutiveness
97 all(is.pconsecutive(Grunfeld_unbalanced)) # FALSE
100 g_consec_bal <- make.pconsecutive(Grunfeld_unbalanced, balanced = TRUE)
101 all(is.pconsecutive(g_consec_bal)) # TRUE
106 g_consec <- make.pconsecutive(Grunfeld_unbalanced) # default: balanced = FALSE
107 all(is.pconsecutive(g_consec)) # TRUE
110 head(g_consec) # 1st individual: years 1935, 1936 dropped, 1939 is NA
116 g_NA <- make.pconsecutive(Grunfeld_NA)
117 head(g_NA) # 1936 is begin for 1st individual, 1937: NA for non-index vars
118 nrow(g_NA) # 199, year 1935 from original data is dropped
121 # pdata.frame interface
122 pGrunfeld_missing_period <- pdata.frame(Grunfeld_missing_period)
123 make.pconsecutive(Grunfeld_missing_period)
127 make.pconsecutive(pGrunfeld_missing_period$inv)
132 all(is.pconsecutive(g_bal)) # FALSE
138 \code{\link[=is.pconsecutive]{is.pconsecutive()}} to check if data are
142 the dimensions of a 'pdata.frame' (and other objects),
144 of a 'pdata.frame' (and other objects), \code{\link[=lag]{lag()}} for
146 \code{\link[=pseries]{pseries()}}, \code{\link[=data.frame]{data.frame()}},
147 \code{\link[=pdata.frame]{pdata.frame()}}.