-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathALSsurv.Rnw
More file actions
78 lines (59 loc) · 1.4 KB
/
Copy pathALSsurv.Rnw
File metadata and controls
78 lines (59 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
\documentclass{article}
\usepackage[left=20mm, right=15mm, top=15mm, bottom=20mm]{geometry}
\begin{document}
%\VignetteEngine{knitr::knitr}
<<surv_setup>>=
library("knitr")
opts_chunk$set(cache = FALSE, echo = TRUE,
fig.show='hold', message=FALSE, warning=FALSE)
library("ggplot2")
theme_set(theme_bw(base_size = 18))
library("partykit")
library("sandwich")
library("survival")
library("eha")
library("ggplot2")
library("plyr")
library("gridExtra")
source("basis/personalised_models.R")
source("basis/variable_importance.R")
source("basis/dependence_plots.R")
source("basis/pruning.R")
read_chunk('ALSsurv_R.R')
@
<<surv_data, cache = TRUE>>=
@
\section{Fitting function}
<<surv_fittingfunction, cache = TRUE>>=
@
\section{Compute random forest}
<<surv_forest, cache = FALSE>>=
@
\section{Obtain personalised models}
<<surv_pm, out.width = "0.99\\textwidth", out.height = "0.33\\textwidth", fig.width=12, fig.height=4>>=
@
\section{Variable importance}
<<surv_varimp>>=
@
\section{Obtain log-Likelihoods}
<<surv_logLiks, cache = FALSE>>=
@
<<surv_bootstrapLogliks>>=
@
%
%\section{Rank plot}
%<<surv_rankplot, fig.height = 11>>=
%@
%
%\section{Partial dependency plots}
%<<surv_pdplot, out.width = "0.5\\textwidth", out.height = "0.4\\textwidth">>=
%@
%
%From dependence plot make out useful variables for a model.
%<<surv_newmodel>>=
%@
%
<<surv_sessionInfo>>=
sessionInfo()
@
\end{document}