R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("Geneland-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('Geneland') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "mcmcFmodel" > > ### * mcmcFmodel > > flush(stderr()); flush(stdout()) > > ### Name: mcmcFmodel > ### Title: Inference in a spatial statistical model > ### Aliases: mcmcFmodel > > > ### ** Examples > > # Below is a complete sequence > # of commands using Geneland functions > > # we assume that Geneland is installed > # and loaded by library("Geneland") > > # Simulation of a dataset made of 2 populations > # 5 loci and 10 alleles per locus > # on a spatial domain enclosed in a rectangle > # (x coord. in [0,3], y coord. in [0,1]) > # domain of populations are centered around > # points (0.5,0.5) and (2.5,0.5) respectively > # (so that the boundary is the vertical line x = 1.5) > sim = simFmodel(nindiv=100, + coord.lim=c(0,3,0,1), + number.nuclei=2, + coord.nuclei=cbind(c(0.5,0.5),c(2.5,0.5)), + color.nuclei=c(1,2), + nloc=5, + nall=rep(10,5), + npop=2, + drift=c(.3,.3), + plots=FALSE, + ploth=FALSE, + seed=123) > > # you can check the simulated dataset by > ls() ## gives a list of existing objects [1] "sim" > > summary(sim) ## describes roughly what object sim actually contains Length Class Mode coordinates 200 -none- numeric genotypes 1000 -none- numeric allele.numbers 5 -none- numeric coord.nuclei 4 -none- numeric color.nuclei 2 -none- numeric frequencies 100 -none- numeric ancestral.frequencies 50 -none- numeric drifts 2 -none- numeric index.nearest.nucleus 100 -none- numeric > > # define a place for MCMC outputs > path.mcmc = paste(tempdir(),"/",sep="") > > # First run of MCMC algorithm > # in order to get the posterior mode of the number of populations > mcmcFmodel(sim$coordinates,sim$genotypes,sim$allele.numbers, + path.mcmc=path.mcmc, + rate.max=100, + delta.coord=0, + npopmin=1, + npopinit=5, + npopmax=10, + nb.nuclei.max=200, + nit=50000, + thinning=50, + freq.model="Dirichlet", + varnpop=TRUE, + spatial=TRUE) ***************************** *** MCMC inference *** ***************************** 0.100 % 0.200 % 0.300 % 0.400 % 0.500 % 0.600 % 0.700 % 0.800 % 0.900 % 1.000 % 1.100 % 1.200 % 1.300 % 1.400 % 1.500 % 1.600 % 1.700 % 1.800 % 1.900 % 2.000 % 2.100 % 2.200 % 2.300 % 2.400 % 2.500 % 2.600 % 2.700 % 2.800 % 2.900 % 3.000 % 3.100 % 3.200 % 3.300 % 3.400 % 3.500 % 3.600 % 3.700 % 3.800 % 3.900 % 4.000 % 4.100 % 4.200 % 4.300 % 4.400 % 4.500 % 4.600 % 4.700 % 4.800 % 4.900 % 5.000 % 5.100 % 5.200 % 5.300 % 5.400 % 5.500 % 5.600 % 5.700 % 5.800 % 5.900 % 6.000 % 6.100 % 6.200 % 6.300 % 6.400 % 6.500 % 6.600 % 6.700 % 6.800 % 6.900 % 7.000 % 7.100 % 7.200 % 7.300 % 7.400 % 7.500 % 7.600 % 7.700 % 7.800 % 7.900 % 8.000 % 8.100 % 8.200 % 8.300 % 8.400 % 8.500 % 8.600 % 8.700 % 8.800 % 8.900 % 9.000 % 9.100 % 9.200 % 9.300 % 9.400 % 9.500 % 9.600 % 9.700 % 9.800 % 9.900 % 10.000 % 10.100 % 10.200 % 10.300 % 10.400 % 10.500 % 10.600 % 10.700 % 10.800 % 10.900 % 11.000 % 11.100 % 11.200 % 11.300 % 11.400 % 11.500 % 11.600 % 11.700 % 11.800 % 11.900 % 12.000 % 12.100 % 12.200 % 12.300 % 12.400 % 12.500 % 12.600 % 12.700 % 12.800 % 12.900 % 13.000 % 13.100 % 13.200 % 13.300 % 13.400 % 13.500 % 13.600 % 13.700 % 13.800 % 13.900 % 14.000 % 14.100 % 14.200 % 14.300 % 14.400 % 14.500 % 14.600 % 14.700 % 14.800 % 14.900 % 15.000 % 15.100 % 15.200 % 15.300 % 15.400 % 15.500 % 15.600 % 15.700 % 15.800 % 15.900 % 16.000 % 16.100 % 16.200 % 16.300 % 16.400 % 16.500 % 16.600 % 16.700 % 16.800 % 16.900 % 17.000 % 17.100 % 17.200 % 17.300 % 17.400 % 17.500 % 17.600 % 17.700 % 17.800 % 17.900 % 18.000 % 18.100 % 18.200 % 18.300 % 18.400 % 18.500 % 18.600 % 18.700 % 18.800 % 18.900 % 19.000 % 19.100 % 19.200 % 19.300 % 19.400 % 19.500 % 19.600 % 19.700 % 19.800 % 19.900 % 20.000 % 20.100 % 20.200 % 20.300 % 20.400 % 20.500 % 20.600 % 20.700 % 20.800 % 20.900 % 21.000 % 21.100 % 21.200 % 21.300 % 21.400 % 21.500 % 21.600 % 21.700 % 21.800 % 21.900 % 22.000 % 22.100 % 22.200 % 22.300 % 22.400 % 22.500 % 22.600 % 22.700 % 22.800 % 22.900 % 23.000 % 23.100 % 23.200 % 23.300 % 23.400 % 23.500 % 23.600 % 23.700 % 23.800 % 23.900 % 24.000 % 24.100 % 24.200 % 24.300 % 24.400 % 24.500 % 24.600 % 24.700 % 24.800 % 24.900 % 25.000 % 25.100 % 25.200 % 25.300 % 25.400 % 25.500 % 25.600 % 25.700 % 25.800 % 25.900 % 26.000 % 26.100 % 26.200 % 26.300 % 26.400 % 26.500 % 26.600 % 26.700 % 26.800 % 26.900 % 27.000 % 27.100 % 27.200 % 27.300 % 27.400 % 27.500 % 27.600 % 27.700 % 27.800 % 27.900 % 28.000 % 28.100 % 28.200 % 28.300 % 28.400 % 28.500 % 28.600 % 28.700 % 28.800 % 28.900 % 29.000 % 29.100 % 29.200 % 29.300 % 29.400 % 29.500 % 29.600 % 29.700 % 29.800 % 29.900 % 30.000 % 30.100 % 30.200 % 30.300 % 30.400 % 30.500 % 30.600 % 30.700 % 30.800 % 30.900 % 31.000 % 31.100 % 31.200 % 31.300 % 31.400 % 31.500 % 31.600 % 31.700 % 31.800 % 31.900 % 32.000 % 32.100 % 32.200 % 32.300 % 32.400 % 32.500 % 32.600 % 32.700 % 32.800 % 32.900 % 33.000 % 33.100 % 33.200 % 33.300 % 33.400 % 33.500 % 33.600 % 33.700 % 33.800 % 33.900 % 34.000 % 34.100 % 34.200 % 34.300 % 34.400 % 34.500 % 34.600 % 34.700 % 34.800 % 34.900 % 35.000 % 35.100 % 35.200 % 35.300 % 35.400 % 35.500 % 35.600 % 35.700 % 35.800 % 35.900 % 36.000 % 36.100 % 36.200 % 36.300 % 36.400 % 36.500 % 36.600 % 36.700 % 36.800 % 36.900 % 37.000 % 37.100 % 37.200 % 37.300 % 37.400 % 37.500 % 37.600 % 37.700 % 37.800 % 37.900 % 38.000 % 38.100 % 38.200 % 38.300 % 38.400 % 38.500 % 38.600 % 38.700 % 38.800 % 38.900 % 39.000 % 39.100 % 39.200 % 39.300 % 39.400 % 39.500 % 39.600 % 39.700 % 39.800 % 39.900 % 40.000 % 40.100 % 40.200 % 40.300 % 40.400 % 40.500 % 40.600 % 40.700 % 40.800 % 40.900 % 41.000 % 41.100 % 41.200 % 41.300 % 41.400 % 41.500 % 41.600 % 41.700 % 41.800 % 41.900 % 42.000 % 42.100 % 42.200 % 42.300 % 42.400 % 42.500 % 42.600 % 42.700 % 42.800 % 42.900 % 43.000 % 43.100 % 43.200 % 43.300 % 43.400 % 43.500 % 43.600 % 43.700 % 43.800 % 43.900 % 44.000 % 44.100 % 44.200 % 44.300 % 44.400 % 44.500 % 44.600 % 44.700 % 44.800 % 44.900 % 45.000 % 45.100 % 45.200 % 45.300 % 45.400 % 45.500 % 45.600 % 45.700 % 45.800 % 45.900 % 46.000 % 46.100 % 46.200 % 46.300 % 46.400 % 46.500 % 46.600 % 46.700 % 46.800 % 46.900 % 47.000 % 47.100 % 47.200 % 47.300 % 47.400 % 47.500 % 47.600 % 47.700 % 47.800 % 47.900 % 48.000 % 48.100 % 48.200 % 48.300 % 48.400 % 48.500 % 48.600 % 48.700 % 48.800 % 48.900 % 49.000 % 49.100 % 49.200 % 49.300 % 49.400 % 49.500 % 49.600 % 49.700 % 49.800 % 49.900 % 50.000 % 50.100 % 50.200 % 50.300 % 50.400 % 50.500 % 50.600 % 50.700 % 50.800 % 50.900 % 51.000 % 51.100 % 51.200 % 51.300 % 51.400 % 51.500 % 51.600 % 51.700 % 51.800 % 51.900 % 52.000 % 52.100 % 52.200 % 52.300 % 52.400 % 52.500 % 52.600 % 52.700 % 52.800 % 52.900 % 53.000 % 53.100 % 53.200 % 53.300 % 53.400 % 53.500 % 53.600 % 53.700 % 53.800 % 53.900 % 54.000 % 54.100 % 54.200 % 54.300 % 54.400 % 54.500 % 54.600 % 54.700 % 54.800 % 54.900 % 55.000 % 55.100 % 55.200 % 55.300 % 55.400 % 55.500 % 55.600 % 55.700 % 55.800 % 55.900 % 56.000 % 56.100 % 56.200 % 56.300 % 56.400 % 56.500 % 56.600 % 56.700 % 56.800 % 56.900 % 57.000 % 57.100 % 57.200 % 57.300 % 57.400 % 57.500 % 57.600 % 57.700 % 57.800 % 57.900 % 58.000 % 58.100 % 58.200 % 58.300 % 58.400 % 58.500 % 58.600 % 58.700 % 58.800 % 58.900 % 59.000 % 59.100 % 59.200 % 59.300 % 59.400 % 59.500 % 59.600 % 59.700 % 59.800 % 59.900 % 60.000 % 60.100 % 60.200 % 60.300 % 60.400 % 60.500 % 60.600 % 60.700 % 60.800 % 60.900 % 61.000 % 61.100 % 61.200 % 61.300 % 61.400 % 61.500 % 61.600 % 61.700 % 61.800 % 61.900 % 62.000 % 62.100 % 62.200 % 62.300 % 62.400 % 62.500 % 62.600 % 62.700 % 62.800 % 62.900 % 63.000 % 63.100 % 63.200 % 63.300 % 63.400 % 63.500 % 63.600 % 63.700 % 63.800 % 63.900 % 64.000 % 64.100 % 64.200 % 64.300 % 64.400 % 64.500 % 64.600 % 64.700 % 64.800 % 64.900 % 65.000 % 65.100 % 65.200 % 65.300 % 65.400 % 65.500 % 65.600 % 65.700 % 65.800 % 65.900 % 66.000 % 66.100 % 66.200 % 66.300 % 66.400 % 66.500 % 66.600 % 66.700 % 66.800 % 66.900 % 67.000 % 67.100 % 67.200 % 67.300 % 67.400 % 67.500 % 67.600 % 67.700 % 67.800 % 67.900 % 68.000 % 68.100 % 68.200 % 68.300 % 68.400 % 68.500 % 68.600 % 68.700 % 68.800 % 68.900 % 69.000 % 69.100 % 69.200 % 69.300 % 69.400 % 69.500 % 69.600 % 69.700 % 69.800 % 69.900 % 70.000 % 70.100 % 70.200 % 70.300 % 70.400 % 70.500 % 70.600 % 70.700 % 70.800 % 70.900 % 71.000 % 71.100 % 71.200 % 71.300 % 71.400 % 71.500 % 71.600 % 71.700 % 71.800 % 71.900 % 72.000 % 72.100 % 72.200 % 72.300 % 72.400 % 72.500 % 72.600 % 72.700 % 72.800 % 72.900 % 73.000 % 73.100 % 73.200 % 73.300 % 73.400 % 73.500 % 73.600 % 73.700 % 73.800 % 73.900 % 74.000 % 74.100 % 74.200 % 74.300 % 74.400 % 74.500 % 74.600 % 74.700 % 74.800 % 74.900 % 75.000 % 75.100 % 75.200 % 75.300 % 75.400 % 75.500 % 75.600 % 75.700 % 75.800 % 75.900 % 76.000 % 76.100 % 76.200 % 76.300 % 76.400 % 76.500 % 76.600 % 76.700 % 76.800 % 76.900 % 77.000 % 77.100 % 77.200 % 77.300 % 77.400 % 77.500 % 77.600 % 77.700 % 77.800 % 77.900 % 78.000 % 78.100 % 78.200 % 78.300 % 78.400 % 78.500 % 78.600 % 78.700 % 78.800 % 78.900 % 79.000 % 79.100 % 79.200 % 79.300 % 79.400 % 79.500 % 79.600 % 79.700 % 79.800 % 79.900 % 80.000 % 80.100 % 80.200 % 80.300 % 80.400 % 80.500 % 80.600 % 80.700 % 80.800 % 80.900 % 81.000 % 81.100 % 81.200 % 81.300 % 81.400 % 81.500 % 81.600 % 81.700 % 81.800 % 81.900 % 82.000 % 82.100 % 82.200 % 82.300 % 82.400 % 82.500 % 82.600 % 82.700 % 82.800 % 82.900 % 83.000 % 83.100 % 83.200 % 83.300 % 83.400 % 83.500 % 83.600 % 83.700 % 83.800 % 83.900 % 84.000 % 84.100 % 84.200 % 84.300 % 84.400 % 84.500 % 84.600 % 84.700 % 84.800 % 84.900 % 85.000 % 85.100 % 85.200 % 85.300 % 85.400 % 85.500 % 85.600 % 85.700 % 85.800 % 85.900 % 86.000 % 86.100 % 86.200 % 86.300 % 86.400 % 86.500 % 86.600 % 86.700 % 86.800 % 86.900 % 87.000 % 87.100 % 87.200 % 87.300 % 87.400 % 87.500 % 87.600 % 87.700 % 87.800 % 87.900 % 88.000 % 88.100 % 88.200 % 88.300 % 88.400 % 88.500 % 88.600 % 88.700 % 88.800 % 88.900 % 89.000 % 89.100 % 89.200 % 89.300 % 89.400 % 89.500 % 89.600 % 89.700 % 89.800 % 89.900 % 90.000 % 90.100 % 90.200 % 90.300 % 90.400 % 90.500 % 90.600 % 90.700 % 90.800 % 90.900 % 91.000 % 91.100 % 91.200 % 91.300 % 91.400 % 91.500 % 91.600 % 91.700 % 91.800 % 91.900 % 92.000 % 92.100 % 92.200 % 92.300 % 92.400 % 92.500 % 92.600 % 92.700 % 92.800 % 92.900 % 93.000 % 93.100 % 93.200 % 93.300 % 93.400 % 93.500 % 93.600 % 93.700 % 93.800 % 93.900 % 94.000 % 94.100 % 94.200 % 94.300 % 94.400 % 94.500 % 94.600 % 94.700 % 94.800 % 94.900 % 95.000 % 95.100 % 95.200 % 95.300 % 95.400 % 95.500 % 95.600 % 95.700 % 95.800 % 95.900 % 96.000 % 96.100 % 96.200 % 96.300 % 96.400 % 96.500 % 96.600 % 96.700 % 96.800 % 96.900 % 97.000 % 97.100 % 97.200 % 97.300 % 97.400 % 97.500 % 97.600 % 97.700 % 97.800 % 97.900 % 98.000 % 98.100 % 98.200 % 98.300 % 98.400 % 98.500 % 98.600 % 98.700 % 98.800 % 98.900 % 99.000 % 99.100 % 99.200 % 99.300 % 99.400 % 99.500 % 99.600 % 99.700 % 99.800 % 99.900 % 100.000 % ************************************ *** End of MCMC inference *** ************************************ > > # Trace of number of populations > # Should display a mode at 2 > Plotnpop(path.mcmc) Read 1000 items > > # Then re-run the chain with fixed number of populations > mcmcFmodel(sim$coordinates,sim$genotypes,sim$allele.numbers, + path.mcmc=path.mcmc, + rate.max=100, + delta.coord=0, + npopmin=1, + npopinit=2, + npopmax=2, + nb.nuclei.max=200, + nit=5000, + thinning=10, + freq.model="Dirichlet", + varnpop=FALSE, + spatial=TRUE) ***************************** *** MCMC inference *** ***************************** 0.200 % 0.400 % 0.600 % 0.800 % 1.000 % 1.200 % 1.400 % 1.600 % 1.800 % 2.000 % 2.200 % 2.400 % 2.600 % 2.800 % 3.000 % 3.200 % 3.400 % 3.600 % 3.800 % 4.000 % 4.200 % 4.400 % 4.600 % 4.800 % 5.000 % 5.200 % 5.400 % 5.600 % 5.800 % 6.000 % 6.200 % 6.400 % 6.600 % 6.800 % 7.000 % 7.200 % 7.400 % 7.600 % 7.800 % 8.000 % 8.200 % 8.400 % 8.600 % 8.800 % 9.000 % 9.200 % 9.400 % 9.600 % 9.800 % 10.000 % 10.200 % 10.400 % 10.600 % 10.800 % 11.000 % 11.200 % 11.400 % 11.600 % 11.800 % 12.000 % 12.200 % 12.400 % 12.600 % 12.800 % 13.000 % 13.200 % 13.400 % 13.600 % 13.800 % 14.000 % 14.200 % 14.400 % 14.600 % 14.800 % 15.000 % 15.200 % 15.400 % 15.600 % 15.800 % 16.000 % 16.200 % 16.400 % 16.600 % 16.800 % 17.000 % 17.200 % 17.400 % 17.600 % 17.800 % 18.000 % 18.200 % 18.400 % 18.600 % 18.800 % 19.000 % 19.200 % 19.400 % 19.600 % 19.800 % 20.000 % 20.200 % 20.400 % 20.600 % 20.800 % 21.000 % 21.200 % 21.400 % 21.600 % 21.800 % 22.000 % 22.200 % 22.400 % 22.600 % 22.800 % 23.000 % 23.200 % 23.400 % 23.600 % 23.800 % 24.000 % 24.200 % 24.400 % 24.600 % 24.800 % 25.000 % 25.200 % 25.400 % 25.600 % 25.800 % 26.000 % 26.200 % 26.400 % 26.600 % 26.800 % 27.000 % 27.200 % 27.400 % 27.600 % 27.800 % 28.000 % 28.200 % 28.400 % 28.600 % 28.800 % 29.000 % 29.200 % 29.400 % 29.600 % 29.800 % 30.000 % 30.200 % 30.400 % 30.600 % 30.800 % 31.000 % 31.200 % 31.400 % 31.600 % 31.800 % 32.000 % 32.200 % 32.400 % 32.600 % 32.800 % 33.000 % 33.200 % 33.400 % 33.600 % 33.800 % 34.000 % 34.200 % 34.400 % 34.600 % 34.800 % 35.000 % 35.200 % 35.400 % 35.600 % 35.800 % 36.000 % 36.200 % 36.400 % 36.600 % 36.800 % 37.000 % 37.200 % 37.400 % 37.600 % 37.800 % 38.000 % 38.200 % 38.400 % 38.600 % 38.800 % 39.000 % 39.200 % 39.400 % 39.600 % 39.800 % 40.000 % 40.200 % 40.400 % 40.600 % 40.800 % 41.000 % 41.200 % 41.400 % 41.600 % 41.800 % 42.000 % 42.200 % 42.400 % 42.600 % 42.800 % 43.000 % 43.200 % 43.400 % 43.600 % 43.800 % 44.000 % 44.200 % 44.400 % 44.600 % 44.800 % 45.000 % 45.200 % 45.400 % 45.600 % 45.800 % 46.000 % 46.200 % 46.400 % 46.600 % 46.800 % 47.000 % 47.200 % 47.400 % 47.600 % 47.800 % 48.000 % 48.200 % 48.400 % 48.600 % 48.800 % 49.000 % 49.200 % 49.400 % 49.600 % 49.800 % 50.000 % 50.200 % 50.400 % 50.600 % 50.800 % 51.000 % 51.200 % 51.400 % 51.600 % 51.800 % 52.000 % 52.200 % 52.400 % 52.600 % 52.800 % 53.000 % 53.200 % 53.400 % 53.600 % 53.800 % 54.000 % 54.200 % 54.400 % 54.600 % 54.800 % 55.000 % 55.200 % 55.400 % 55.600 % 55.800 % 56.000 % 56.200 % 56.400 % 56.600 % 56.800 % 57.000 % 57.200 % 57.400 % 57.600 % 57.800 % 58.000 % 58.200 % 58.400 % 58.600 % 58.800 % 59.000 % 59.200 % 59.400 % 59.600 % 59.800 % 60.000 % 60.200 % 60.400 % 60.600 % 60.800 % 61.000 % 61.200 % 61.400 % 61.600 % 61.800 % 62.000 % 62.200 % 62.400 % 62.600 % 62.800 % 63.000 % 63.200 % 63.400 % 63.600 % 63.800 % 64.000 % 64.200 % 64.400 % 64.600 % 64.800 % 65.000 % 65.200 % 65.400 % 65.600 % 65.800 % 66.000 % 66.200 % 66.400 % 66.600 % 66.800 % 67.000 % 67.200 % 67.400 % 67.600 % 67.800 % 68.000 % 68.200 % 68.400 % 68.600 % 68.800 % 69.000 % 69.200 % 69.400 % 69.600 % 69.800 % 70.000 % 70.200 % 70.400 % 70.600 % 70.800 % 71.000 % 71.200 % 71.400 % 71.600 % 71.800 % 72.000 % 72.200 % 72.400 % 72.600 % 72.800 % 73.000 % 73.200 % 73.400 % 73.600 % 73.800 % 74.000 % 74.200 % 74.400 % 74.600 % 74.800 % 75.000 % 75.200 % 75.400 % 75.600 % 75.800 % 76.000 % 76.200 % 76.400 % 76.600 % 76.800 % 77.000 % 77.200 % 77.400 % 77.600 % 77.800 % 78.000 % 78.200 % 78.400 % 78.600 % 78.800 % 79.000 % 79.200 % 79.400 % 79.600 % 79.800 % 80.000 % 80.200 % 80.400 % 80.600 % 80.800 % 81.000 % 81.200 % 81.400 % 81.600 % 81.800 % 82.000 % 82.200 % 82.400 % 82.600 % 82.800 % 83.000 % 83.200 % 83.400 % 83.600 % 83.800 % 84.000 % 84.200 % 84.400 % 84.600 % 84.800 % 85.000 % 85.200 % 85.400 % 85.600 % 85.800 % 86.000 % 86.200 % 86.400 % 86.600 % 86.800 % 87.000 % 87.200 % 87.400 % 87.600 % 87.800 % 88.000 % 88.200 % 88.400 % 88.600 % 88.800 % 89.000 % 89.200 % 89.400 % 89.600 % 89.800 % 90.000 % 90.200 % 90.400 % 90.600 % 90.800 % 91.000 % 91.200 % 91.400 % 91.600 % 91.800 % 92.000 % 92.200 % 92.400 % 92.600 % 92.800 % 93.000 % 93.200 % 93.400 % 93.600 % 93.800 % 94.000 % 94.200 % 94.400 % 94.600 % 94.800 % 95.000 % 95.200 % 95.400 % 95.600 % 95.800 % 96.000 % 96.200 % 96.400 % 96.600 % 96.800 % 97.000 % 97.200 % 97.400 % 97.600 % 97.800 % 98.000 % 98.200 % 98.400 % 98.600 % 98.800 % 99.000 % 99.200 % 99.400 % 99.600 % 99.800 % 100.000 % ************************************ *** End of MCMC inference *** ************************************ > > # Post-processing the chain > PostProcessChain(sim$coordinates,sim$genotypes,sim$allele.numbers, + path.mcmc=path.mcmc, + nxdom=50, + nydom=50, + burnin=0) ***************************************** * Computing posterior probabilities * of population membership for pixels ***************************************** ********************************************** * Computing posterior probabilities * of population membership for individuals ********************************************** > > # Plots allele frequencies of allele #1 at locus #1 in sub-population #1 > PlotFreq(sim$allele.numbers, + path.mcmc=path.mcmc,ipop=1,iloc=1,iall=1) > > # Map of posterior probabilites > # of population membership > PlotTessellation(sim$coordinates,path.mcmc=path.mcmc) > > # Map of posterior mode > # of population membership > PosteriorMode(sim$coordinates,path.mcmc=path.mcmc, + write=FALSE,plotit=TRUE) > > # read the estimated population for indivuals > pppm.indiv <- scan(paste(path.mcmc,"modal.pop.indiv.txt",sep="")) Read 100 items > > # add a plot of the individual colored as their estimated population of origin > points(sim$coordinates,col=pppm.indiv,pch=16) > > > > > > ### *