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

Post on 06-Aug-2020

9 views 0 download

transcript

Intro R

Descriptive Statistics

• Descriptive statistics includes methods for organizing,

summarizing and visualizing data

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.

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

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.

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.

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

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.

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.

Workspace PC with R console

Workspace Mac with R console

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

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.