• Date:13 Sep 2020
• Views:0
• Pages:54
• Size:543.70 KB

Share Pdf : A Short Introduction To For Epidemiology Bendix Carstensen

Download and Preview : A Short Introduction To For Epidemiology Bendix Carstensen

Report CopyRight/DMCA Form For : A Short Introduction To For Epidemiology Bendix Carstensen

Transcription:

1 Getting R running on your computer 1,1 1 What is R 1. 1 2 Getting R 1,1 2 1 Starting R 1,1 2 2 Quitting R 2. 1 3 Working with the script editor 2,1 3 1 Rstudio 2. 1 3 2 Try 3,1 4 Changing the looks 3,1 4 1 of standard R 3. 1 4 2 of Rstudio 3,1 5 Further reading 4,2 Some basic commands in R 5.
2 1 Preliminaries 5,2 2 Using R as a calculator 5,2 3 Objects and functions 6. 2 4 Sequences 7,2 5 The births data 7,2 6 Referencing parts of the data frame 8. 2 7 Summaries 9,2 8 Turning a variable into a factor 9. 2 9 Frequency tables 10,2 10 Grouping the values of a metric variable 10. 2 11 Tables of means and other things 11,2 11 1 Other tabulation functions 12.
2 12 Generating new variables 12,2 13 Logical variables 12. 3 Working with R 14,3 1 Saving the work space 14,3 2 Saving output in a file 14. 3 3 Saving R objects in a file 15,3 4 Using a text editor with R 15. 3 5 The search path 16,3 6 Attaching a data frame 16. 4 Graphs in R 18,4 1 Simple plot on the screen 18,4 2 Colours 19.
4 3 Adding to a plot 19,4 3 1 Using indexing for plot elements 20. 4 3 2 Generating colours 21,4 4 Interacting with a plot 21. 4 5 Saving your graphs for use in other documents 22. 4 6 The par command 22,5 The effx function for effects estimation 23. 5 1 The function effx 23,5 2 Factors on more than two levels 24. 5 3 Stratified effects 25,5 4 Controlling the effect of hyp for sex 25.
5 5 Numeric exposures 25,5 6 Checking on linearity 26. 5 7 Frequency data 26,6 Dates in R 27,7 Follow up data in the Epi package 29. 7 1 Timescales 29, 7 2 Splitting the follow up time along a timescale 30. 7 3 Cutting time at a specific date 34,7 4 Competing risks multiple types of events 36. 7 5 Multiple events of the same type recurrent events 37. References 40,8 R command sheet 41,Getting help 41.
Input and output 41,Data creation 42,Slicing and extracting data 42. Variable conversion 43,Variable information 43,Data selection and manipulation 43. Matrices 44,Advanced data processing 44,Strings 44. Dates and Times 45,Plotting 45,Low level plotting commands 46. Graphical parameters 47,Lattice Trellis graphics 48.
Optimization and model fitting 48,Statistics 48,Distributions 49. Programming 49,The Epi package 49,Getting R running on your computer. 1 1 What is R, R is free program for data analysis and graphics It contains all state of the art statistical. methods and has become the preferred analysis tool for most professional statisticians in. the world It can be used as simple calculator and as a very specialized statistical analysis. and reporting machinery, The special thing about R is that you enter commands from the keyboard into a console. window where you also see the results This is an advantage because you end up with a. script that you can use to reproduce your analyses a requirement in any scientific. The disadvantage is that you somehow have to find out what to type The practicals will. contain some hints and you will mostly be using R as a calculator as you just saw type. an expression hit the return key and you get the result. 1 2 Getting R, You can obtain R which is free from CRAN the Comprehensive R Archive Network at.