Dropbox

From InterSciWiki
Jump to: navigation, search

The setting for "Dropbox.app" can be changed in the Firewall pane of Security and Privacy preferences.

Silvy: 2017 dropbox - Could you please let me know whether you have checked the drop box link which I have sent to check we are working on the same final versions of chapter?

Contents

1

https://www.dropbox.com/help/45
https://www.dropbox.com/home - doug
source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R ")			#4th source program (run)
#HERE IS THE ERROR: http://intersci.ss.uci.edu/2sls/ccs is in INTERSCI not this computer 
#Error in W %*% X : requires numeric/complex matrix/vector arguments
#In addition: Warning message:
#In eval.with.vis(ei, envir) :
# .Internal(eval.with.vis) should not be used and will be removed soon

2

library(mice)
library(spdep)
library(car)
library(lmtest)
setwd('/Users/drwhite/Documents/3sls/sccs/')				#setup (output will be stored here)
#library(sccs)								#setup
#data(sccs) 								#setup
setwd('/Users/drwhite/Documents/3sls/sccs/')                           # library(foreign)
load('comb.Rdata')
sccs<-data.frame(sapply(comb,function(x) as.numeric(x)))          #data(sccs)  
#SEE BELOW source("http://intersci.ss.uci.edu/2sls/ccs/create_EduR_1.5DistBrownEff.R")	#2nd source program (model)
twoVARS=cbind(sccs$v921,sccs$v928)
#princomp(twoVARS)
pcdat=princomp(twoVARS)
#pcdat$scores
PCcap1=round(pcdat$scores[1:186],3)
sccs$v1918=PCcap1

sccs$v237[172]=5
sccs$v237[115]=3
sccs$v63[88]=3
twoVARS=cbind(sccs$v63,sccs$v237) 
#princomp(twoVARS)
pcdat2=princomp(twoVARS)
#pcdat$scores
PCsize1=round(pcdat2$scores[1:186],3)
sccs$v1919=PCsize1
#THERE WERE NaNs


#depvar=sccs$v238
#depvar=sccs$v155
my_sccs<-data.frame(
dep_var=sccs$v238,
#dep_var=sccs$v155,
pastoralExch=((sccs$v208==1)*1)*(sccs$v858==6)*1,
fratgrpstr=sccs$v570,
milk=(sccs$v245>1)*1,
popdens=sccs$v156,
superjh=sccs$v237,
PCcap=sccs$v1918,
foodscarc=sccs$v1685,
anim=sccs$v206,
PCsize=sccs$v1919,
PCsize2=sccs$v1919^2,
caststrat=sccs$v272,
eeextwar=sccs$v1650,
## 
segadlboys=sccs$v242,
plow=(sccs$v243>1)*1,
pigs=(sccs$v244==2)*1,
bovines=(sccs$v244==7)*1,
###milk=(sccs$v245>1)*1,
agrlateboy=sccs$v300,
valchild=(sccs$v473+sccs$v474+sccs$v475+sccs$v476),
###fratgrpstr=sccs$v570,
Sanday669=sccs$v669, # sum of v664-668 
socplex=sccs$v711,
 wagelabor=sccs$v1732
) 
indep_vars<- c("PCcap", "foodscarc", "anim", "PCsize", "PCsize2", "caststrat", "eeextwar", "agrlateboy", "socplex", "plow", "fratgrpstr",  "milk", "popdens",  "pastoralExch") #"superjh",

#restrictvars must drop one or more indepvars - in this case, dropping "  ??"


restrict_vars=c( "PCcap", "foodscarc", "anim",
"PCsize", "PCsize2", "caststrat", "eeextwar") #
      #, "superjh", "popdens", "fratgrpstr")
      # "agrlateboy", "socplex", "pastoralExch", "plow")  #,  

library(foreign)


load("./examples/data/vaux.Rdata",.GlobalEnv)
my_aux = vaux
row.names(my_aux)<-NULL
#--remove the society name field--
my_aux<-my_aux[,-28]
library(foreign)
#--Read in two weight matrices--
Wll<-as.matrix(read.dta("./examples/data/langwm.dta")[,-1])
Wdd<-as.matrix(read.dta("./examples/data/dist25wm.dta")[,c(-1,-2,-189)])

name<-"Moral gods Lang"
alias<-"moralgodsLang"

