List of Rgui to CoSSci Models

From InterSciWiki
Jump to: navigation, search

Ten of the models listed here have (SCCS) RiV marked in bold, each of which has a dpV and a set of RiV independent variables. You can experiment entering some of these (only those with v### with a number) in the first two of the http://SocSciCompute.ss.uci.edu douglas.white windows or http://SocSciCompute.ss.uci.edu:8081 drwhite2@gmail.com douglaswhite. .Dow-Eff_Functions_-_DEf - You can ask for maps for some of the variables you have entered.

Dow-Eff function models DE06 DE07 -> DEf01 ->DEf01b (->DEf01c->DEf01d) the latest

Eff's Oct 18 2013 MiVersion of DEf01c

  • MiEff877 doMI by Eff Oct 18 2013 nice set of features not a model of Polygyny scale II per se (v877)
  • MiEff877.1 doMI by Eff adds new variables that might mode Polygyny scale II can see successive iterations
  • MiEff877.2 doMI by Eff predictors: 4 polygyny variables predict polygyny - good example "cross check" for CoSSci
rm(list=ls(all=TRUE));gc();ls()
setwd("/home/yagmur/Dropbox/functions")
library(mice)
library(foreign)
library(stringr)
library(AER)
library(spdep)
library(psych)
library(geosphere)
library(relaimpo)
library(linprog)
library(dismo)
library(forward)
library(pastecs)
library(classInt)
library(maps)
library(dismo)
library(plyr)
library(aod)
library(reshape)
library(RColorBrewer)
 library(XML)
 library(tm)
 library(mlogit)
load(url("http://dl.dropbox.com/u/9256203/DEf01c.Rdata"),.GlobalEnv)
ls() #-can see the objects contained in DEf01c.Rdata
# =========================SCCS=========================
setDS("SCCS")
dx$rectang<-(dx$v65>=8 & dx$v65<=9)*1
addesc("rectang","Dwelling is rectangular")
mkdummy("v279",1)
polyg<-fv4scale(lookword="polyg",doscale=FALSE,verbose=FALSE)
femecon<-fv4scale(lookword=c("market","exchange","wage","trade","subsistence","goods","product","labor"),
                 keepword=c("female","women","woman"),
                 coreword=c("subsistence"),nmin=60,chklevels=FALSE,verbose=FALSE)
path<-fv4scale(lookword=c("pathogen"),nmin=60,chklevels=FALSE,verbose=FALSE)
avoid<-c("v1196", "v1197", "v1198", "v1201", "v1202", "v1204", "v1205", "v1207",
        "v1208", "v1209", "v1210", "v1211", "v1212", "v1213", "v1214", "v1215",
        "v1217", "v1218", "v1219", "v1220", "v1223", "v1224")
evm<-unique(c(polyg,"v279.d1","rectang",femecon,path,avoid))
smi<-doMI(evm,nimp=2,maxit=3)
dim(smi) # dimensions of new dataframe smi
smi[1,] # first row of new dataframe smi
jx<-"mean"
for (ii in c("path","femecon")){
 prp<-mkscale(compvarbs=ii,udnavn=paste(ii,jx,sep="."),impdata=smi,type=jx)
 print(head(prp$scales))
 print(prp$stats)
 print(prp$corrs)
 smi[,names(prp$scales)]<-prp$scales
}
quickdesc(polyg)
# --dependent variable--
dpV<-"v877" #Polygyny Guttman Scale I: Co-wife Autonomy Constructed from 854-852
#--independent variables in UNrestricted model--
UiV<-c("femecon.mean","path.mean","v1196", "v1197", "v1198", "v1201")
#--independent variables in restricted model (all must be in UiV above)--
RiV<-c("femecon.mean","path.mean","v1196", "v1197", "v1198")
h<-doOLS(smi,depvar=dpV,indpv=UiV,rindpv=RiV,othexog=NULL,dw=TRUE,lw=TRUE,ew=FALSE,stepW=FALSE,boxcox=FALSE,getismat=FALSE,relimp=FALSE,slmtests=FALSE,haustest=NULL,mean.data=TRUE,doboot=0,full.set=TRUE)
#full.set=FALSE)

Most recent DEf01c and DEf01b SCCS with scales, maps

h <- doOLS(smi, depvar = dpV, indpv = UiV, rindpv = RiV, othexog = NULL, dw = TRUE, lw = TRUE, ew = TRUE, stepW = TRUE, boxcox = FALSE, getismat = FALSE, relimp = TRUE, slmtests = FALSE, haustest = NULL, mean.data = TRUE, doboot = 1000) #Works with DEf01c 
CSVwrite(h, "v67.d3.olsresults.ew", FALSE) # DEf01b SCCS DEf01c SCCS ------------------------- ew = TRUE
h <- doOLS(smi, depvar = dpV, indpv = UiV, rindpv = RiV, othexog = NULL, dw = TRUE, lw = TRUE, ew = FALSE, stepW = TRUE, boxcox = FALSE, getismat = FALSE, relimp = TRUE, slmtests = FALSE, haustest = NULL, mean.data = TRUE, doboot = 1000) #Works with DEf01c 
CSVwrite(h, "v67.d3.olsresultsNo.ew", FALSE) # DEf01b SCCS DEf01c SCCS ----------------------- ew = FALSE
###DOES NOT WORK WITH DEf01b: CSVwrite(h, "v67.d3.olsresults.eW", TRUE)
  • ------- NEXT: same as above, running in DEf01b SCCS
  • R2=.218 0.50 0.50 dist lang DEf01b dpV v67.d3 (SCCS) RiV v1649,v1127.d2,v2137,v279.d5,v213.d3,v1265 #No: v234
  • R2=.153 0.42 0.18 0.40 DEf01b SCCS v67.d3 Single family dwelling *** CONTAIN INSTRUCTIONS TO DEf01b new versions - RUNS IN DEf01b SCCS
  • R2=.218 0.50 0.50 dist lang DEf01b dpV v67.d3 (SCCS) RiV v1649,v1127.d2,v2137,v279.d5,v213.d3,v1265 #No: v234
  • 0.42 0.18 0.40 DEv67.d3 short script of the above. dpV v67.d3 (SCCS) RiV v1649,v1127.d2,v2137,v279.d5,v213.d3,v1265 #No:v234
  • Unlike distance or language, ecology is not a transmission channel (does not represent horizontal or vertical cultural transmission). It is something to which societies adapt. To combine it with distance and language creates a network lag term that is hard to interpret. My view (Eff) is that it is better to have ecological variables in the model as distinct independent variables (for example, variables measuring annual precipitation or number of frost months), so that the network lag term is a clear measure of cultural transmission. Nevertheless, sometimes, when playing with a model, one might want to take a look at a network lag term consisting wholly or in part of ecological similarities. So it's in there as an option. DRW's view is that horizontal (spatial) and vertical (language phylogeny) cultural transmission need to be balanced against ecological constraints that push societies in or out of certain environments, as demonstrated in Binford's 2001 Constructing Frames of Reference.

SCCS: STANDARD CROSS-CULTURAL SAMPLE

  • Harem Size Betzig Comments94
  • SCCS: Networks of Variables
  • dist lang ecol
  • dist lang ____ only
  • R2=.491 0.13 0.30 0.57 Dv676.5 Female/Male Origins Symbolism dpV v676 (SCCS) RiV bio.5,v203,v150,v21,v53,v670,v673,v826
  • R2=.491 0.60 0.40 ____ Dv676.5 Female/Male Origins Symbolism dpV v676 (SCCS) RiV bio.5,v203,v150,v21,v53,v670,v673,v826 DE7.Rdata Rsqs down from DE6 (Similar results to Ch 5 Table 6)
  • R2=.348 0.23 0.15 0.62 Dv676.8 Female/Male Origins Symbolism dpV v676 (SCCS) RiV bio.5,v203,v150,v21,v53,v670,v673,v826 *** DEf01.Rdata SHOWS HOW DE7 is converted into DEf01 Rsqs also went down from DE6
  • R2=.361 0.64 0.36 -Ew Dv676.8 Female/Male Origins Symbolism dpV v676 (SCCS) RiV bio.5,v203,v150,v21,v53,v670,v673,v826 *** (Same results as Ch 5 Table 6, original)
  • R2=.490 0.08 0.30 0.62 ??? Dv626.1 Female Equality Beliefs dpV v626 (SCCS) RiV v149,v51sq,v625,v64,v676,v154 ***
  • R2=.467 0.20 0.80 -Ew ??? Dv626.1 Female Equality Beliefs dpV v626 (SCCS) RiV v149,v51sq,v625,v64,v676,v154 *** DE7.Rdata see Tips DE7.Rdata NOT DEf01.Rdata
  • R2=.490 0.08 0.30 0.62 Ev621 Husband-Wife Equality/Inequality DEf01.Rdata dpV v621 (SCCS) RiV bio.11,bio.5,cpxPop,v53,v54,v626,v68,v817 ...malefieldyear***7
  • R2=.530 0.29 0.71 0.20 Ev621 Husband-Wife Equality/Inequality DEf01.Rdata dpV v621 (SCCS) RiV bio.11,bio.5,cpxPop,v53,v54,v626,v68,v817 ...malefieldyear***7
  • R2=.530 0.05 0.95 -Ew correct
  • R2=.530 0.05 0.80 0.15 correct
  • Hot-Dry predictors of Largest Patrilineal Group
  • SCCS Ev221.1 Hot-Dry predictors of Largest Patrilineal Group

EA ETHNOATLAS

LRB FORAGERS

JGJ WNAI WESTERN INDIANS

XC All Atlas-Linked Data

Comments129 #These are 371 societies in the Ethnographic Atlas that merge all data from SCCS, EA, Binford, WNAI datasets

Key links

Using R scripts with the SCCS DEf01SCCS
Using R scripts with the LRB DEf01LRB Binford Foragers
Using R scripts with the EA DEf01EA Ethnographic Atlas
Using R scripts with the WNAI DEf01WNAI Jorgensen Western North American Indians
http://intersci.ss.uci.edu/wiki/htm/Wiki4R_Codebooks.htm
.Dow-Eff_Functions_-_DEf
List of SCCS variables - List of SCCS societies
List of LRB variables - List of LRB societies
List of EA variables - List of EA societies
List of WNAI variables - List of WNAI societies
List of XC variables - List of XC societies
  • The latest version of the Dow-Eff functions (Manual: pdf; html) can perform analyses on four different ethnological datasets.”

Currently: http://capone.mtsu.edu/eaeff/downloads/Manual_DEf1c.pdf Currently: http://capone.mtsu.edu/eaeff/downloads/Manual_DEf1c.htm