+ All Categories
Home > Documents > Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to...

Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to...

Date post: 06-Aug-2020
Category:
Upload: others
View: 9 times
Download: 0 times
Share this document with a friend
13
Intro R
Transcript
Page 1: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Intro R

Page 2: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Descriptive Statistics

• Descriptive statistics includes methods for organizing,

summarizing and visualizing data

Page 3: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Descriptive and Inferential Statistics

• Descriptive statistics includes methods for organizing,

summarizing and visualizing data

• Inferential statistics involves

(i) generalizing from a sample to the population from

which the sample was selected

(ii) assessing the reliability of such generalizations

But remember all the difficulties linguists have to

assemble a representative sample! This makes it rather

unsafe to generalize from a sample to the population.

We come back to this point when discussing tests.

Page 4: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

23-04 Getting to know R: R syntax, data structures

30-04 Working with R: getting datasets, producing contingency tables, plots

07-05 Working with R: merging datasets, making maps

14-05 Working with R: hypothesis testing: Chi square and correlations

Roadmap for R classes

Formulate research question

Decide what and

how to measure

Collect data

Summarize data Analyze

data

Interpret results

Report results

Data representation & analysis Goals: produce different ways of representing data and testing hypotheses. Assignment (.2) at the end

Page 5: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

What is R?

R is a language and environment for statistical

computing and graphics.

It’s an open source solution to data analysis

that’s supported by a large and active

worldwide research community.

Page 6: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Why use R?

• R is free!

• Just about any type of data analysis can be

done in R.

• R has state-of-the-art graphics capabilities.

Page 7: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Why use R?

• R can easily import data from a wide variety of

sources

• R runs on a wide array of platforms

• R has excellent on-line support

Page 8: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Disadvantages

• ease of use: work with a command line rather

than a graphical user interface (GUI),

i.e. typing instructions rather than pointing,

clicking, and dragging things with a mouse may

take a little getting used to.

Page 9: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Getting started

If you are using Windows, launch R from the

Start Menu. On a Mac, double-click the R icon

in the Applications folder.

Page 10: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Workspace PC with R console

Page 11: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

Workspace Mac with R console

Page 12: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

The editor window

• there are three windows that you use in R

– the console

– the graphics window (or quartz in MacOS)

– the editor window to write and save collections

of commands

Page 13: Intro R - comparativelinguistics.uzh.ch · Intro R . Descriptive Statistics ... 23-04 Getting to know R: R syntax, data structures 30-04 Working with R: getting datasets, producing

The editor window

In the editor window, you can type all the commands, or scripts (series of commands) you want to be able to reproduce fast.


Recommended