Skip to contents

Simulated household survey data for the rural area of Ipixuna (Para state, Brazil), used to illustrate spatial item factor analysis. Ten binary items, a household-level `wealth` covariate, and spatial coordinates are simulated for each household so that they reproduce the spatial multidimensional item response structure described in the SPIFA paper (Chacón-Montalván, E. A., Giorgi, E. and Taylor, B.). The data is provided as an `sf` object, already in the format [spifa()] requires.

Format

An `sf` tibble with one row per household (100 rows) and columns:

id

Household identifier.

wealth

A simulated household-level covariate.

items

A 100x10 binary (0/1) matrix of responses to the food insecurity items.

geometry

An `sfc_POINT` geometry column with the household's spatial coordinates (longitude/latitude), concentrated towards the town centre.

It has an attribute `"parameters"` holding the true generating parameters used in the simulation (`easiness`, `discrimination`, `abilities` (the true latent factor scores, useful for checking recovery), `effect`, `resid_params` (list with `sd` and `corr`, the residual covariance of the latent factors), `mgp_params` (list with `sd` and `phi`, the spatial Gaussian process hyperparameters)), which is convenient for specifying sensible restrictions and checking recovery of the model in examples and tests.

Source

Simulated; see `data-raw/ipixuna.R` for the generating code and `attr(ipixuna, "parameters")` for the generating values.

Examples

