SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction to

more avatar
20 diapositives · 304 Views · Aug 26, 2014

Introduction to. Alejandro Buren & Paul Regular. BIOL 7220 September 2012. What to expect from this workshop. Intro to R Data summaries Create plots Run General linear models Easily extensible to glm, gam, glmm, gamm BUT you have to know what you’re doing.

Introduction to - slide 1
01 / 20Introduction to
1 / 17

Télécharger la présentation

Introduction to
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Introductionto Alejandro Buren & Paul Regular BIOL 7220 September 2012

  2. What to expect from this workshop • Intro to R • Data summaries • Create plots • Run General linear models • Easily extensible to glm, gam, glmm, gamm • BUT you have to know what you’re doing

  3. What NOT to expect from this workshop • A course in statistics • A showcase of R’s capabilities

  4. What is R? • Environment and language for • Statistics • Graphics • Etc. • Open source

  5. Why use R? • It’s FREE! • Flexible • One stop shop • Large up-front cost, but BIG payoff • Growing number of users • Expansive!

  6. Download & Install • Program • R & Tinn-R installed? • Packages • Required to use statistical and graphical packages not included in the base package • Install once • Load each new session

  7. Vectors • R has symbolic vectors which can be assigned values • The traditional way to do this in R is the ’<-’ operator • Possible vector names flexible • Vector names cannot start with a digit • Names are case-sensitive • Some common names are already used by R • c, q, t, C, D, F, I, T,

  8. Functions • MANY built in functions • log() • exp() • sin() • sqrt() • mean() • max() • Etc.

  9. Data Types • Vectors (Numeric, Character, Logical) • Matrix • All columns in a matrix must have same mode • Array • N-dimensional matrix • Dataframe • Columns in a data frame can have different modes. Similar to SAS and SPSS datasets • Lists • Collection of objects, can be different modes and dimensions • Factor

  10. Data Management • Import & Export • Useful functions • subset • na.omit • cbind, rbind • sort • summaryBy • Operate over dataframe • Random numbers

  11. Good Practice • Set up a working directory • Comment on each line of code • Avoid attach function • Define parameters in first lines of code • Use standard format • use.dots, OrCapitals, avoid spaces anywhere • Clean up

  12. Statistics & Graphics • Working example • Look at data • Graph data • Run one regression and one ANOVA

  13. HELP! • Useful websites • Official site (http://www.r-project.org/) • Manuals found on this site (http://cran.r-project.org/manuals.html) • R search site (http://finzi.psych.upenn.edu/search.html) • Quick-R (http://www.statmethods.net/index.html) • R graphics gallery (http://addictedtor.free.fr/graphiques/) • Books • The R Book • Etc. • List serve • ?function

  14. Useful Packages...for us • Statistical • VEGAN • lme4 • gam • nnet • Rcmdr • Graphical • lattice • Rcmdr • gplots • Data management • RODBC • doBy • reshape

  15. Possibilities... • Customized graphics... • Complex statistics...

  16. GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA

  17. GENERALIZED LINEAR MODELS Linear combination of parameters R: glm() Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian

  18. GENERALIZED ADDITIVE MODELS R: gam() GENERALIZED LINEAR MODELS Linear combination of parameters R: glm() Non-linear effect of covariates Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian

  19. Fixed effects model Random effects model