Dynamic Report using Brew in R

Source :

Skip to content
# My Analytics Blog

## Dynamic Report using Brew in R

## A very brief introduction to multilevel models

## Package ‘tibble’ in R

## Data sources

## mapply in R – an example

## Introduction to R – Graphics and Analysis

## Loop using apply in R

## apply and tapply in R

## Interpreting logit/logistic – by ATS UCLA

## Analysis example of logit models using R – from ATS UCLA

A blog -hopefully- with good balance of epidemiology and statistics

What is ‘tibble’ package?

According to Hadley Wickham “Tibbles are a modern reimagining of the data.frame, keeping what time has proven to be effective, and throwing out what is not.

The name comes from dplyr: originally you created these objects with tbl_df(), which was most easily pronounced as “tibble diff”. “

Find its similarities and dissimilarities with data.frame. More info here : tibble

You can dowload some interesting data from here http://www.nhtsa.gov/FARS

mapply() looks like an interesting function in R. here an example of what you can do with mapply() function

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
library(powerSurvEpi) ssizeEpi.default(power, theta, p, psi, rho2, alpha = 0.05) #Arguments #power postulated power. #theta postulated hazard ratio. #p proportion of subjects taking value one for the covariate of interest. #psi proportion of subjects died of the disease of interest. #rho2 square of the correlation between the covariate of interest and the other covariate. #alpha type I error rate. #example #set power at 80%, 90% and 95% #set proportion at 30%, 40% and 50% mapply(function (sprop,spsi) ss<-ssizeEpi.default(power=0.8, theta=1.5, p=sprop, psi=spsi, rho2=.3, alpha = 0.05), sprop =c(0.30,0.60,0.90,0.80,0.60,0.80,0.60,0.70,0.70), spsi =c(0.43,0.55,0.78,0.54,0.67,0.58,0.46,0.22,0.32) ) |

The results are :

1 |
[1] 756 517 972 790 425 735 618 1477 1015 |

A nice writing by:

J H Maindonald Centre for Mathematics and Its Applications, Australian National University

Contents include

- Getting started with R
- Plotting
- Analysis with General Linear Model
- Multivariate analysis (includes Tree)
- Using function in R

questions:

- log odds
- odds ratios
- probability
- interaction

http://www.ats.ucla.edu/stat/mult_pkg/faq/general/odds_ratio.htm

nice written by ATS UCLA team (as always)

- describing data
- estimation
- plotting