Skip to content

Commit

Permalink
#3 finalized modelling part
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrauschert committed Jul 26, 2019
1 parent eb02179 commit 92e86d9
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 91 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added R/.DS_Store
Binary file not shown.
11 changes: 10 additions & 1 deletion R/03_analysis_modelling.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ model_day2_day3 <- lm(day3 ~ day2, data=no_out)
summary(model_day2_day3)
```



### Use the broom package to get tidy outputs from <code>lm()</code>

```{r broom , exercise=TRUE, warning=FALSE}
Expand All @@ -180,6 +182,13 @@ tidy(model_day2_day3)
#glance(model_day2_day3)
```

### Make the summary table publication ready

```{r summ_tabel, exercise=TRUE, warning=FALSE}
export_summs(tidy(model_day2_day3))
```


### <code>jtools</code> for publication ready tables and plots

```{r jtools, exercise=TRUE, warning=FALSE}
Expand Down Expand Up @@ -273,7 +282,7 @@ glm(smoker ~ male, data=no_out, family=binomial(link='logit'))

## Linear mixed effects models

Linear mixed effects models work sloghtly different compared to the previous models. They are not part of the base R package and hence, we need to install/load a different package. We will sue the <code>nlme</code>
Linear mixed effects models work slightly different compared to the previous models. They are not part of the base R package and hence, we need to install/load a different package. We will sue the <code>nlme</code>

```{r lme, exercise=TRUE, warning=FALSE}
lme(day3~day2, random=~1|intervention,control=lmeControl(opt="optim"),data=no_out, na.action=na.omit)
Expand Down
Binary file modified inst/.DS_Store
Binary file not shown.
Binary file added man/.DS_Store
Binary file not shown.
Binary file modified vignettes/.DS_Store
Binary file not shown.
Loading

0 comments on commit 92e86d9

Please sign in to comment.