confidence-interval

Compute a confidence interval from sample data assuming unknown distribution

让人想犯罪 __ 提交于 2021-02-12 11:32:07
问题 I have sample data which I would like to compute a confidence interval for, assuming a distribution is not normal and is unknown. Basically, it looks like distribution is Pareto but I don't know for sure. The answers for the normal distribution: Compute a confidence interval from sample data Correct way to obtain confidence interval with scipy 回答1: If you don't know the underlying distribution, then my first thought would be to use bootstrapping: https://en.wikipedia.org/wiki/Bootstrapping_

Compute a confidence interval from sample data assuming unknown distribution

女生的网名这么多〃 提交于 2021-02-12 11:31:10
问题 I have sample data which I would like to compute a confidence interval for, assuming a distribution is not normal and is unknown. Basically, it looks like distribution is Pareto but I don't know for sure. The answers for the normal distribution: Compute a confidence interval from sample data Correct way to obtain confidence interval with scipy 回答1: If you don't know the underlying distribution, then my first thought would be to use bootstrapping: https://en.wikipedia.org/wiki/Bootstrapping_

Calculating Confidence Interval for a Proportion in One Sample

风格不统一 提交于 2021-02-10 14:14:35
问题 What would be a better way to calculate Confidence Interval (CI) for a proportion when the sample size is small and even the sample size is 1? I am currently calculating CI for a Proportion in One Sample w/: However, my sample size is very small, sometimes it is even 1. I also tried An approximate (1−α)100% confidence interval for a proportion p of a small population using: Specifically, I'm trying to implement those two formulas to calculate the CI for proportion. As you see on the graph

Error when estimating CI for GLMM using confint()

寵の児 提交于 2021-02-10 13:27:31
问题 I have a set of GLMMs fitted with a binary response variable and a set of continuous variables, and I would like to get confidence intervals for each model. I've been using confint() function, at 95% and with the profile method, and it works without any problems if it is applied to a model with no interactions. However, when I apply confint() to a model with interactions (continuous*continuous), I've been getting this error: m1CI <- confint(m1, level=0.95, method="profile") Error in zeta

Extract posterior estimate and credible intervals for random effect for lme4 model in R

时光总嘲笑我的痴心妄想 提交于 2021-02-10 12:41:07
问题 I need to extract the posterior estimates and intervals for a random effect from my model. For illustrative purposes, a similar dataset to the one I am using would be the ChickWeight dataset in base R. The way I extract the posterior estimates and intervals for my fixed effects is like so: #load package library(lme4) #model m.surv<-lmer(weight ~ Time + Diet + (1|Chick), data=ChickWeight) #load packages library(MCMCglmm) library(arm) #set up for fixed effects sm.surv<-sim(m.surv) smfixef.surv

Extract posterior estimate and credible intervals for random effect for lme4 model in R

瘦欲@ 提交于 2021-02-10 12:40:00
问题 I need to extract the posterior estimates and intervals for a random effect from my model. For illustrative purposes, a similar dataset to the one I am using would be the ChickWeight dataset in base R. The way I extract the posterior estimates and intervals for my fixed effects is like so: #load package library(lme4) #model m.surv<-lmer(weight ~ Time + Diet + (1|Chick), data=ChickWeight) #load packages library(MCMCglmm) library(arm) #set up for fixed effects sm.surv<-sim(m.surv) smfixef.surv

How to custom add vertical lines to ggplot facet function?

谁说我不能喝 提交于 2021-02-08 03:12:08
问题 I have a dataset where each species was mixed with a certain density (numeric) and type (numeric) of another species. I want to add two types of vertical lines to each of my facet_grid panels in ggplot: (a) A fixed line which dives the density/ type. e.g. 1000/1 = 1000, 1000/6 = 166.7, 10000/1 = 10000, 10000/6 = 1666.7 (b) The bootstrapped mean AND confidence interval for each treatment overlayed on the histogram. I tried adding the mean using geom_vline but it doesn't seem right. It looks

How to custom add vertical lines to ggplot facet function?

浪子不回头ぞ 提交于 2021-02-08 03:00:56
问题 I have a dataset where each species was mixed with a certain density (numeric) and type (numeric) of another species. I want to add two types of vertical lines to each of my facet_grid panels in ggplot: (a) A fixed line which dives the density/ type. e.g. 1000/1 = 1000, 1000/6 = 166.7, 10000/1 = 10000, 10000/6 = 1666.7 (b) The bootstrapped mean AND confidence interval for each treatment overlayed on the histogram. I tried adding the mean using geom_vline but it doesn't seem right. It looks

Confint() with glm {stats} very, very slow

浪尽此生 提交于 2021-02-07 19:06:16
问题 I have a problem with calculating OR confidence intervals from a glm in the latest version of R, but I have not had this issue before. With any glm where family="binomial" , no matter how simple the model is, it will easily allow me to extract the summary and exp(coef(model)), however when I try to extract the confint() or exp(confint(model)) , the "Waiting for profiling to be done..." message is displayed and nothing happens (I've waited up to 10 mins then cancelled the procedure, this

Confint() with glm {stats} very, very slow

十年热恋 提交于 2021-02-07 19:02:05
问题 I have a problem with calculating OR confidence intervals from a glm in the latest version of R, but I have not had this issue before. With any glm where family="binomial" , no matter how simple the model is, it will easily allow me to extract the summary and exp(coef(model)), however when I try to extract the confint() or exp(confint(model)) , the "Waiting for profiling to be done..." message is displayed and nothing happens (I've waited up to 10 mins then cancelled the procedure, this