`weights.survey.design.Rd`

Extract weights from a survey design object.

- object
Survey design object

- type
Type of weights:

`"analysis"`

combines sampling and replication weights.- final
If

`FALSE`

return a data frame with sampling weights at each stage of sampling.- ...
Other arguments ignored

vector or matrix of weights

```
data(scd)
scddes<-svydesign(data=scd, prob=~1, id=~ambulance, strata=~ESA,
nest=TRUE, fpc=rep(5,6))
repweights<-2*cbind(c(1,0,1,0,1,0), c(1,0,0,1,0,1), c(0,1,1,0,0,1), c(0,1,0,1,1,0))
scdrep<-svrepdesign(data=scd, type="BRR", repweights=repweights)
#> Warning: No sampling weights provided: equal probability assumed
weights(scdrep)
#> [,1] [,2] [,3] [,4]
#> [1,] 2 2 0 0
#> [2,] 0 0 2 2
#> [3,] 2 0 2 0
#> [4,] 0 2 0 2
#> [5,] 2 0 0 2
#> [6,] 0 2 2 0
weights(scdrep, type="sampling")
#> [1] 1 1 1 1 1 1
weights(scdrep, type="analysis")
#> [,1] [,2] [,3] [,4]
#> [1,] 2 2 0 0
#> [2,] 0 0 2 2
#> [3,] 2 0 2 0
#> [4,] 0 2 0 2
#> [5,] 2 0 0 2
#> [6,] 0 2 2 0
weights(scddes)
#> [1] 1 1 1 1 1 1
```