Displaying 4 results from an estimated 4 matches for "regcalibr".
Did you mean:
excalibr
2007 Nov 24
1
question regarding an error message from survey package
...lt;-c('m','f','m')
> b<-c(1:3)
> st<-c(1:3)
> data.frame(a,b,st)
a b st
1 m 1 1
2 f 2 2
3 m 3 3
> data.frame(a,b,st)->l
> p<-svydesign(ids=~1, data=l)
> pop<-c('(intercept)'=100, st1=10,st2=20)
> calibrate(p,~st, pop)
Error in regcalibrate.survey.design2(design, formula, population, aggregate.stage = aggregate.stage, :
Population and sample totals are not the same length.
Thank you and have a great day!
---------------------------------
[[alternative HTML version deleted]]
2009 Jan 11
1
calibrate function
Hi all,
I have a question on the package « survey”
I have some difficulties to use the function ‘calibrate’. Although it works
well with one single factor variable, I cannot use it for 2 and get the
message
“Erreur dans regcalibrate.survey.design2(design, formula, population,
aggregate.stage = aggregate.stage, : Population and sample totals are not
the same length.”
Here is the format I use as a data.frame:
ecodiaMG[1:10, 71:73]
age_cl1 sexe1 region1
1 MG_54 MG_H MG_NE
2 MG_54 MG_H MG_NE
3 M...
2006 Jul 07
2
Multistage Sampling
...s a different one. Since I calculated the Taylor Series solution, i
suppose there must be another approach? The calibration help page tells
me to enter a list of population total vectors for each cluster, which
would result in:
dmulti3.cal <- calibrate(dmulti3, ~1, pop=c(100,50,75))
Error in regcalibrate.survey.design2(design, formula, population,
aggregate.stage = aggregate.stage, :
Population and sample totals are not the same length.
I am very grateful for your help and wish you alle the best
Yours
mark
2013 Oct 10
0
Using calibrate for raking (survey package)
...data = emp.dat)
rake.svy <- rake(emp.svy, list(~Gender, ~Age), list(pop.gender, pop.age))
cal.svy <- calibrate(emp.svy,
formula = list(~Gender, ~Age),
population = list(pop.gender, pop.age), cal.fun =
"raking")
# Warning message:
# In regcalibrate.survey.design2(design, formula, population,
aggregate.stage # = aggregate.stage, :Sample and population totals have
different names.
# check weights--M and F seem reversed when "calibrate" used
library(reshape2)
check1 <- with(rake.svy, cbind(variables, weight = 1/prob))
dcast(che...