capm: Companion Animal Population Management
- CRAN: http://cran.r-project.org/web/packages/capm/index.html
- GitHub: https://github.com/oswaldosantos/capm
- http://oswaldosantos.github.io/capm
> library(capm)
> data("psu.ssu")
> data("survey.data")
バージョン: 0.9.1
| 関数名 | 概略 | 
|---|---|
| Calculate2StageSampleSize | Two-stage cluster sampling size and composition | 
| CalculateGlobalSens | Global sensitivity analysis | 
| CalculateLocalSens | Local sensitivity analysis | 
| CalculatePopChange | Population change. | 
| CalculateSimpleSampleSize | Simple random sample size | 
| CalculateStratifiedSampleSize | Stratified random sample size | 
| DesignSurvey | Survey design | 
| GraphicInterface | Graphic interface to use some capm functions | 
| MapkmlPSU | Creates *.kml files of a subset of polygons from a polygon shapefile | 
| PlotGlobalSens | Plot results of GlobalSens function | 
| PlotLocalSens | Plot results of CalculateLocalSens function | 
| PlotModels | Plot results of capm model functions | 
| PlotPopPyramid | Population PlotPopPyramid | 
| SamplePPS | Probability proportional to size sampling with replacement | 
| SampleSystematic | Simple and stratified systematic sampling | 
| SetRanges | Parameter ranges for global sensitivity analysis | 
| SolveIASA | Modelling of immigration, abandonment, sterilization and adoption of companion animals | 
| SolveSI | Modelling of sterilization and immigration of comapnion animals. | 
| SolveTC | Modelling of reversible contraception for companion animals | 
| SummarySurvey | Summary statistics for sample surveys capm-package The capm Package | 
| pilot | Pilot study to calculate sample size and composition | 
| psu.ssu | Primary and secondary sampling frames from Santos, Brazil. | 
| survey.data | Estimates of dog demographic variables | 
DesignSurvey
> DesignSurvey(sample = survey.data, 
+              psu.ssu = psu.ssu,
+              psu.col = 2, 
+              ssu.col = 1, 
+              psu.2cd = 20)
2 - level Cluster Sampling design
With (20, 380) clusters.
svydesign(ids = ~psu.id + ssu.id, fpc = ~pop.size + psu.size, 
    weights = ~weights, data = sample, ...)
pilot
> data("pilot")
> pilot %>% dplyr::glimpse()
Observations: 100
Variables: 2
$ psu  (fctr) 354850005000377, 354850005000377, 354850005000377, 35485...
$ dogs (int) 1, 0, 0, 0, 2, 0, 1, 2, 2, 0, 1, 0, 0, 3, 0, 1, 3, 1, 3, ...
psu.ssu
> data("psu.ssu")
> psu.ssu %>% dplyr::glimpse()
Observations: 652
Variables: 2
$ psu (dbl) 354850005000001, 354850005000002, 354850005000003, 3548500...
$ ssu (int) 119, 43, 79, 129, 53, 46, 176, 281, 409, 317, 238, 120, 11...
survey.data
> data("survey.data")
> survey.data %>% dplyr::glimpse()
Observations: 469
Variables: 16
$ interview_id            (int) 1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10...
$ psu                     (dbl) 354850005000114, 354850005000114, 3548...
$ dogs                    (dbl) 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,...
$ sex                     (fctr) Male, Female, Female, Male, Female, F...
$ age                     (int) 9, 1, 7, 11, 13, 3, 8, NA, 7, 0, 4, 2,...
$ sterilized              (fctr) yes, no, yes, no, no, no, no, NA, no,...
$ sterilized.ly           (fctr) yes, no, no, no, no, no, no, NA, no, ...
$ births                  (dbl) 0, 0, 0, 0, 0, 0, 0, NA, 0, 0, 0, 0, N...
$ present                 (fctr) yes, yes, yes, yes, yes, yes, yes, NA...
$ fate                    (fctr) in_home, in_home, in_home, in_home, i...
$ acquired                (fctr) bought, bought, bought, born_in_home,...
$ outside                 (fctr) no, no, no, no, yes, no, no, NA, no, ...
$ acquired.ly             (fctr) no, yes, yes, no, no, yes, no, NA, ye...
$ immigrant               (fctr) yes, yes, yes, no, yes, no, no, NA, n...
$ immigrant.ly            (fctr) no, yes, yes, no, no, no, no, NA, no,...
$ immigrant.sterilized.ly (fctr) no, no, no, no, no, no, no, NA, no, n...