data(ipixuna)
head(dplyr::select(ipixuna, -geometry, -items))
#> Simple feature collection with 6 features and 2 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -71.69689 ymin: -7.053396 xmax: -71.68464 ymax: -7.039144
#> Geodetic CRS:  WGS 84
#>   id      wealth                    geometry
#> 1  1 -0.57212306 POINT (-71.69689 -7.052244)
#> 2  2 -0.92003870 POINT (-71.68695 -7.039144)
#> 3  3  1.23197630 POINT (-71.68732 -7.047609)
#> 4  4  0.30801774 POINT (-71.69005 -7.047915)
#> 5  5 -0.06247617 POINT (-71.68464 -7.053396)
#> 6  6  2.05414943 POINT (-71.69039 -7.042424)
attr(ipixuna, "parameters")
#> $easiness
#>  [1] -0.68 -0.51 -0.34 -0.17  0.00  0.17  0.34  0.51  0.68  0.85
#> 
#> $discrimination
#>            [,1]      [,2]       [,3]
#>  [1,] 0.7710143 1.4157676 -0.6627994
#>  [2,] 0.6514647 0.8364208 -0.9059919
#>  [3,] 0.5964618 0.8002601 -0.7571054
#>  [4,] 0.0000000 0.0000000 -0.7796418
#>  [5,] 1.2853150 0.0000000  0.0000000
#>  [6,] 1.2939590 0.0000000  0.0000000
#>  [7,] 0.8592413 0.0000000 -0.8146235
#>  [8,] 0.0000000 0.0000000 -1.2927663
#>  [9,] 0.8178851 0.5583285 -1.0271718
#> [10,] 1.0611414 0.0000000 -1.0957406
#> 
#> $abilities
#>                [,1]        [,2]         [,3]
#>   [1,]  1.413937686 -0.58630664 -0.099680412
#>   [2,]  0.825838022 -0.21059611  0.137576011
#>   [3,] -1.613061355  2.14781644 -1.243780538
#>   [4,] -0.909450634 -0.77918567  1.625438500
#>   [5,]  0.844097357  0.59970303 -0.323414313
#>   [6,] -2.173470537  2.57771735  1.994219323
#>   [7,] -0.988924572  2.45060279  1.987676155
#>   [8,] -0.494843192  0.59132100 -0.320485344
#>   [9,] -1.902606808 -0.30671683  3.176979588
#>  [10,] -0.360730328 -0.26273279 -0.466240900
#>  [11,]  1.967469500  0.38917856 -0.118396784
#>  [12,]  0.421618650 -1.76187566  1.971123718
#>  [13,]  0.332748862 -0.07098196 -0.062163121
#>  [14,] -2.283288977  0.57391384  0.715845686
#>  [15,]  0.043860268 -2.51772905 -0.190498289
#>  [16,] -1.228577498  0.90843476  0.692119242
#>  [17,] -0.771693279  0.21622179 -1.141685834
#>  [18,]  1.616756579 -0.26885817 -0.312126825
#>  [19,] -0.174411654  1.91846090  1.561171689
#>  [20,] -0.091206637 -0.17156453 -0.008979438
#>  [21,] -1.984407478  2.05220590  1.369499102
#>  [22,] -2.034301799  0.32382785 -0.015490794
#>  [23,] -0.957084021  0.45090802  0.485592007
#>  [24,] -0.836882975  0.62433677  1.403573107
#>  [25,] -0.235888098 -0.30238993  1.249903906
#>  [26,]  0.044055223  0.84153054  0.614536665
#>  [27,] -0.072975283 -0.67719460 -0.989601582
#>  [28,]  2.420591416  0.33460738  0.680392412
#>  [29,]  0.779507146 -0.01234442 -2.227501501
#>  [30,] -2.558946613  0.93491846  0.308082274
#>  [31,] -1.191976792  0.77346318  1.050358462
#>  [32,]  0.505425850 -0.13646312  0.167258074
#>  [33,]  0.947986823 -0.76638061 -0.605123260
#>  [34,] -1.563727823  2.26745363  0.036681509
#>  [35,]  0.338358346 -1.41609014 -0.793270495
#>  [36,]  0.801990550 -0.44738631  1.106656379
#>  [37,] -0.985468744  0.99900889  0.396691336
#>  [38,]  1.102751075 -0.64574353 -0.961350233
#>  [39,]  0.702186217 -0.30465745  0.095445680
#>  [40,]  0.663920882  0.27600212  0.407843523
#>  [41,]  0.627803093  0.02411670 -0.622977623
#>  [42,] -0.331617656 -0.34851372 -0.198818159
#>  [43,]  0.729089158  0.83461336  0.940577091
#>  [44,]  0.388600873 -0.73525184 -1.678718792
#>  [45,] -1.017943927  0.23195958  0.564862600
#>  [46,] -0.516638907  0.87213290  1.159091282
#>  [47,] -1.154145062  2.22516373  1.860037779
#>  [48,] -0.234474259  1.14827578 -0.318132649
#>  [49,] -0.186013414  2.34935103 -0.392492801
#>  [50,] -0.562896081  1.79438231 -0.808784683
#>  [51,] -0.368482133 -0.11881173 -0.184340598
#>  [52,]  1.489123975 -2.33735910  0.699117379
#>  [53,] -0.052130778  0.25588417  0.071721244
#>  [54,] -0.019499361 -0.40603183  1.174548212
#>  [55,] -0.393761128  0.20454726  0.289681210
#>  [56,]  0.614305694 -0.74571834  0.410975107
#>  [57,]  2.250432473 -0.02550603 -0.729580515
#>  [58,]  0.035283471 -0.84799443 -0.819100036
#>  [59,] -1.339325999  1.45521555  1.233771607
#>  [60,] -0.518471854  2.33241486  0.083248958
#>  [61,]  0.750815158 -0.79875157  0.205978616
#>  [62,] -0.267665676  0.50603271  1.095057859
#>  [63,]  1.356065817 -0.87680234 -0.885404723
#>  [64,] -0.791093903 -0.98957530  0.740405441
#>  [65,]  0.812668704 -0.80362833  0.943549050
#>  [66,]  0.440684694 -0.42080421  0.113016472
#>  [67,]  0.420529536 -2.01342919  0.534553278
#>  [68,] -0.508242237 -0.62049188  0.329240871
#>  [69,] -0.286478751  0.03845402  0.537745189
#>  [70,]  0.673381143 -1.22438103 -0.764710970
#>  [71,] -0.525773296  0.39415276  0.580757280
#>  [72,] -1.294128605 -0.28837051 -1.397742986
#>  [73,]  0.905226220 -0.61760218 -0.775381535
#>  [74,] -0.414610645  0.68992586 -0.831918592
#>  [75,] -0.585447124  1.03238136 -0.916838740
#>  [76,]  1.633428370 -0.31050016 -0.019800554
#>  [77,] -1.050774756  0.82522834 -0.400192576
#>  [78,] -1.245920491  0.35229530 -0.732854980
#>  [79,] -0.524879112 -0.71255004  0.529651366
#>  [80,] -2.028793501  0.70602706  0.322998774
#>  [81,]  0.331070884  0.65218734 -0.467477392
#>  [82,] -0.452619756  0.20333906  0.028217576
#>  [83,]  1.276824051 -1.17938702 -0.142587786
#>  [84,]  0.184666441 -0.04542801 -0.996224834
#>  [85,] -0.355574342  0.75164560  1.432361951
#>  [86,] -0.626201884  0.80568678  1.131327334
#>  [87,]  0.465730561  1.21604730  0.134522036
#>  [88,] -0.200864854  1.24956891  1.684438318
#>  [89,] -0.831041095  1.13483275 -0.292074609
#>  [90,]  0.665478458  0.17036962  0.230913983
#>  [91,]  0.693940960 -0.98713137 -0.283678233
#>  [92,] -0.427737470  0.62573016  0.245238010
#>  [93,] -0.083122268 -0.21320860  0.316618448
#>  [94,] -0.622176708  0.96391516 -0.214383194
#>  [95,]  2.135480495 -1.91108928 -1.470825524
#>  [96,]  0.594385094  0.96408760 -0.048860640
#>  [97,] -0.004708989  0.13547504 -0.073482387
#>  [98,]  0.745414286 -1.03483989  0.025587836
#>  [99,]  1.050802462 -1.22459103  0.199521938
#> [100,] -1.009598273  0.36162423  0.630423289
#> 
#> $effect
#> [1] -0.7  0.7  0.3
#> 
#> $resid_params
#> $resid_params$sd
#> [1] 0.4472136 0.5477226 0.4472136
#> 
#> $resid_params$corr
#> [1] -0.7  0.1 -0.1
#> 
#> 
#> $mgp_params
#> $mgp_params$sd
#> [1] 0.6324555 0.5477226 0.7071068
#> 
#> $mgp_params$phi
#> [1] 100 150 250
#> 
#>