Working *Rccs* models
- WARNING: Your list of indep_vars must have at least one additional variable compared to restrict_vars
- 1 Installing and working with the R package *Rccs* at home AND at the classroom wiki
- 2 Students with problems
- 3 Students with problems missing 1 page "what you think the course is about after reading Herb Simon article"
- 4 Codebook to choose your topic (dependent) variable and Place to put your TOPIC
- 5 Model topics ranked by readiness for presentation
- 6 How to do your CreateModel....R program
- 7 If you've started the code for your project and it isn't working --> to get help
- 8 Variables names
- 9 General polygyny with more variables DRW
- 10 Value of children
- 11 General polygyny with few variables DRW
- 12 Notes
Installing and working with the R package *Rccs* at home AND at the classroom wiki
- Mac or PC: SCCS R package Install
- You can also work from anywhere in the world and you dont need to be in this class to do so -- this is EduMod
Students with problems
Discussion: In response to the professor's email ("if you have any questions, you can post on the wiki"):
"There are now full and explicit instructions (and advice) on the chronology site for tomorrow's class, and you can read, study and practice those instructions".
These full and explicit instructions still have me confused. I don't think its just me, either. I think many of the other students in the class are also confused. These students in class are afraid to speak up, probably because they don't even know what exactly it is they cannot do. In order for us to write this paper, we need information and statistics to write about. We can't get information when we are still stuck in the first few steps. We can all show up on time and pay attention, but using an unfamiliar program with multiple steps can be difficult for us to get on the first try.
I am posting this to this page (I'm not even entirely sure where it is we are to be posting) so other students know that they are not alone. If you asked the confused students to raise their hands, only a few would do it even if 15 were completely lost. Please address these concerns and help us students walk out of class Tuesday with enough information that we understand to write a paper.
DRW: Posting here or below is fine. The confusion is diminishing, and will diminish further, especially when all (almost) students have chosen a dep_var. Not enought time Tuesday to solve everyone's problems.
I am still a little confused as to where the meat of our papers will be coming from. When you say "list of readings", is that something we need to find from the R program, or can we find readings from, say, google scholar or the library resources? I am confused as to what extent the R software will be influencing our papers.
DRW: The "list of readings" will come from google scholar directed search http://intersci.ss.uci.edu/wiki/index.php/Sources_for_codes_and_articles_on_the_SCCS
Tomorrow: Oct 7 we will do a new stage that we did not get to on Tuesday the 5th -- expanding the restricted_vars -- the R software student sites where I have helped to illustrate those changes are marked UR/2 below.
ANYONE WHO WANTS should take the extension on your sketch of project due tomorrow: I discovered that the prototype based on ValueOfChildren generated errors when Sanday668 was twice repeated and called twice in the restricted_vars. My error: Corrected that everywhere and reran some of the programs with results.
Students with problems missing 1 page "what you think the course is about after reading Herb Simon article"
- Bakshi - no work beyond 1A. No dep_var. Seriously behind the rest of the class!!!
- -->No day 1 page assignment after reading Simon
- De Ramos
- Walker -- also no 2nd paper -- not attending class
- Zhu Q
- AWOL/MIA from wiki
- User talk:Marforid also no day 1 page - emailed me. What's up, Dwayne? You say you will show up in class but you have never been in class to my knowledge.
- Sun, Jie also no day 1 page - no attendance
Codebook to choose your topic (dependent) variable and Place to put your TOPIC
- - The new UR/2 procedure is at the front of those projects where it has been used.
- - If you haven't added a topic next to your name, click EDIT at the side of this page and then type it next to your name.
- Discussion: Many students have added their topic. How come there are links and citations? Isn't this just for your topic? Links and citations make students who are not using them think they are doing something wrong.
- DRW: Citations are ok here too, but optional. They can also go in your page.
- Discussion: Though it was a very good idea to post to this page instructions (like "find variable number"), we do not understand how we do that. Some students have completed the steps in class and thats great for them, but continuing the steps for these students leaves everyone else behind and lost. Please clarify.
- DRW: thanks for these comments. Almost everyone now has a dep_var number and var name. That was the object. Logically, that was the first step. Tolga and I couldn't help a student with developing their model (==2A== for example) so those students needed to catch up.
- sccs codebook
- 180 variable version
- Edu-Mod 2009-10: The Individual Studies -- previous class results -- you can look here to see if anyone has studied your dep_var before. The new list of indep_vars however should give new results
Model topics ranked by readiness for presentation
1 not attending
- Sun, Jie also no day 1 page - no attendance
3 Models not ready - need work - you need some work in class on your own and to get help! - raise your hand
- v39 Magical protectiveness User:Sbakshi#5B v36 Magical protectiveness Sharon: child development no work since 5 Oct Bakshi I am really sick. I've missed all my other classes as well
- User talk:Marforid Duane Marifori not coming to class at all - emailed
- v1009 W_Sys_labor User:Ahwalker Amani Labor – out of class 5 weeks - no response to email
- Sick or almost finished :I thought I had dropped the class but did not realize I could not after second week; need to finish and hoping it is possible at this point.
1 models Nearly ready for powerpoint
- Next Thurs UR/2 v557 ceremonies for boys User:bpitt#3B DRW ran your model for you (it works Brian - Why not run 3A? Does it work?
17 models ready for powerpoint
- User:Po Huang#8B Premarital Sex Attitudes- Female Premarital Sex Attitudes-Female no work since 28 Oct but now finished
- v168 initpremarrsex User:Shejazi#4B_v169_Extramarital_Sex Sohrab 168.Initiator of Premarital Sex - - I have missed most of the last 2 weeks due to a sever throat infection. I am fully recovered now and am in help to catch up.
- v709 Social Stratification replalcing v1669 suicide User:jloyola#BB please give headers for programs: depvar v709 Social Stratification in the Larger Society need to delete indep vars User:jloyola#5D v1669 suicide results Need to take out indep_vars Jonathan - suicide=sccs$v1669 TAKE OUT INDEP_VAR 1669 if present
- next Tues v23 proxSleepng2Child User:medicboi44#5B Final R2 Jung Hoon jkwon3 - Sleeping Proximity of Parents to Infants no work since 19 Oct - emailed
- next Tues v1675 homicide User:Alyssakeyes#3B depvar famine ill for 3 weeks - no work since 14 Oct - trying to make up work
- v740 arrgdMarr User:Cabaltem#11B ArrangedMarriageMTCv740.R RESULTS FINAL -- User:Cabaltem#5B ArrangedMarriageMTCv740.R Deleted insignificant indep_vars Marriage arrangements - v740 3 refs
- You may want to define one of these dichotomies
- dep_var=(sccs$740<=2)*1 #individual ----------- : dep_var=(sccs$740>=5)*1 #parents
- UR/2 v22 foodsupply User:Kherr#Food Supply (Ecological or Distribution Network) 4H by Tolga]] Keenan Herr
- UR/2 in3A v165 premarsexatt_fem User:Rikki Lee#13B Results from 13A (Final Model) v165 Premarital sex attitudes-female - Making progress - User:Rikki Lee#9B v165 Premar Sex - Significant results 165. PREMARITAL SEX ATTITUDES - FEMALE ---:References: :Broude, Gwen, and Sarah J. Greene. 1976. Cross-Cultural Codes on Twenty Sexual Attitudes and Practices. ETHNOLOGY. 15:409-429. http://www.jstor.org/stable/3773308 ---- :H Barry III, A Schlegel. 1984. Measurements of Adolescent Sexual Behavior in the Standard Sample of Societies. ETHNOLOGY. 24:315-329. http://www.jstor.org/pss/3773508
- User:Ychang2#11B v169 Extramarital Sex ((New page: Yuan Chang) v171 sexFrqMarr <-- elim high VIFs <-- too few cases
- v678 hunger User:Elizabeth Yeh#13B v678 Food Stress or Hunger was v1747 Gossip on Scandal - CHANGED to v678 hunger
- User:Karen Cachero#6B_Results_v1665_Individual_Aggression_-_Homicide v1669 suicide User:Karen Cachero Suicide
- v157 politint User:Myhuang#7D variable taken out Results - Political integration - find variable number
- v750 H_WproxSleepng User:Natasha Strauss#4C output with final removal insig. var. Sleeping proximity between husbands and wives (Code 750) variables may be very different see 1988 D.R. White. Rethinking Polygyny: Co-Wives, Codes, and Cultural Systems. Current Anthropology 29:529-558, 568-572. http://eclectic.ss.uci.edu/~drwhite/pw/Polygyny1988.pdf
- v1781 gossip on Adultery User:Judy Zhu#14B - User:Judy Zhu#9B Relatively good results Gossip on adultery. DRW: You can use the other gossip scales, they are not synonyms. DRW: In 3A and 3B to 4a: You went the next step that most students did not do so early. The idea in 4a would be to look for adding entirely new variables. Since you have two significant variables: exogamy and agricultural potential in 3B that might indicate adding other variables for settled, closely packed, rural agricultural communities that are not already on your list of indep_vars.
- UR/2 v216 residence WAS: v214: First Years User:Tara Chamberlain#27B FINAL MODEL v216 residence rule DRW:Drop foodtrade, after dropping pathstreess, v860 - User:Tara Chamberlain#12B (keep variables that worked in 10B) Transfer of Residence at Marriage
- UR/2 User:NCouts#3B_Results_from_var_903 903. PRESTIGE ASSOCIATED WITH BEING A SOLDIER OR WARRIOR --- References: http://ccr.sagepub.com/content/9/2/151.full.pdf+html, http://books.google.com/books?hl=en&lr=&id=xb08AAAAIAAJ&oi=fnd&pg=PR7&dq=related:Dhe0Dl3fOL4J:scholar.google.com/&ots=TKTkrDtKqI&sig=v8B9ELZeD0bReeRA8MoSUlObA-o#v=onepage&q&f=false
- 274. Type of Slavery User:Robert De Ramos#11B.
- v863 cowifeDist User:Yiyun_hung#6B - User:Yiyun hung#5B_v863_Standard_Polygyny_codes Distance between Co-Wives (code 863) IN YOUR 3A drop all the high VIFS (you have too many variables) before you go on to 4A.
- Co-Wife Conflict and Co-operation. William Jankowiak, Monika Sudakov
10 Models Presented
- 1#== UR/2 v1248 fembodytype User:Amy H. Truong#6BB_final_model?: Female Body types
- References: Broude, Gwen, and Sarah J. Greene. 1976. Cross-Cultural Codes on Twenty Sexual Attitudes and Practices. ETHNOLOGY. 15:409-429. http://www.jstor.org/stable/3773308
- 2#== v679 war User:ShawnRidgeway#2B Working Results for v892 can still look at Language Diversity -- lots of similarity
- 3#== UR/s v862 StdPolyg User:Kcoste#8F v862 Standard Polygamy Code Standard Polygamy Code, Benjamin C. Wilreker. Ethnology Vol. 44, No. 1 (Winter, 2005), pp. 81-98 Published by: University of Pittsburgh- Of the Commonwealth System of Higher Education. Stable URL: http://www.jstor.org/stable/3773961
- 4#== v167 premarsexfrq_fem User:Melissamatlock#19 Premarital Sex - FIRST STEP COMPLETED: Broude, Gwen. J & Sarah J. Green. Cross-Cultural Codes on Twenty Sexual Attitudes and Practices. http://www.jstor.org/pss/3773308
- 5#== v282 preMarrsexNorm User:Elaine Kao#8B RESULTS-- Premarital Sex in Females. DRW: you added 6 new variables, one repeated v72 and created an error. I fixed the error but two of the others had the same name. You can rerun 2A and put the two new variables in the 2B results. In general better to add more variables in restrict_vars from indep_vars before adding new variables.
- 6#== v739 User:Aimyn#21B depvar=sccs$v740>4 (arranged4fem) with v1248 Female body type significant - User:Aimyn#18b- User:Aimyn#12b (made some changes) Marriage Arrangement -- Across 4B-5B-6B-7B-8B DW: You're getting different vars as signif. If you do a 9A it could have all the signif vars from these: see how they work together... which ones to keep if tested together? i.e. exogamy localjh agrlateboy Whyte635 migr Sanday668 Rohner800 femsubs Rohner804 Rohner801 intwarB.
- Ok that only helped a tiny bit, now I improved your 10A and 10B somewhat by that method again It might be well to define in a 11A and get 11B results for depvar<--(sccs$v739>2)*1 and in a different run in a 12A 12B depvar<--(sccs$v739>4)*1
- 7#== v238 gods in human affairs User:Chesszhu#1B Results for v238 High Gods You have a model!
- 8#== UR/2 User:Wilsonbm#4B_v238_High_gods v577 Whyte577 User:Wilsonbm#3B Breanna-- Mythical Founders of the Culture - Making progress Doug 13:09, 29 October 2010 (PDT). Changed variable to v238--High Gods
- 9#== v678 hunger User:Heather Hechter#3B_Your_3A_Results_-_Some_dep_vars_to_delete
- 10#== v1797 Gossip on scandal UR/2 User:Victoria Valverde#12B: Results from 12A -- User:Victoria Valverde#7B: Results from 7A -User:Victoria Valverde#5B: Results from 5A - User:Victoria Valverde#2B Depvar Men gossip, Indepvar Men Mythic founders, exogamy, nuclear family etc. GOOD IN STRONG DQC results. Had been interested in Dance.
- Dance and Human History - CD "Rhythms of the Earth" includes Dance and Human History CD http://www.media-generation.com/DVD%20PAGES/Rhythms/Rhythm.htm I ordered the CD and we can play the 40 minute movie which features the 186 sccs sample for films on Human Dance and cross-cultural analyses Doug 14:07, 29 September 2010 (PDT)
How to do your CreateModel....R program
YOUR LIFE JUST GOT EASIER: THESE "prototype" programs now have more my_sccs and indep_vars, copy those for indep_vars to restrict_vars<-c( ...) and you can test ALL those new variables, selecting those that are significant (deleting those that are not in the next run -- copy, paste to new page in wiki, then delete restrict_vars<-c( ...) that were not significant)
I'm sorry, but even though this has made it easier for us,
"THESE "prototype" programs now have more my_sccs and indep_vars, true
copy those for indep_vars to restrict_vars<-c( ...) " this means, take come indep_vars and copy into restrict_vars
still makes no sense to students.
will are looking for 10 or fewer restrict_vars which must be listed in indep_vars
What is our variable? Mine, for example, is "744. (Neg) Frequency of Divorce (VAR LABEL REVERSED)". Would it be 744? What does it have to do with "CreateModelDRWpolygyny.R"? Where does GoogleScholar come in?
- Stage 1 Choose a working "prototype", e.g, one of these: (See day 6, each of these has been slightly updated for making maps)
- all have many more indep_vars for UR/2 procedure - but if you put too many vars in restrict_vars you may get a run error - let me know! CreateModelDRWpolygyny.R [[this protototype is correct here, but where copied elsewhere is missing "marrcaptives" and "plunder" in the indep_vars]] CreateModelValueSDWchildren.R - corrected indep_vars and restrict_vars -- fixed "Sanday668","Sanday668" --> "Sanday668","Sanday669" CreateModelValueSDWchildren2.R - corrected indep_vars and restrict_vars -- fixed "Sanday668","Sanday668" --> "Sanday668","Sanday669"
Press edit, copy, and paste to your own wiki page as follows, with XYZ = YOUR THREE INITIALS, Your dependent variable e.g.,
- Toward the bottom of the program change
name<-"how society values children" alias<-"DRWchildren" to: name<-"Your topic phrase" alias<-"XYZtopic"
- Stage 2 Modifications to your own "CreateModelXYZv242.R" wiki page, with a copy of the contents of your "prototype"
- Stage 3 Change the dependent variables, see if the program works
- Stage 4 Change the independent variable
Stage 2 Modifications to your own prototype wiki page, e.g., "CreateModelXYZv242.R"
- You've made your own "CreateModelXYZv242.R" wiki page
- In your page, copy and paste: [[User:Your user name]]
- Above where you've copied contents of your prototype program
- Create a heading in your wiki page ==A Program CreateModelXYZv242.R== for your program
- In edit mode, copy contents of your page
- Use the slider on the wiki page, right side, to go to the bottom of the wiki page, and SAVE.
- Open R.
- Paste your program into into R.
- Report whether your program runs
Stage 3 Change the dependent variables and do test runs
- If your program didn't run, notify the instructor if you are in class or email him the address of your user page.
- If your program did run, you are ready to begin to change your program:
- First, change the dependent variable by substituting your variable number, e.g., v242, and remove any independent_variable that has that variable number, e.g., v242.
- Rerun your program. If it runs do item 1 in this stage 3. Once your program runs correctly, KEEP any independent_variables with pvalue <.15 and DROP any with pvalue equal or >.15. Rerun your program. If it runs do item 1 in this stage. Repeat. Now, in Stage 4 you can add independent_variables if needed.
Stage 4 Adding indep_vars
- Add an independent_variable as needed ONE AT A TIME, Repeating Stage 3.2.1 and 3.2.2. Continue if you have low R2.
- A GOOD RULE TO FOLLOW: when naming a new indep_var, use the wiki search window for the variable number, e.g., "v633." This will bring up the name previously used and help integrate your findings with others.
- When you have a successful model, add an entry for it on this wiki page with the name of your Model in double square brackets.
- If you need help from the instructor, add an entry for it on the Nonworking *Rccs* models wiki page and I will look at it
and help debug the errors that keep it from running.
If you've started the code for your project and it isn't working --> to get help
Copy the page with your code and your user name to Nonworking *Rccs* models
- SCCS 2SLS Variable Names -- dont rely heavily on the WHYTE and the PAIGE variables because they code only half or less of the sample, which creates alot of probabilistic estimating of missing data.
General polygyny with more variables DRW
User:Doug White== setwd("C:/My Documents/sccs") library(sccs) data(sccs) source("examples/src/createmodelDRWpolygyny2.R") #define model, e.g., CreateModelDRWpolygyny2.R source("examples/src/CreateModelDRWpolygyny.R") #define model, e.g., CreateModelDRWpolygyny.R - CreateModelDRWpolygyny2.R" source("examples/src/run_model.R") #for model currently defined, does multiple imputation, *calls two stage ols and saves results to file to the working directory. ols_stats$restrict_stats ols_stats$r2 ols_stats$restrict_diagnostics
Value of children
setwd("C:/My Documents/sccs") library(sccs) data(sccs)
source("examples/src/CreateModelValueSDWchildren.R") #define model CreateModelValueSDWchildren.R source("examples/src/run_model.R") #for model currently defined, does multiple imputation, *calls two stage ols and saves to file to the working directory. ols_stats$restrict_stats ols_stats$r2 ols_stats$restrict_diagnostics
General polygyny with few variables DRW
User:Doug White== setwd("C:/My Documents/sccs") library(sccs) data(sccs) source("examples/src/poly.R")
source("examples/src/create_model_DRWpolygyny.R") #define model create_model_DRWpolygyny.R source("examples/src/run_model.R") #for model currently defined, does multiple imputation, *calls two stage ols and saves results to file to the working directory. ols_stats$restrict_stats ols_stats$r2 ols_stats$restrict_diagnostics
WARNING: run_model.R will not work when you have a *.csv file open to check the last results but you dont need to do this because the output is printed to the screen by the ols_stats commands.
You will change the name of the .R file in the first line of the program and edit its contents source("examples/src/create_model_XYZv242.R") #defines the model source("examples/src/run_model.R") #for model currently defined, does multiple imputation, *calls two stage ols and saves results to file to the working directory. ols_stats$restrict_stats #these three commands print the output to the screen ols_stats$r2 ols_stats$restrict_diagnostics
after source("examples/src/create_model_XYZv242.R") #defines the model source("sccs/R/two_stage_ols.R") #loads the new code into R but doesn't run anything yet until called by "run_model.R")
Multilevel peer effects and empirical causalities in the evolution of human societies.