Chronology of class meetings fall 2010

From InterSciWiki
Revision as of 10:03, 30 November 2010 by Ahwalker (talk | contribs) (Powerpoints 29-33 due)
Jump to: navigation, search

The Soc Sci 240A course is 1.33 extra undergrad or graduate credits, and involves participating to one of our Friday on-campuses Human Complexity Videoconferences or reviewing one of the streaming videos from our past five years of speakers, writing a summary 2-3 page paper on the speaker's topic and the discussion among faculty and students. Calendar. UCI calendar



Day 1 Sept 23

First Reading: for background and motivation: Simon, Herbert A. 1954. Spurious Correlation: A Causal Interpretation. Journal of the American Statistical Association 49(267): 467-479.
  • Assignment due next class: After doing the reading:-- Hand in a 1 page summary of what you think this class is about!
  • By day three: Have chosen a topic, post on the wiki under your user name (real name! used for your signin), your topic and some references on the topic.
  • VPN: Remote access to the UCI Libraries' licensed online resources

Option for Xtra 1.33 Course Credits Sept 24 Douglas White

Human Complexity Videoconference Friday Sept 24 2010 Douglas White -- all about this class project

Day 2 Sept 28 Where to get references for your papers

Second reading: Christian Brown and Tony Eff, 2010. The State and the Supernatural: Support for Prosocial Behavior, commenting on Belief in Moralizing Gods
Discuss Thursday
Third (reports on last year's class): Causal Inference for Multilevel Networks of Early Ethnographically Well-Described Populations
Discuss Thursday: advance discussion for next class: WHITE AND WHITE Causal Inference ... reading: from First day.
  • Pick your topic (dependent variable) from sccs codebook (Cntrl-F gives you a search window for keywords)
  • Sources for codes on the SCCS: How to get readings for your topic
  • Due Day 2: Description of your choice of topic and some references on your topic

Day 3 Sept 30 working the program

Day 4 Oct 5 How to do crosstabs to test possible indep_vars

Do your 2A from a NEW 1A prototype, test results, copy 2A to a 2C program and follow these instructions carefully

The prototype programs 1A and results 1B are soooo.... much easier now. But to get to 2A you need the number and name of your dep_var. Get there and Tolga and I can help you in the classroom. Be there in class and participate or you wont progress. If you are there TODAY you can get the sketch of your project done by this THURSDAY and you will feel much better about your progress.

Run 1A to make sure it works and check your results against 1B. You'll find it easier to copy the whole of the new prototype you choose into your wiki page. Try it, there's nothing to lose, and you can save what you want from your old page (dep_var(s), copies of the dep_var(s) from the codebook, readings, etc.)

The easiest way to proceed is to copy the 1A program into a new page, that you can call 1C. Keep 1A as a program that works one you have verified that.

Now in 1C, just copy the entire contents of the indep_vars into the c(...) slot of restrict_vars, drop a few variables however or it wont work, and comment ### before the lines in the old restrict_vars. Now, when you run 1C you'll get A WHOLE LOT OF RESULT, some significant (you'll keep those with pvalue <0.125). Just edit the ones you dont want to keep from the restrict_vars list. Run again. Now you should start to see some real predictions and r2 above .20 (thats not a pvalue for significance but 20% of a 100% prediction. As you can see the polygyny prediction is now up to 47%).

To save results put a ==B...== or ==D...== results heading after an ==A...=== or ==C...== program heading to keep track of which pages in your menu are programs (A,C,...) and which results (B,D,...). FOR RESULTS, remember that when you copy results (or programs for that matter) to the wiki and IF YOU WANT TO KEEP EACH LINE SEPARATE you have to have a space at the start of each line!!!! If thats not the case, open Textpad, add the space, then copy into the page (all lines will then have a leading space), then hit Ctrl-A to hilite the text, then copy and paste back into the wiki.

Remember, you can repair your wiki pages from home, even if you have to search for textpad (its freeware) and install it at home. REMEMBER if you don't try these things out and not be afraid of practice, even from home, you will not make any progress. Get on the bus, and stay ahead. Its still VERY EARLY in the class, but don't wait till later to get on top of this class. Some have wanted to know why there are not mid-terms and finals in this class but that's not what its about. Its not about memorization or general knowledge, but about practice and developing skills and insights. And don't even dream about getting help from paper-writers, that will only lead you into serious trouble. Ask others, look at others pages, ask for help, but then learn it yourself. And there is no way to learn these kinds of skills unless you come to class. Two people last year thought they could do the work without going to class, tried to do it all at the end, failed miserably, pulled Ds or Fs and one had to take the class again (he did a much better job the 2nd time through and ended with a good grade but in twice the time and effort. So don't be dumb. I tried that once in a Russian class in college and had the same experience.)

I would not do either of the following now but save these for later-- they will help a bit but only to find ADDITIONAL variables

By additional I mean ones that are NOT ALREADY IN THE restrict_vars list: to see what these are look at the variable numbers from the codebook that appear in My_sccs(...long list...)

  • 1 here you can take one variables (instead of 1189) to be your dep_var, and the other a variable you might want to add
  • e.g., in R, check the crosstable -- do they look correlated?
setwd("C:/My Documents/sccs")
table(sccs$v1189,sccs$v238,useNA="ifany") #change the variable numbers 
  • 2 if so, you can run a significance test for this pair of variables. If the significance is very high, pvalue <0.001 for example, this will probably be a good predictor.
setwd("c:/My Documents/sccs")
tabl<-na.omit(tab)  #eliminate cases with missing data 
x=tabl[,1] #take variable for those cases
y=tabl[,2] #take variable for those cases
CrossTable(x,y,prop.r=FALSE, prop.c=FALSE, prop.t=FALSE, expected=TRUE)

Its a lot less trouble to work with variables already defined in My_sccs for you to work with

That and the full list of indep_vars (none in My_sccs are left out) are what will make your life sooooo.... much easier in this class.

If you still want to add new variables not already in My_sccs you have to

  1. take the var number, e.g., v1188, put it in the search window of the wiki, and see what the name is for that variable, say: varx=sccs$v1188 or evileye=sccs$v1188
  2. keep in mind we have to keep using the same variable names to put the results of different projects together (I do that for you)
  3. when you add that defining statement to My_sccs, place it in the appropriate place numeric series for variable numbers. Look at the names of adjacent variables.
  4. now put the name in quotes, e.g., "evil eye" in the indep_vars series, after the variable above it in My_sccs and before the variable below it in My_sccs.
  5. then you can put it a similar place in the restrict_vars list.

Day 5 Oct 7 First sketch of your paper

Thursdays the lab is open from 11:50 or earlier to 12:30, DRW often there early to give you help

The new UR/2 procedure "U-R-two" = unrestricted variables by half

You should now have lots of indep_vars

  1. to get more results, copy the first half of those variables into your restrict_vars
  2. thats MORE than before so its "unrestricted"
  3. You now get lots of variables, significant and nonsignificant, in your results. Write down those that are significant (see examples in our Working *Rccs* models page).

Next, copy your UR/2 program to a new ==A...==window and reduce the variables in the restrict_vars to the significant ones, pvalue<-.15

  1. Now rerun this edited program
  2. Save the results (fewer more significant variables)
  3. Reduce the restrict_vars list again if needed
  4. When you finish you will have all significant variables.
  5. The WALD TEST, if significant pvalue<0.10, says you have MORE variables in the indep_vars list

If so, copy your new program again to a new window and put the SECOND HALF of your indep_vars list in the restrict_vars list

  1. Repeat above
  2. Finish with all significant variables.
  3. Your model could be done by WEEK 4!

Only then if your R2 is very low would you normally consider adding new variables to my_sccs

Include references in your Day 6 paper

Sources for codes and articles on the SCCS

Sketch of project due Tues Day 6 (oct 12)

Turn in 4 pages: Outline

Topic, dep_var
Readings pertaining to topic paragraphs
Links to your program page at Working *Rccs* models‎ or Copy of your program as APPENDIX
Copy of your Results
Where you go from here
Grading 4 page sketch

Professor White,

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 ANSWER: Good question. The "list of readings" will come from the google scholar directed search

  • Some students have found pertinent readings by other types of searches
  • but what comes out of your model will shape the results in three ways:
  1. What findings support one or more readings
  2. What findings contradict one or more readings
  3. What original findings do your findings provide

Today, Oct 7, we go to 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 to Tuesday 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. Affected 1/4 of the class. IT CANT HURT YOU to turn your sketch in tomorrow however, since we make suggestions and return these pages to you when we have suggestions.

Option for the Xtra 1.33 Credits if you missed the previous Oct 8 Video Colloquium: Friday speaker Yen-Sheng Chiang

Human Complexity Videoconference Friday Oct 8 2010 Yen-Sheng Chiang Cooperation Dynamics in Networks

Day 6 Oct 12 Causality and Maps

What we learned about the program

  • 2 cases: Variables with 50 cases ( < 1/3rd ) or fewer failed with too many indep_var and restrict_var. Cutting those down helped.
  • 1 case: Variables with no discernable order to the variables failed
Solution: Either change variables or use (sccs$var==3)*1 to dichotomize at 3 vs others, or (sccs$var<1)*1 or (sccs$var>3)*1 etc.
1 case: able to use interactions: (sccs$var1)*(sccs$var777) - multiples the variables (check with me)
  • A NEGATIVE coef predicts the LOWER end of your scale (category 0 ir 1), i.e., usually with the NEGATIVE of how the variable name is worded. neg of neg is pos

Subject: Greeting from UCLA Causality-Blog

From:  	"Judea Pearl" <judea@CS.UCLA.EDU> - more talks on causality

Brown and Eff paper now published (was reading 2)

Christian Brown and Tony Eff, 2010. The State and the Supernatural: Support for Prosocial Behavior, commenting on Belief in Moralizing Gods

How to make maps with the program and put them in your paper

In the 4 proto-programs just after
  source("examples/src/run_model.R") #does for this model multiple imputation, two stage ols, saves to file to working directory.
  I added
  depvar= ... above "my_sccs(   "
  inserted these lines, keeping what comes after (the three ols_... lines of code) 
plot(lon,lat, cex=.1)
ztxt=as.character(depvar) #above "my_sccs( " -- a new line inserted: depvar= as defined in my_sccs(  

This gives the maps we have been seeing but (the NaNs for missing data are replaced with dots). Later we will have continent outlines.

Day 7 Oct 14

Tips for today

  • Use the article where your dep_var was defined as a reading -- pay attn to the definition.
  • If a variable isnt working try variables by from other studies on the same topic e.g., instead of 1650 use 892, and look at the source of the study, read then article to see what the concept was they used to do the coding.
  • var are organized by study, so look higher up in the codebook for the reference.
  • News: The jstor archive (e.g. in google searches) has page-at-a-time access only (tightening restrictions) even with VPN, can you copy paragraphs to a word file?
  • Use Courier font for your tables in Powerpoints and Papers
  • Discuss CAUSALITY: how the coef and pvalue may change for one variable with other indep_vars are added
  • In Directed search with Google Scholar: improve search with "Standard Cross-Cultural Sample" + "your topic" <-- can be one word
  • Recodes: EMAIL DRW or ask for help as with (sccs$var==3)*1 to dichotomize at 3 vs others, or (sccs$var<1)*1 or (sccs$var>3)*1 etc. Also for converting some values (e.g. User:Yiyun hung chage 0,1 to missing because irrelevant to hypothees)
  • UR/3+ strategy : if you want to cover __all__ (but 1) of your indep_vars, try taking overlapping 3rds or quarters of the list. The problem with doing ALL but 1 all at once is variable crowding which you can see in VIFs in last column of output. If higher than 3.5 then pairs of variables too similar.... etc.
  • VIF is the variable inflation factor

Thursdays the lab is open from 11:50 or earlier to 12:30, Tolga may be there early to give you help

Day 8 Oct 19

Too few cases error (N <60 cases or so, the error message is "Aliased variables") may be a problem for others: diagnostic: same results appear as in previous model

Problem after running 1A, when 2A failed because of too few cases the 1A results reappeared. Too few cases e.g., for table(sccs$v168)

1  3  4  5 
5  9  5 11

When this is the case you need to get a new dep_var (automatic extension)

variables from 1918 were not entered in the Rdata

Only Victoria Valverde affected, i.e., needs to change dep var 1988 for this reason. Sorry.

UPDATE ON How to make maps with the program and put them in your paper

In the 3 proto-programs just before My_sccs 
  I added
  depvar=(your sccs$v...)

Then add below the code for source

  source("examples/src/run_model.R") #does for this model multiple imputation, two stage ols, saves to file to working directory... above "my_sccs(   "
  Replace or add  these lines, keeping what comes after (the three ols_... lines of code) 
 plot(lon,lat, cex=.1)
 ztxt=as.character(depvar) #above "my_sccs( " -- a new line inserted: depvar= as defined in my_sccs(  

How not to cheat and get caught

In one of our studies there is a 5A and 5B but 5B does not come from 5A. The obvious inference is that the student is not doing their own work but the person helping them is working from a separate computer from home and pasting results to the wiki. Do your own work! No penalty, just advice.

initial Grades coming out today

They are a bit lower than we would like on average, and some people have yet to turn in the 4pp and the 1-page. This may cause one of your grades to be blank. Any written assignment, however, can be resubmitted. This being a writing class, you can thus bring your grade up!

Learn from error messages

  • Error in eval(expr, envir, enclos) : object 'nonmatrel' not found. Some of your variables are not in my_sccs.
  • Aliased variables. Two variables with the same sccs$v### or contents, i.e., duplicates.

Avoid synonymous variables

  • E.g., "Political integration" and "Levels of Political jurisdiction"

Day 9 Oct 21

Close and restart R between runs

if not you may just bet the results of the last, DOESNT TELL YOU THERE ARE ERRORS

TO find errors, use cursor in R to go up the execution

GO TO THE HIGHEST (EARLIEST) ERROR - email to Doug or Tolga

Dichotomies again

Its easy. For dep_var or indep its just, for example


whatever the variable (here 111) number is, this will dichotomize 3 versus all other categories of the variable


will dichotomize 1,2,3,4 versus 5 and above. IF INDEPVAR dont forget the comma

Thursdays the lab is open from 11:50 or earlier to 12:30, DRW often there early to give you help

Xtra 1.33 Credits Oct 22 TBA

Complexity talk on Modeling of the Logical Structure of Kinship Terminologies

Abstract: Kinship systems in human societies as expressed through kinship terminologies are cultural constructs built over, but not determined by, the biological facts of reproduction. Historically, kinship terminologies have been presumed to be a natural taxonomy with kin terms labeling categories of genealogically defined relations, despite extensive ethnographic evidence to the contrary. Instead, kinship terminologies are a system of symbols forming a computational system (a kin term space), much like numbers are a computational system of symbols. Consequently, a terminology has a generative structure and that generative structure can be modeled algebraically. The algebraic modeling provides a logical account for the properties of kinship terminologies and a way to meaningfully explore structural differences among terminologies. The idea of a kinship space will be introduced as a way to integrate together the concepts of a family space, a genealogical space and a kin term space.

Dwight Read is Professor of Anthropology at UCLA and head of the UCLA undergraduate program in Human Complexity

Day 10 Oct 26

Map instructions - a bit of code at the end, open here

If diagnostics dont come out, hit enter to execute the last line in the code

Map code just add the ztxt<-gsub("NaN",".",ztxt) line to your code

#after "source (..."  and before  "ols_stats$restrict_stats" insert
plot(lon,lat, cex=.1)
ztxt=as.character(depvar) #above "my_sccs(" -- a new line inserted: depvar= as defined in my_sccs  

If results for same model differ, but them both into the Results page

A variable may be significant in one, not the other -- can still keep as part of the model.

Errors: Did you remove your depvar from the indep_var and restrict_var lists???

After running program, close R, open R for next run

However, if you are changing only the restrict_var (and/or indep_var) code, you can run the code from there to save time

Literature -- start using to compare to your model (see below)

Sccs guided search

Google scholar: "Standard Cross-Cultural Sample" + your topic variable idea

To get help between classes, work on your wiki site in class

What do the variable names mean in your independent variables? How to tell?

  1. seach wiki for that name e.g., Whyte620, get the variable number.
  2. open codebook, (search wiki for "codes") search for that number: e.g., 650
  3. Copy that variable definition into your wiki pages, e.g., 650. Physical Punishment of the Spouse Condoned
  4. look again in the codebook, at the top of that series of variables, for the author of that code
  5. e.g., for Whyte620, its THE RELATIVE STATUS OF WOMEN, Whyte, Martin K. 1978. ETHNOLOGY 17:211-237. Cross-Cultural Codes in Barry and Schlegel 1980. If you look it up as Google scholar: "Standard Cross-Cultural Sample" + "RELATIVE STATUS OF WOMEN" you will find it as an article.

Copying your findings into POWERPOINT our your paper: Use courier font to align columns

Day 11 Oct 28

2 Powerpoint presentations 2-3 from Thursday Day 11

References: not general sociology, research on families, child training but "Standard Cross-Cultural Sample" articles from DIRECTED SEARCH in Google Scholar

Remove variables from restrict_vars that are Synonymous with your dep_var

  • Dont just remove from your output, remove from restrict_vars and rerun program to get new output

Papers and PPTS: make sure you don't talk about variables having causality, check here instead

Its the direction of the RELATIONSHIP between the specific codes in the variables not the name of the variable!!!

Powerpoints: make sure

  • make sure you dont have a synonym for your dep_var in your indep_var and restrict_var list !!
  • make sure you check your variable in the codebook as for DIRECTION along with the SIGN (DIRECTION) of your indep_variable

Powerpoints outline

  • Intro to your problem, literature, questions, hypotheses, background
  • Results, page 1: the model indep_vars R2, COURIER FONT TO ALIGN COLUMNS
what they mean
some codebook definitions if needed
  • Results, page 2 Diagnostics COURIER FONT TO ALIGN COLUMNS (let DRW do the comments here)
  • What work needed on the model, new ideas
  • How results compare with the literature
  • Alternative models, if and (can be discussion or illustration)
  • General summary of what the results show, importance

Making and Saving maps

 make sure you have (new line)
 just before


  plot(lon,lat, cex=.1)
  ztxt=as.character(depvar) #depvar= as defined above my_sccs(  

maps your dep_var

if you want to map a new variable

setwd("C:/My Documents/sccs")
 sccs$v777 #(your variable): then insert sccs$v777 over depvar above, and rerun
  plot(lon,lat, cex=.1)
  ztxt=as.character(sccs$v777) #depvar= as defined above my_sccs(  
  • You have to do the following with a PC or in class, not the Mac

Click on your map. In the upper left of the R window, click \File and \Save as. Save as .PNG Make note of where it is saved

Now on the LEFT of the WIKI below search and under toolbox you will see

  • Upload file: click this, navigate to where your map is saved, upload your map using your map label, e.g. sccs$v777, at the name of the file.
  • Click forward to get the final map.
  • Copy the name IMAGE:sccs$v777 into your buffer.
  • Go to the wiki page where you want the map:
this should be where your final model results are located
  • Then open edit that page copy IMAGE:sccs$v777 on that page and put brackets and other information, e.g.
Label of your variable. This is the legend of your map
  • SAVE

Thursdays the lab is open from 11:50 or earlier to 12:30, DRW often there early to give you help

Day 12 Nov 2

Our first two powerpoint examples in pdf

Second powerpoint presentation

2 powerpoint presentations 3-4. 5-16 on Tuesday Day 12

In class demo of saving a map

if you want to map a new variable

setwd("C:/My Documents/sccs")
sccs$v750 #(your variable)
 plot(lon,lat, cex=.1)
 ztxt=as.character(sccs$v750) #<---change this too 

Compare to languages map


Source of new program error: adding language and distance to restrict_vars

Day 13 Nov 4

Thursdays the lab is open from 11:50 or earlier to 12:30, DRW often there early to give you help

Xtra 1.33 Credits Nov 5 THIS TALK CANCELED


Day 14 Nov 9 Only 5 days of class left to give these presentations!

Lineup of potential powerpoint presentations 5-20 on Tuesday Day 14

Veteran's Day No Class - Tolga has Friday office hours @11:00

Day 15 Tues Nov 16

Lineup of potential powerpoint presentations 7#== 10 on Thursday Nov 16 Day 15

Day 16 Thurs Nov 18

Thursdays the lab is open from 11:50 or earlier to 12:30, DRW often there early to give you help

Lineup of potential powerpoint presentations 11#== 26 on Thursday Nov18 Day 16

Day 17 Tues Nov 23 (only 2 days left after today for powerpoints)

When is the last day we can turn in our research paper?

> Friday of exam week

Lineup of powerpoint presentations 16#== 28 on Tues Nov 23 Day 17

Happy Thanksgiving, from Doug :) and Tolga :)

