-
Notifications
You must be signed in to change notification settings - Fork 0
/
R30_install_packages_new.R.orig
117 lines (89 loc) · 3.1 KB
/
R30_install_packages_new.R.orig
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<<<<<<< HEAD
schools_code <- '
data {
int<lower=0> J; // number of schools
real y[J]; // estimated treatment effects
real<lower=0> sigma[J]; // s.e. of effect estimates
}
parameters {
real mu;
real<lower=0> tau;
real eta[J];
}
transformed parameters {
real theta[J];
for (j in 1:J)
theta[j] <- mu + tau * eta[j];
}
model {
eta ~ normal(0, 1);
y ~ normal(theta, sigma);
}
'
schools_dat <- list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit <- stan(model_code = schools_code, data = schools_dat,
iter = 1000, chains = 4)
print(fit)
plot(fit)
vector.of.installed.packages2 <- rownames(installed.packages())
vector.of.packages.to.install2 <- setdiff(vector.of.installed.packages,
vector.of.installed.packages2)
## Install these packages
install.packages(pkgs = vector.of.packages.to.install2,
repos = "http://R-Forge.R-project.org", type = "source")
save(vector.of.packages.to.install2, file = "vector.of.packages.to.install2.RData")
c("AGSDest", "bayespack", "BPHO", "BradleyTerry", "coefplot2",
"concord", "covRobust", "gamlss.boot", "gamlss.rsm", "gamlss.sparse",
"HandyStuff", "jagstools", "mblm", "mimR", "MISA", "mixer", "moc",
"mprobit", "panel", "pcurve", "pisa", "predbayescor", "ReadImages",
"spikeslab", "ThreeGroups", "ZeligNetwork")
install.packages("astsa")
install.packages("lsmeans")
install.packages("lmerTest")
=======
schools_code <- '
data {
int<lower=0> J; // number of schools
real y[J]; // estimated treatment effects
real<lower=0> sigma[J]; // s.e. of effect estimates
}
parameters {
real mu;
real<lower=0> tau;
real eta[J];
}
transformed parameters {
real theta[J];
for (j in 1:J)
theta[j] <- mu + tau * eta[j];
}
model {
eta ~ normal(0, 1);
y ~ normal(theta, sigma);
}
'
schools_dat <- list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit <- stan(model_code = schools_code, data = schools_dat,
iter = 1000, chains = 4)
print(fit)
plot(fit)
vector.of.installed.packages2 <- rownames(installed.packages())
vector.of.packages.to.install2 <- setdiff(vector.of.installed.packages,
vector.of.installed.packages2)
## Install these packages
install.packages(pkgs = vector.of.packages.to.install2,
repos = "http://R-Forge.R-project.org", type = "source")
save(vector.of.packages.to.install2, file = "vector.of.packages.to.install2.RData")
c("AGSDest", "bayespack", "BPHO", "BradleyTerry", "coefplot2",
"concord", "covRobust", "gamlss.boot", "gamlss.rsm", "gamlss.sparse",
"HandyStuff", "jagstools", "mblm", "mimR", "MISA", "mixer", "moc",
"mprobit", "panel", "pcurve", "pisa", "predbayescor", "ReadImages",
"spikeslab", "ThreeGroups", "ZeligNetwork")
install.packages("astsa")
install.packages("lsmeans")
install.packages("lmerTest")
>>>>>>> 00_R-Skripts/Arbeit