#distlang<-((Wdd*Wll)+.0001)
#distlang<-distlang/rowSums(distlang)
model=list(name=name,
           alias=alias,
           data=my_sccs,
           aux_data=my_aux,
           prox_list=list(distance=Wdd), #language=Wll)
           dep_var="dep_var",
           indep_vars=indep_vars,
           restrict_vars=restrict_vars)
save(model,file=paste(alias,".Rdata",sep=""))
#OK TO HERE!!!!  "/Users/drwhite/Documents/3sls/sccs"

source("http://intersci.ss.uci.edu/2sls/ccs/two_stage_ols.R")			#3rd source program (2sls)
source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R ")			#4th source program (run)


source("http://intersci.ss.uci.edu/2sls/ccs/two_stage_ols.R")			#3rd source program (2sls)
source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R ")			#4th source program (run)

3

source("http://intersci.ss.uci.edu/2sls/ccs/create_EduR_1.5DistBrownEff.R")	#2nd source program (model)
source("http://intersci.ss.uci.edu/2sls/ccs/two_stage_ols.R")			#3rd source program (2sls)


source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R ")			#4th source program (run)
#HERE IS THE ERROR:
#Error in W %*% X : requires numeric/complex matrix/vector arguments
#In addition: Warning message:
#In eval.with.vis(ei, envir) :
# .Internal(eval.with.vis) should not be used and will be removed soon

For the Eff and Dow (2009) model,

source("http://intersci.ss.uci.edu/2sls/ccs/create_model_value_childrenLangOnly.R")	#2nd source program (model)
source("http://intersci.ss.uci.edu/2sls/ccs/two_stage_ols.R")			#3rd source program (2sls)
source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R")			#4th source program (run)

4

For the Eff and Dow (2009) model,

source("http://intersci.ss.uci.edu/2sls/ccs/create_model_value_childrenLangOnly.R")	#2nd source program (model)
source("http://intersci.ss.uci.edu/2sls/ccs/two_stage_ols.R")			#3rd source program (2sls)
source("http://intersci.ss.uci.edu/2sls/ccs/run_model_79.R")			#4th source program (run)



  1. source("http://intersci.ss.uci.edu/wiki/R/source/setwd&libraries.R")

https://dl.dropbox.com/u/37813961/create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R

as.matrix(read.dta("http://dl.dropbox.com/u/37813961/dist25wm.dta")[,c(-1,-2,-1,-189)])

Doug

EduS_1#create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R_(Old&NewMac)

load("/Users/drwhite/Dropbox/Public/comb2.RData")

source("dropbox create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R")


Anthon

setwd("/home/anthon/Dropbox/males")

Wesley

setwd("/home/anthon/Dropbox/wes


library(MCMCpack)
library(foreign)
library(psych)
library(XML)
library(spdep)
library(sp)
library(raster)
library(geosphere)
library(plyr)
library(raster)
library(geosphere)
library(stringr)
library(mice)
library(car)
library(Formula)
library(AER)
setwd('/Users/drwhite/Documents/3sls/sccs/')                           # library(foreign)
load('comb.Rdata')
sccs<-data.frame(sapply(comb,function(x) as.numeric(x)))          #data(sccs)   
#  setwd('/Users/drwhite/Documents/3sls/sccs/create/create_EduR_1/')
setwd('/Users/drwhite/Documents/3sls/sccs/examples/create/create_EduR_1/')
                           source("create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R") 
# source("create/create_EduR_1/create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R")    #"Untitled.R") #/examples/Untitled.R")                  
#source("dropbox create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R")    
source("R_3_s_ols/two_stage_ols.R")                                                
source("examples/create/R_run/run_model_100.R")
source("examples/create/R_run/averageAll.R")   ##output 
#or
source("http://intersci.ss.uci.edu/wiki/R/create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R") 
source("http://intersci.ss.uci.edu/wiki/R/two_stage_ols.R")
source("http://intersci.ss.uci.edu/wiki/R/run_model_100.R")
source("http://intersci.ss.uci.edu/wiki/R/averageAll.R")
#or download each source code and run
source("https://dl.dropbox.com/u/37813961/create_EduR_1.5DistBrownEff100slim711HiGod4OLSWageSuperjh.R") 
source("https://dl.dropbox.com/u/37813961/two_stage_ols.R")
source("https://dl.dropbox.com/u/37813961/run_model_100.R")
source("https://dl.dropbox.com/u/37813961/averageAll.R)