Day 18 Nov 30

Lineup of potential powerpoint presentations 21#== 28 on Tues Nov 30 Day 18

Please everyone with a final model document your model with this one extra element, easy to do

Please look at Edu-Mod_2009-10:_The_Individual_Studies#EduMod-59:_Imputation_and_Regression_-_155.3C.3D17_155_Money_TJ and not the addition of variable numbers to the right of the named variables (rows of varnames, coef. & significance tests). Then do the same at your entry on that Edu-Mod_2009-10:_The_Individual_Studies page

                                                    what to add |  i.e., look up and add your variable numbers
fyll        -1.2333233 13.725209 1.504065e+02 0.00029666 4.078  |
fydd         1.1050277 25.514472 6.965334e+03 0.00000045 3.412  V
fratgrpstr   0.2502255  6.773247 9.276634e+00 0.02794422 1.954 v570
cereals     -0.2937851  2.384662 2.749067e+04 0.12254291 1.406 v233==6)*1
milk        -0.4173179  3.437748 2.332840e+02 0.06498469 1.598 v245>1
popdens      0.3148705 22.526657 1.362230e+05 0.00000207 1.652 v156
superjh      0.4152110 25.214029 2.335964e+03 0.00000055 1.642 v237

This will enable me to put together this fall's results with those of last year. Thanks, DRW.

Day 19 Dec 2

Powerpoints 29-33 due

  • 29#== User:Sbakshi#5B v36 Magical protectiveness DRW: which variable? there are many Sharon: child development no work since 5 Oct Bakshi I am really sick. I've missed all my other classes as well
  • 30#== 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.
  • 0#== User:Po Huang#8B Premarital Sex Attitudes- Female no work since 28 Oct but now finished
  • 0#== User talk:Marforid Duane Marfori not coming to class at all - was emailed
  • 0#== v1009 W_Sys_labor User:Ahwalker Amani Labor – out of class 5 weeks - no response to email  :Sick or almost finished :Thought I had dropped the class; didn't know I couldn't after week 2; really need to catch up, hoping it's possible