confidence-interval

Gnuplot smooth confidence interval lines as opposed to error bars

非 Y 不嫁゛ 提交于 2019-12-18 23:04:26
问题 I'd like a 95% confidence interval line above and below my data line - as opposed to vertical bars at each point. Is there a way that I can do this in gnuplot without plotting another line? Or do I need to plot another line and then label it appropriately? 回答1: You can use the filledcurves style to fill the region of 95% confidence. Consider the example data file data.dat with the content: # x y ylow yhigh 1 3 2.6 3.5 2 5 4 6 3 4 3.2 4.3 4 3.5 3.3 3.7 and plot this with the script set style

Interactively Re-color Bars in Matplotlib Bar Chart using Confidence Intervals

萝らか妹 提交于 2019-12-14 03:29:06
问题 Trying to shade the bars in this chart based on the confidence that a selected y-value (represented by the red line) lies within a confidence interval. See recolorBars() method in the class example below. While I understand colormaps, Normalize() , and ScalarMappable() , I'm stumped on which values to pass to Normalize() to create a color and shade for each bar. Here's what my chart looks like when first generated. To generate the chart pictured above, call chart = interactiveChart() . The

Get confidence limits from Gaussian Process model in Python GPy

青春壹個敷衍的年華 提交于 2019-12-13 15:47:04
问题 I calcualted a Gaussian Process model in Python using GPy: ker0 = GPy.kern.Bias(input_dim=1,variance=1e-2) ... m = GPy.models.GPRegression(x, y, ker0+ker2) I can plot it with m.plot() plt.show and it visualizes the points, the spline and the confidence limits. Now I want to extract the parameters and the confidence limits to use the data in another plot. My question is, how can I access these data. if I print m I get Name : GP regression Objective : 31.9566881665 Number of Parameters : 4

R - Bootstrapped Confidence Interval - Obtain Parameters of Upper and Lower Bounds

。_饼干妹妹 提交于 2019-12-13 08:59:12
问题 I used bootstrapping to obtain confidence intervals of a Weibull distribution. Then I plotted the Confidence Bands in a plot. Code is below: set.seed(123) rw.small<-rweibull(100,shape=1.781096,scale=33.669511) xs <- seq(0,100, len=500) boot.pdf <- sapply(1:100, function(i) { xi <- sample(rw.small, size=length(rw.small), replace=TRUE) MLE.est <- suppressWarnings(fitdist(xi, distr="weibull",lower=0)) dweibull(xs, shape=MLE.est$estimate["shape"], scale = MLE.est$estimate["scale"]) }) par(bg=

SummarySE (Rmisc package) to produce a barplot with error bars (ggplot2)

我的梦境 提交于 2019-12-13 08:34:43
问题 I am attempting to build a barplot with error bars using the ggplot2 package showing 13 predictor variables on the x axis (the data frame behaviours can be found below). The predictors will ideally be grouped by the response variable ( family ) containing two levels (G8 and V4), represented by two coloured bars per predictor plus a key. I have tried to follow an example from the Cookbook for R (see below). I would like to summarise the data using the function summarySE from the Rmisc package

geom_errorbar behaving strangely, ggplot2

女生的网名这么多〃 提交于 2019-12-13 07:44:49
问题 I have an usual problem when using geom_errorbar in ggplot2. The error bars are not within range but that is of no concern here. My problem is that geom_errorbar is plotting the confidence intervals for the same data differently depending on what other data is plotted with it. The code below filters the data only passing data where Audio1 is equal to "300SW" OR "3500MFL" in the uncommented SE and AggBar. SE<-c(0.0861829641865964, 0.0296894376485468, 0.0323219002250762, 0.0937013798013447)

Plotting Confidence intervals to multiple lines in ggplot2

北城余情 提交于 2019-12-13 05:23:36
问题 I am fairly new to R and I am working on analyzing some data in ggplot2. I have one set of data that has hormone values for a type of animal. The animals came from two sites (Control, New). I analyzed the data using an ANCOVA and plotted the predicted regression lines based on the model. What I would really like to do, is plot dotted confidence interval lines around both lines on my graph. I can't seem to find/figure out how to perform this using the ggplot2 package. I moved to the package

Bayesian interval of 5 fitted values

落花浮王杯 提交于 2019-12-12 22:04:00
问题 I conducted a Bayesian analysis by running Winbugs from R and derived the fitted values and their Bayesian intervals. Here is the related Winbugs output where mu[i] is the i-th fitted value. node mean 2.5% 97.5% mu[1] 0.7699 0.6661 0.94 mu[2] 0.8293 0.4727 1.022 mu[3] 0.7768 0.4252 0.9707 mu[4] 0.6369 0.4199 0.8254 mu[5] 0.7704 0.5054 1.023 What I want to do is to find the Bayesian interval for the mean of these 5 fitted values. Any idea how? 回答1: The answer of Chris Jackson is correct,

Python Statsmodels: Using SARIMAX with exogenous regressors to get predicted mean and confidence intervals

强颜欢笑 提交于 2019-12-12 10:34:30
问题 I'm using statsmodels.tsa.SARIMAX() to train a model with exogenous variables. Is there an equivalent of get_prediction() when a model is trained with exogenous variables so that the object returned contains the predicted mean and confidence interval rather than just an array of predicted mean results? The predict() and forecast() methods take exogenous variables, but only return the predicted mean value. SARIMA_model = sm.tsa.SARIMAX(endog=y_train.astype('float64'), exog=ExogenousFeature

calculating confidence interval of coefficient in poisson regression

不羁的心 提交于 2019-12-11 18:13:08
问题 The poisson regression looks as follows in My R-code: poissmod <- glm(aerobics$y ~ factor(aerobics$x1) + factor(aerobics$x2) + aerobics$x3 + aerobics$x4, family = poisson) poissmod Now I have to compute a confidence interval for the factor aerobics$x1 (in a model without aerobics$x1 since this is not significant). This might look very easy, but I am not familiar with R and I can 't find the answer anywhere... Anyone who can help me? Thanks a lot in advance! 回答1: See e.g. the confint function