Spaces:
Sleeping
Sleeping
Upload server.R
Browse files
server.R
CHANGED
|
@@ -60,6 +60,9 @@ shinyServer(function(input, output) {
|
|
| 60 |
nu <- exp(coef(fit, what="nu"))
|
| 61 |
y <- dexGAUS(x_seq, mu=mu, sigma=sigma, nu=nu)
|
| 62 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
} else if(dist_sel == "WALD") {
|
| 65 |
# Ajuste con fitdistr
|
|
@@ -73,6 +76,9 @@ shinyServer(function(input, output) {
|
|
| 73 |
sigma <- exp(coef(fit, what="sigma"))
|
| 74 |
y <- dWALD(x_seq, mu=mu, sigma=sigma)
|
| 75 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
|
|
|
|
|
|
|
|
|
| 76 |
}
|
| 77 |
} else if(dist_sel == "ExWALD") {
|
| 78 |
fit <- tryCatch({
|
|
@@ -86,6 +92,9 @@ shinyServer(function(input, output) {
|
|
| 86 |
nu <- exp(coef(fit, what="nu"))
|
| 87 |
y <- dExWALD(x_seq, mu=mu, sigma=sigma, nu=nu)
|
| 88 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
|
|
|
|
|
|
|
|
|
| 89 |
}
|
| 90 |
}
|
| 91 |
# To plot the residual analysis
|
|
|
|
| 60 |
nu <- exp(coef(fit, what="nu"))
|
| 61 |
y <- dexGAUS(x_seq, mu=mu, sigma=sigma, nu=nu)
|
| 62 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
| 63 |
+
legend("topright", bty="n",
|
| 64 |
+
legend="Estimated density",
|
| 65 |
+
lwd=3, col="steelblue2")
|
| 66 |
}
|
| 67 |
} else if(dist_sel == "WALD") {
|
| 68 |
# Ajuste con fitdistr
|
|
|
|
| 76 |
sigma <- exp(coef(fit, what="sigma"))
|
| 77 |
y <- dWALD(x_seq, mu=mu, sigma=sigma)
|
| 78 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
| 79 |
+
legend("topright", bty="n",
|
| 80 |
+
legend="Estimated density",
|
| 81 |
+
lwd=3, col="steelblue2")
|
| 82 |
}
|
| 83 |
} else if(dist_sel == "ExWALD") {
|
| 84 |
fit <- tryCatch({
|
|
|
|
| 92 |
nu <- exp(coef(fit, what="nu"))
|
| 93 |
y <- dExWALD(x_seq, mu=mu, sigma=sigma, nu=nu)
|
| 94 |
lines(x_seq, y, col = "steelblue2", lwd=3)
|
| 95 |
+
legend("topright", bty="n",
|
| 96 |
+
legend="Estimated density",
|
| 97 |
+
lwd=3, col="steelblue2")
|
| 98 |
}
|
| 99 |
}
|
| 100 |
# To plot the residual analysis
|