-
Notifications
You must be signed in to change notification settings - Fork 7
/
testing.R
50 lines (47 loc) · 1.43 KB
/
testing.R
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
library(tidyverse)
devtools::load_all()
# #48
library(rsimsum)
s.nlp.true <- rsimsum::simsum(
data = nlp, estvarname = "b", true = "esigma", se = "se",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
autoplot(s.nlp.true, stats = "bias", type = "nlp")
nlp$esigma.copy <- nlp$esigma
s.nlp.true2 <- rsimsum::simsum(
data = nlp, estvarname = "b", true = "esigma.copy", se = "se",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
autoplot(s.nlp.true2, stats = "bias", type = "nlp")
# #49
library(dplyr)
devtools::load_all()
data("nlp", package = "rsimsum")
# estvarname:
rsimsum::simsum(
data = rename(nlp, est = b), estvarname = "est", true = 0, se = "se",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
# se:
rsimsum::simsum(
data = rename(nlp, est = se), estvarname = "b", true = 0, se = "est",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
# methodvar:
rsimsum::simsum(
data = rename(nlp, est = model), estvarname = "b", true = 0, se = "se",
methodvar = "est", by = c("baseline", "ss", "esigma")
)
# by:
rsimsum::simsum(
data = rename(nlp, est = ss), estvarname = "b", true = 0, se = "se",
methodvar = "model", by = c("baseline", "est", "esigma")
)
# #48
devtools::load_all()
library(ggplot2)
s.nlp.true <- rsimsum::simsum(
data = nlp, estvarname = "b", true = "esigma", se = "se",
methodvar = "model", by = c("baseline", "ss", "esigma")
)
autoplot(s.nlp.true, stats = "bias", type = "nlp")