Description Usage Arguments Value Examples
AK estimation on array of month in sample estimates
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Y |
an array of named dimensions with 3 dimensions: 1 for the month, 1 for the month in sample, 1 for the variable name |
month |
: name of the month dimension (by default the name of the first dimension of Y names(dimnames(dim(Y)))[1]) |
group |
: name of the group dimenstion of Y (by default the name of the second dimension of Y names(dimnames(dim(Y)))[2]) |
S |
a vector of integers, subvector of 1:ngroup, to be passed to W.ak, indicating the rotation group numbers this month that were present the previous months (for CPS, c(2:4,6:8)) |
a |
a numeric value |
k |
a numeric value |
eta0 |
a numeric value to be passed to W.ak |
eta1 |
a numeric value to be passed to W.ak |
an array
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(dataCPS)
period=200501:200512
list.tables<-lapply(data(list=paste0("cps",period),package="dataCPS"),get);
names(list.tables)<-period
Y<-WSrg(list.tables,weight="pwsswgt",list.y="pemlr",rg="hrmis")
dimnames(Y);
month="m";
group="mis";
variable="y";
A=W.ak(months = dimnames(Y)[[month]],
groups = dimnames(Y)[[group]],
S=c(2:4,6:8),
a=.5,
k=.5,
eta0=4/3,
eta1=1/3)
ngroup=dim(Y)[group];
eta1=eta0-1;
eta0=ngroup/length(S)
AK_est(Y=Y,
month="m",
group="mis",
S=c(2:4,6:8),
a=.5,
k=.6,
eta0=eta0,
eta1=eta0-1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.