Displaying 9 results from an estimated 9 matches for "fpc1".
Did you mean:
fc1
2008 Sep 12
2
Fw: Complex sampling survey _ Use of survey package
...umley" <tlumley at u.washington.edu>
Subject: Re: [R] Complex sampling survey _ Use of survey package
> Thanks for your answer
>
> I think I made a mistake when I recopied the 5 first rows of my database
>
> here is the table with the comlums of interest
>
> num esp fpc1 Totanim Id_An
> 2045 G 551 12 10
> 2046 C 551 68 11
> 2070 G 551 9 50
> 2070 S 551 9 51
> 2070 S 551 9 52
>
>
>
> yes Totanim is the total number of animals in the farm and num is the
> total number of herds
>
> I keep on obtaining this error message
>
> c...
2008 Sep 11
1
Complex sampling survey _ Use of survey package
...erstand how I'm supposed to use svydesign caracteristics to explain to R that my sampling design is the following one
Data base = tab1 here are the five first rows of the database (nrow = 11792)
num
esp
Quarters
Totcat
Totshp
Totgt
Tbtpos
fpc1
Totanim
Id_An
10
2045
G
01-Q1
0
0
12
1
551
10
10
11
2046
G
01-Q1
8
0
60
1
551
11
11
50
2070
G
01-Q1
0
3
6...
2005 Oct 09
1
enter a survey design in survey2.9
...is divised in two regions / Urbain and rural. this are strata
in Rural : PSU are subdivision , SSU are EA and TSU are households
in Urban : PSU are EA , SSU are households.
I use svydesign function as follow :
esi<-svydesign(id=~subdiv+EA+HHID,strata=~REGION+AREATYP,fpc=~FPC1+FPC2FPC3,weig=~pw,nest=T)
FPC1: number of subdivision in each strata
FPC2: number of EA in each subdivision
FPC3: number of HH in each EA.
pw : sampling weights
but I have this error message : erron in data.frame(strata, 1:i,...) I dont understand why !
Can someone help me ?
Sincerly....
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
2012 Oct 03
2
Creating tiff with 1200 dpi
...6c.tif", :
opening device failed
I've tried the same thing with jpeg, and still get the same error. I've
tried Cario, but I get an error that tiff bitmap is not supported.
Any help would be appreciated. Here is my code.
#Creating dataframes
new.data2<-expand.grid(FCOND=23.5, FPC1=-0.68, MCOND=22.4, MPC1=-0.82,
RANK=c(6:15))
new.data3<-expand.grid(FOCND=39.1, FPC1=0.46, MCOND=7.4, MPC1=1.3,
RANK=c(4:16))
x2<-data.frame(mod.avg.pred=c(0.28, 0.26, 0.24, 0.23, 0.22, 0.21, 0.20,
0.19, 0.19, 0.18),
uncond.se=c(0.17, 0.15, 0.14, 0.14, 0.15, 0.16, 0.18, 0.19, 0.20, 0.21))
x3&...
2012 Oct 18
3
svyplot and svysmooth with hexbin
...something to do with Lattice graphics, but for the life of me I can not figure out how. Dr. Lumley in his excellent book on page 118 mentions that there is code on his website to do this, but I can not find it.
So for example:
library(survey)
data(api)
dclus2<-svydesign(id=~dnum+snum, fpc=~fpc1+fpc2, data=apiclus2)
svyplot(api00~api99, dclus2)
s1 <-svysmooth(api00~api99, dclus2)
lines(s1)
#works
svyplot(api00~api99, dclus2, style="grayhex")
lines(s1)
#does not work (line either appears in the wrong position in RGui or crashes RStudio).
VR
James
James T. Durant, MSPH...
2011 Mar 07
1
Risk differences with survey package
I'm trying to use the survey package to calculate a risk difference with
confidence interval for binge drinking between sexes. Variables are
X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group
prevalences easily enough with
result <- svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm = TRUE)
and then extract components from the svyby object with SE() and coef() to
do the
2016 Apr 30
0
Unexpected scores from weighted PCA with svyprcomp()
...equire(survey))
covariance.matrix <- svyvar(formula, design)
variables <- diag(covariance.matrix)
correlation.matrix <- covariance.matrix / sqrt(variables %*%
t(variables))
return(correlation.matrix)
}
library(survey)
data(api)
dclus2 <- svydesign(ids = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data =
apiclus2)
pc <- svyprcomp( ~ api99 + api00, design = dclus2, scale = TRUE, scores
= TRUE)
dclus2$variables$pc1 <- pc$x[, "PC1"]
dclus2$variables$pc2 <- predict(pc, apiclus2)[, "PC1"]
mycoef <- pc$rotation[, "PC1"] / pc$scale
dclus2$variables$...