46
ISC 4244C Computer Applications in Psychology with Lab Dennis E. Slice Tuesday, January 8, 13

ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

ISC 4244C

Computer Applications in Psychology with Lab

Dennis E. Slice

Tuesday, January 8, 13

Page 2: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

The Instructor• Name: Gordon Erlebacher

• Department: Scientific Computing (http://www.sc.fsu.edu)

• Course site: Blackboard (http://campus.fsu.edu (grades) and http://www.sc.fsu.edu/~gerlebacher/psych (lectures and assignments)

• Background:

- Fluid Dynamics

- Computer Simulations

- Visualization

- Gaming

- Morphometrics (shape analysis)

- Alternate instructor: Dennis Slice)

Tuesday, January 8, 13

Page 3: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Teaching Assistants

• The class has one section

• Class: HWC, room 2401 T-R (9:30-10:45 am)

• Labs: PDB A0105 Wed. (3:35-5:30)

• TA (graduate student in SciComp):

- Danial Smith, [email protected]

Tuesday, January 8, 13

Page 4: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Our Society• Driven by technology

• Rate of change is increasing

• The rate of the rate of change is increasing

• In “Future Shock”, (1970) Toffler predicts the accelerating rate of technological innovation and the increasing inability of human beings to cope, leading to depression, and other problems.

- http://en.wikipedia.org/wiki/Future_Shock

• The ability to adapt to technological change will increase marketability

Tuesday, January 8, 13

Page 5: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Eunice Mae Boland(1889-1988)

• Household electricity

• Automobile

• Air travel

• Telephone

• Television

• Space travel

Tuesday, January 8, 13

Page 6: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Our Society

• Current unemployment: 7.8% (http://www.bls.gov)

• Bachelor's degree or higher: 4.1%(http://www.bls.gov)

• Students with computer skills also have better job prospects

Tuesday, January 8, 13

Page 7: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Assignments

Assignments consist of (approximately) weekly lab reports, which include abstract, statement of work, questions posed, results, and conclusions. The report also includes graphs, explanations, and source code, as necessary for clarity. Using the web for examples and tutorials is fine, as is seeking conceptual help from each other. However, credit to other people's work is mandatory, and copying from a classmate or other source is strictly prohibited! Students should expect to spend 3-5 hours per week outside of class for assignments.

Tuesday, January 8, 13

Page 8: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Course ObjectivesAt the end of this class, the student will

• be able to use the internet (e.g., Google) to perform complex searches

• be able to work with typical datasets from animals and humans used in the field of psychology.

• be able to input and output datasets using R.

• be able to restructure, and extract subsets from, datasets using R.

• be able to combine multiple datasets and extract information for analysis using R

• be able to read and write data files to a storage device

• be able to backup critical files on their computers and restore the data

Tuesday, January 8, 13

Page 9: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Attendance PolicyStudents are strongly encouraged to attend all classes (both lectures and labs). Successive weeks build upon one another; thus, catching up on missed work becomes increasingly difficult. Students who do not attend regularly will have a hard time making good grades. Unannounced, in-class quizzes are designed to encourage study and attendance.

Lab reports must be submitted on the stated due date, unless the absence is excused. Points will be removed from late assignments as indicated in syllabus section on grading.

Consistent with University policy, excused absences include documented illness, deaths in the family and other documented crises, call to active military duty or jury duty, religious holy days, and official University activities. These absences will be accommodated in a way that does not arbitrarily penalize students who have a valid excuse. Consideration will also be given to students whose dependent children experience serious illness. Documented attendance at scientific conferences also is excused.

When absences occur for any reason (excused or otherwise), it is the student's responsibility to get notes and other pertinent information from another student as soon as possible, carefully go over the notes, and then come to the instructor and/or TA to discuss anything that is at all unclear. It also is the student's responsibility to complete missed homework assignments in a timely fashion.

Collect the names, phone, and email of four people who are sitting by you so you can exchange notes if necessary. (If you came in late on the first day of this semester, or you added this class after the first day of classes, be sure to get this information from 4 people as soon as possible.) If you are absent for any reason, you will need to have classmates you can contact for notes and information about what you missed. You do not have the option of sending a mass email to the class to ask for

Tuesday, January 8, 13

Page 10: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Courtesy

Students should be punctual, and remain in class until dismissed. If you must leave class early, please let the instructor know before class begins.

No phone calls or texting during class - turn phones off!

Tuesday, January 8, 13

Page 11: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

GradingThe course grade will be based on the laboratory component of the class and in-class quizzes. There will be no formal exams. Each week (give or take), there will be a new lab assignment, part of it done during the scheduled lab, part at home. The lab work supports the coursework given during the class lectures. All homework is to be returned by email. All files are to be in .pdf format.

Each lab report has a maximum grade of 100. Late reports are subject to grade reduction. Each report: 1 day late = -10 pts; 2 days = -15 pts; 3 days late = -30 pts; one week late = -40 pts; beyond one week = grade of 0.

There will be up to ten unannounced, in-class quizzes. Each worth 10 points. Full credit will be given for any quizzes not given in class, and the cumulative total will be counted as a single lab report (100 pts).

The scale for the grades will be A (90-100%), A- (87-89%), B+ (83-86%), B (77-82%), B- (73-76%), C+ (69-72%), C (63-68%), C- (59-62%), D+ (56-58%), D (53-55%), D- (50-54%) and F (<50%).

Tuesday, January 8, 13

Page 12: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Academic Honor Policy

The Florida State University Academic Honor Policy outlines the University’s expectations for the integrity of students’ academic work, the procedures for resolving alleged violations of those expectations, and the rights and responsibilities of students and faculty members throughout the process. Students are responsible for reading the Academic Honor Policy and for living up to their pledge to “. . . be honest and truthful and . . . [to] strive for personal and institutional integrity at Florida State University.” (Florida State University Academic Honor Policy, found at http://dof.fsu.edu/honorpolicy.htm.)

Tuesday, January 8, 13

Page 13: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

American with Disability Act

Students with disabilities needing academic accommodations should: 1) register with and provide documentation to the Student Disability Resource Center (SDRC); 2) bring a letter to the instructor from SDRC indicating you need academic accommodations. This should be done within the first week of class. This and other class materials are available in alternative format upon request.

For more information about services available to FSU students with disabilities, contact the:Student Disability Resource Center874 Traditions Way108 Student Services BuildingFlorida State UniversityTallahassee, FL 32306-4167(850) 644-9566 (voice)(850) 644-8504 (TDD)[email protected]://www.disabilitycenter.fsu.edu/

Tuesday, January 8, 13

Page 14: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Free Tutoring from FSU

For tutoring and writing help in almost any course at Florida State University, visit the Academic Center for Excellence (ACE) Tutoring Services’ comprehensive list of tutoring options - see http://ace.fsu.edu/tutoring or contact [email protected] for more information. High-quality tutoring is available by appointment and on a walk-in basis. These services are offered by tutors trained to encourage the highest level of individual academic success while upholding personal academic integrity.

Tuesday, January 8, 13

Page 15: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Syllabus Change Policy

Except for changes that substantially affect implementation of the evaluation (grading) statement, this syllabus is a guide for the course and is subject to change with advance notice.

Tuesday, January 8, 13

Page 16: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Course ContentEach week is dedicated to one topic related to programming. Topics were selected to provide psychology students with practical skills and tools that can help them in their research, as well as make them more competitive for graduate/professional school and/or jobs. All topics will be studied with the help of the language "R." Topics include (one or two weeks per topic):

• internet searching

• concepts of the language R

• data protection and backup

• reading and writing datasets

• preparing data for analysis, data restructuring

• signal and image manipulation

Tuesday, January 8, 13

Page 17: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Course Description

This course gives the students practical knowledge of a powerful programming language, "R", with application to computational and research elements important to the field of psychology. Topics include data manipulation and analysis, image and audio manipulation, etc. all in the context of using a variety of software tools and packages.

Tuesday, January 8, 13

Page 18: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Textbook

• No required book. Resources are available on the internet. Recommended book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700, Publ: O'Reilly Media, 614 pp., 2010.

• There are many tutorials on the Web. Links will be provided throughout the course.

Tuesday, January 8, 13

Page 19: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Our Society

• At the moment, unemployment is around 7.8%

- does not count those who are no longer searching for jobs

• Jobs are biased to those

- with computer skills

- technological skills

- mathematical and engineering skills

• More and more, we are becoming a push-button society

Tuesday, January 8, 13

Page 20: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Course Objectives• Gain an appreciation of the multitude of software packages (much of it

free) to help in a variety of tasks

- graphical, audio, presentation, database (might not be covered)

• Learn to manipulate data with a very powerful computer language called “R”

- perform statistical analyses of experiments

- visualize data

- input and output your data from these programs in a variety of formats

• generally gain an appreciation of the diversity of tools at your disposal to accomplish a variety of tasks related to your psychology research

Tuesday, January 8, 13

Page 21: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

What we will not do

• Learn the theoretical intricacies of computer program

- The programming will be developed slowly and remain practical

• Make use of mathematics to illustrate our points

- Instead, we will strive to develop intuition, practical know-how to help achieve precise research objectives

Tuesday, January 8, 13

Page 22: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Expected Difficulties• R is a language that requires typing

• R is not menu-driven

• R requires a new way of thinking that is very empowering (the language can be extended)

• R is very powerful

• We will take it slow

• I expect continuous feedback from the students, in-class questions, and discussion, for best results

Tuesday, January 8, 13

Page 23: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Data

• Psychology is a discipline that covers many facets of our lives

- social, sports, mental, education, etc.

• Data collection is ubiquitous. Serves to provide information against which experiments are performed to learn about what makes us tick

• This data takes many forms (files, tables, sound, images) and comes from many sources (databases, Excel files, the internet, regular files)

• These files have many formats (csv, regular text, binary, proprietary formats)

Tuesday, January 8, 13

Page 24: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

How we Proceed

• In this class, we develop the basics of R and apply it to solve various problems of interest to Psychologists

• Very important: we will program on a computer in class, “on the fly”.

- This will demonstrate how to proceed when the instructor makes errors

- Students will be encouraged to ask questions, suggest experiments

- You will get to witness internet searches on topics not known to the instructor

Tuesday, January 8, 13

Page 25: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Structure of the Course

• Tuesdays/Thursdays

- 12:30 pm - 1:45 pm

- lecturing

• Monday or Thursday

- 2 hours of lab, leading to a lab report

- the lab might require up to 3-5 additional hours of work to complete

- some topics will have labs over a period of two or more weeks (we will remain flexible since this is a relatively new course)

Tuesday, January 8, 13

Page 26: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Grading

• No midterm

• No final

• Unannounced, in-class quizzes – grades summed and counted as one lab report.

• 100% of the grade is based on the lab reports.

- each lab report will count equally and will be graded on a maximum score of 100

- at the end of class, these grades will be averaged

Tuesday, January 8, 13

Page 27: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Prerequisites

• General Psychology• One statistics course

Tuesday, January 8, 13

Page 28: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Research Methods in Psychology (useful course, not required.)

• Learned to pose questions

• Learned to set up an SPSS analysis

• Learned some the tools in SPSS to accomplish tasks

• Learned about

- Probability, statistics, hypothesis testing, regression, ANOVA

- What else was learned?

• The examples used were probably manufactured, and simplistic to help learn the concepts

Tuesday, January 8, 13

Page 29: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

In this course ...• We will use “real” datasets used by the faculty in the

Psychology department

• We will learn to (using R)

- read the data sets

- clean up, transform, and work with the data

- compute statistics with the data

• Use graphics, image analysis, audio analysis to help develop a broader picture of what is “out there” to help analyze data

Tuesday, January 8, 13

Page 30: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

At the end of the course ...

• You will have used a variety of “free” software to accomplish a range of tasks

• Essentially, you will have acquired “practical” experience

• You will be more aware of what is available and where and how to find it

• You will have learned the basics of accomplishing tasks with a powerful programming language such as R

Tuesday, January 8, 13

Page 31: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

First Task (first Lab)

• Install RStudio on your laptops

- Mac: http://cran.r-project.org/bin/macosx/

- Windows: http://cran.r-project.org/bin/windows64/

- Window: http://cran.r-project.org/bin/windows/

- Linux: http://cran.r-project.org/bin/linux/

• Throughout the course, you will be installing a variety of software

Tuesday, January 8, 13

Page 32: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Software

• R: programming language, extremely powerful, but not super fast

• Audacity: program to manipulate sound

• ImageJ: program to manipulate images

• There may be more at a later stage of the class, depending on our progression

Tuesday, January 8, 13

Page 33: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Datasets used in this course

• We have chosen datasets of three types:

- textual

- audio

- graphical

• The labs will operate on the various datasets obtained from ongoing research in the Psychology Department to make them relevant

Tuesday, January 8, 13

Page 34: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Location of Datasets

• Datasets (and other files) will be made available on the course website

• http://www.sc.fsu.edu/~gerlebacher/psych

Tuesday, January 8, 13

Page 35: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Next Lessons

• Internet Queries

- Search engines

- Boolean searches

- Google, Bing, etc.

• Basics of R

- the command line

Tuesday, January 8, 13

Page 36: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Face to FaceThe Perception of Automotive Design

S. Windhager, D. E. Slice, K. Schaefer,

E. Oberzaucher, T. Thorstensen,

and K. Grammer

From the work of Dennis Slicein the Department of ScientificComputing

Tuesday, January 8, 13

Page 37: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Evolutionary Sensitivityfor

Tuesday, January 8, 13

Page 38: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Faces in Cars?

Tuesday, January 8, 13

Page 39: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Cars

...

Tuesday, January 8, 13

Page 40: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Ratings

child-adultsubmissive-dominant

arrogantfriendly-hostile

angrymale-female

afraidhappy

surprisedagreeable

open

content

aroused

disgusted

extroverted

sad

neurotic

conscientious

I like the car

Does this car have a face?

Tuesday, January 8, 13

Page 41: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

PC Plot

Tuesday, January 8, 13

Page 42: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Morphometrics

Tuesday, January 8, 13

Page 43: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Partial Least-Squares

child-adult, male-female, friendly-hostile, submissive-dominant, angry, afraid

Tuesday, January 8, 13

Page 44: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Let's Face It

Tuesday, January 8, 13

Page 45: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

Approved Reading

Tuesday, January 8, 13

Page 46: ISC 4244C Computer Applications in Psychology with Labgerlebacher/course/comp_apps_psych_2014/... · book: R in a Nutshell, a Desktop Reference, by Joseph Adler, ISBN-13: 978-0596801700,

The Other Extreme

Tuesday, January 8, 13