Hello everybody

 

I don't understand 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
     1
     551
     50
     50
     
      51
     2070
     S
        01-Q1      
     0
     3
     6
     1
     551
     51
     51
     
      52
     2070
     S
     01-Q1      
     0
     3
     6
     1
     551
     52
     52
     

 

 

 

- First strata = herds 

 herd's id column = num 

 sampled in 551 herds (column fpc1)

 

- Second strata = animals 

animal id column= Id_An 

sampled in Totanim 

 

I tried : 

clustot <- svydesign (id=~num+Id_An, fpc=~fpc1+~Totanim, data=tab1) 

 

and I get this error message

 

> clustot <- svydesign(id=~num+Id_An, fpc=~fpc1+~Totanim, data=tab1)

Erreur dans as.fpc(fpc, strata, ids) : 

  FPC implies >100% sampling in some strata.



I don't have any strata with 100% sampling so do you know which arguments of the fonction svydesign I'm supposed to use ?



Thanks in advance



AHOUSSOU Sylvie
Vétérinaire Epidémiologiste
CIRAD Domaine Duclos
97 170 Petit-Bourg
tel : 05 90 25 59 47
	[[alternative HTML version deleted]]

