idx
int64
1
56k
question
stringlengths
15
155
answer
stringlengths
2
29.2k
question_cut
stringlengths
15
100
answer_cut
stringlengths
2
200
conversation
stringlengths
47
29.3k
conversation_cut
stringlengths
47
301
11,801
Whether to delete cases that are flagged as outliers by statistical software when performing multiple regression?
(late add: this topic has some whiskers on it. But I'm just seeing it for the first time.) I disagree strongly with some of User603's premises. Some of this reinforces what Charlie said above. In the abstract, there is no OBJECTIVE definition of an outlier, UNTIL you mentally or formally propose a data-generating model...
Whether to delete cases that are flagged as outliers by statistical software when performing multipl
(late add: this topic has some whiskers on it. But I'm just seeing it for the first time.) I disagree strongly with some of User603's premises. Some of this reinforces what Charlie said above. In the
Whether to delete cases that are flagged as outliers by statistical software when performing multiple regression? (late add: this topic has some whiskers on it. But I'm just seeing it for the first time.) I disagree strongly with some of User603's premises. Some of this reinforces what Charlie said above. In the abstra...
Whether to delete cases that are flagged as outliers by statistical software when performing multipl (late add: this topic has some whiskers on it. But I'm just seeing it for the first time.) I disagree strongly with some of User603's premises. Some of this reinforces what Charlie said above. In the
11,802
Best term for made-up data?
I would probably call this "synthetic" or "artificial" data, though I might also call it "simulated" (the simulation is just very simple).
Best term for made-up data?
I would probably call this "synthetic" or "artificial" data, though I might also call it "simulated" (the simulation is just very simple).
Best term for made-up data? I would probably call this "synthetic" or "artificial" data, though I might also call it "simulated" (the simulation is just very simple).
Best term for made-up data? I would probably call this "synthetic" or "artificial" data, though I might also call it "simulated" (the simulation is just very simple).
11,803
Best term for made-up data?
If you want to refer to your data as fictitious you'd be in good company, as that's the term Francis Anscombe used to describe his now famous quartet. From Anscombe, F. J. (1973). "Graphs in Statistical Analysis", Am. Stat. 27 (1): Some of these points are illustrated by four fictitious data sets, each consisting o...
Best term for made-up data?
If you want to refer to your data as fictitious you'd be in good company, as that's the term Francis Anscombe used to describe his now famous quartet. From Anscombe, F. J. (1973). "Graphs in Statisti
Best term for made-up data? If you want to refer to your data as fictitious you'd be in good company, as that's the term Francis Anscombe used to describe his now famous quartet. From Anscombe, F. J. (1973). "Graphs in Statistical Analysis", Am. Stat. 27 (1): Some of these points are illustrated by four fictitious da...
Best term for made-up data? If you want to refer to your data as fictitious you'd be in good company, as that's the term Francis Anscombe used to describe his now famous quartet. From Anscombe, F. J. (1973). "Graphs in Statisti
11,804
Best term for made-up data?
In IT we often call it mockup data, which can presented through a mockup (application). The mockup data can also be presented through a fully functional application, for instance to test the functionality of the application in a controlled manner.
Best term for made-up data?
In IT we often call it mockup data, which can presented through a mockup (application). The mockup data can also be presented through a fully functional application, for instance to test the functiona
Best term for made-up data? In IT we often call it mockup data, which can presented through a mockup (application). The mockup data can also be presented through a fully functional application, for instance to test the functionality of the application in a controlled manner.
Best term for made-up data? In IT we often call it mockup data, which can presented through a mockup (application). The mockup data can also be presented through a fully functional application, for instance to test the functiona
11,805
Best term for made-up data?
I've seen repeated suggestions for the term "synthetic data". That term however has a broadly used, and very different meaning from what you want to express: https://en.wikipedia.org/wiki/Synthetic_data I am not sure there is a generally accepted scientific term, but the term "example data" seems hard to misunderstand?
Best term for made-up data?
I've seen repeated suggestions for the term "synthetic data". That term however has a broadly used, and very different meaning from what you want to express: https://en.wikipedia.org/wiki/Synthetic_da
Best term for made-up data? I've seen repeated suggestions for the term "synthetic data". That term however has a broadly used, and very different meaning from what you want to express: https://en.wikipedia.org/wiki/Synthetic_data I am not sure there is a generally accepted scientific term, but the term "example data" ...
Best term for made-up data? I've seen repeated suggestions for the term "synthetic data". That term however has a broadly used, and very different meaning from what you want to express: https://en.wikipedia.org/wiki/Synthetic_da
11,806
Best term for made-up data?
I've encountered the term 'fake data' a fair amount. I guess it could have some negative connotations but I've heard it often enough that it doesn't register negatively at all for me. FWIW, Andrew Gelman uses it too: https://statmodeling.stat.columbia.edu/2009/09/04/fake-data_simul/ https://statmodeling.stat.columbia...
Best term for made-up data?
I've encountered the term 'fake data' a fair amount. I guess it could have some negative connotations but I've heard it often enough that it doesn't register negatively at all for me. FWIW, Andrew Ge
Best term for made-up data? I've encountered the term 'fake data' a fair amount. I guess it could have some negative connotations but I've heard it often enough that it doesn't register negatively at all for me. FWIW, Andrew Gelman uses it too: https://statmodeling.stat.columbia.edu/2009/09/04/fake-data_simul/ https:...
Best term for made-up data? I've encountered the term 'fake data' a fair amount. I guess it could have some negative connotations but I've heard it often enough that it doesn't register negatively at all for me. FWIW, Andrew Ge
11,807
Best term for made-up data?
I use a different word depending on the manner in which I use the data. If I have found the made-up dataset lying around and have pointed my algorithm at it in a confirmatory manner, then the word "synthetic" is fine. However, oftentimes whenever I use this type of data, I have invented the data with the specific in...
Best term for made-up data?
I use a different word depending on the manner in which I use the data. If I have found the made-up dataset lying around and have pointed my algorithm at it in a confirmatory manner, then the word "s
Best term for made-up data? I use a different word depending on the manner in which I use the data. If I have found the made-up dataset lying around and have pointed my algorithm at it in a confirmatory manner, then the word "synthetic" is fine. However, oftentimes whenever I use this type of data, I have invented t...
Best term for made-up data? I use a different word depending on the manner in which I use the data. If I have found the made-up dataset lying around and have pointed my algorithm at it in a confirmatory manner, then the word "s
11,808
Best term for made-up data?
First, there's no reason to not call it a "dataset". There is no universally agreed upon term(s) for "fake" vs "simulated" vs ... data. If the goal is to be completely clear, it's best to actually devote a sentence, rather than a word, to qualify what this dataset is. After that, you can relax the designation and just ...
Best term for made-up data?
First, there's no reason to not call it a "dataset". There is no universally agreed upon term(s) for "fake" vs "simulated" vs ... data. If the goal is to be completely clear, it's best to actually dev
Best term for made-up data? First, there's no reason to not call it a "dataset". There is no universally agreed upon term(s) for "fake" vs "simulated" vs ... data. If the goal is to be completely clear, it's best to actually devote a sentence, rather than a word, to qualify what this dataset is. After that, you can rel...
Best term for made-up data? First, there's no reason to not call it a "dataset". There is no universally agreed upon term(s) for "fake" vs "simulated" vs ... data. If the goal is to be completely clear, it's best to actually dev
11,809
Best term for made-up data?
In biology, analyses are sometimes demonstrated using a dataset of mythical animals. Whether or not to explicitly state that the data are simulated is up to the author/reviewer. An ecologist’s guide to the animal model, 2009 These tutorials describe a series of quantitative genetic analyses on a population of gryphons...
Best term for made-up data?
In biology, analyses are sometimes demonstrated using a dataset of mythical animals. Whether or not to explicitly state that the data are simulated is up to the author/reviewer. An ecologist’s guide t
Best term for made-up data? In biology, analyses are sometimes demonstrated using a dataset of mythical animals. Whether or not to explicitly state that the data are simulated is up to the author/reviewer. An ecologist’s guide to the animal model, 2009 These tutorials describe a series of quantitative genetic analyses...
Best term for made-up data? In biology, analyses are sometimes demonstrated using a dataset of mythical animals. Whether or not to explicitly state that the data are simulated is up to the author/reviewer. An ecologist’s guide t
11,810
Best term for made-up data?
Intuitively I would go to the term 'Dummy data', in the same sense that "Lorem ipsum..." is called 'Dummy text'. The word 'Dummy' is quite general and easy to understand for people from various backgrounds and is therfore less likely to be misinterpreted by readers of a less statistical background.
Best term for made-up data?
Intuitively I would go to the term 'Dummy data', in the same sense that "Lorem ipsum..." is called 'Dummy text'. The word 'Dummy' is quite general and easy to understand for people from various backgr
Best term for made-up data? Intuitively I would go to the term 'Dummy data', in the same sense that "Lorem ipsum..." is called 'Dummy text'. The word 'Dummy' is quite general and easy to understand for people from various backgrounds and is therfore less likely to be misinterpreted by readers of a less statistical back...
Best term for made-up data? Intuitively I would go to the term 'Dummy data', in the same sense that "Lorem ipsum..." is called 'Dummy text'. The word 'Dummy' is quite general and easy to understand for people from various backgr
11,811
Best term for made-up data?
Data is Latin for given, that is used in modern times as a shorthand for given set of recorded facts. So in a way referring to fabricated recordings as some sort of given facts would be an open contradiction. However, due to the increasing use of data to refer simply to recordings - regardless of the original presumpt...
Best term for made-up data?
Data is Latin for given, that is used in modern times as a shorthand for given set of recorded facts. So in a way referring to fabricated recordings as some sort of given facts would be an open contra
Best term for made-up data? Data is Latin for given, that is used in modern times as a shorthand for given set of recorded facts. So in a way referring to fabricated recordings as some sort of given facts would be an open contradiction. However, due to the increasing use of data to refer simply to recordings - regardl...
Best term for made-up data? Data is Latin for given, that is used in modern times as a shorthand for given set of recorded facts. So in a way referring to fabricated recordings as some sort of given facts would be an open contra
11,812
Whats the relationship between $R^2$ and F-Test?
If all the assumptions hold and you have the correct form for $R^2$ then the usual F statistic can be computed as $F = \frac{ R^2 }{ 1- R^2} \times \frac{ \text{df}_2 }{ \text{df}_1 }$. This value can then be compared to the appropriate F distribution to do an F test. This can be derived/confirmed with basic algebra.
Whats the relationship between $R^2$ and F-Test?
If all the assumptions hold and you have the correct form for $R^2$ then the usual F statistic can be computed as $F = \frac{ R^2 }{ 1- R^2} \times \frac{ \text{df}_2 }{ \text{df}_1 }$. This value ca
Whats the relationship between $R^2$ and F-Test? If all the assumptions hold and you have the correct form for $R^2$ then the usual F statistic can be computed as $F = \frac{ R^2 }{ 1- R^2} \times \frac{ \text{df}_2 }{ \text{df}_1 }$. This value can then be compared to the appropriate F distribution to do an F test. ...
Whats the relationship between $R^2$ and F-Test? If all the assumptions hold and you have the correct form for $R^2$ then the usual F statistic can be computed as $F = \frac{ R^2 }{ 1- R^2} \times \frac{ \text{df}_2 }{ \text{df}_1 }$. This value ca
11,813
Whats the relationship between $R^2$ and F-Test?
Recall that in a regression setting, the F statistic is expressed in the following way. $$ F = \frac{(TSS - RSS)/(p-1)}{RSS/(n-p)} $$ where TSS = total sum of squares and RSS = residual sum of squares, $p$ is the number of predictors (including the constant) and $n$ is the number of observations. This statistic has an ...
Whats the relationship between $R^2$ and F-Test?
Recall that in a regression setting, the F statistic is expressed in the following way. $$ F = \frac{(TSS - RSS)/(p-1)}{RSS/(n-p)} $$ where TSS = total sum of squares and RSS = residual sum of squares
Whats the relationship between $R^2$ and F-Test? Recall that in a regression setting, the F statistic is expressed in the following way. $$ F = \frac{(TSS - RSS)/(p-1)}{RSS/(n-p)} $$ where TSS = total sum of squares and RSS = residual sum of squares, $p$ is the number of predictors (including the constant) and $n$ is t...
Whats the relationship between $R^2$ and F-Test? Recall that in a regression setting, the F statistic is expressed in the following way. $$ F = \frac{(TSS - RSS)/(p-1)}{RSS/(n-p)} $$ where TSS = total sum of squares and RSS = residual sum of squares
11,814
Whats the relationship between $R^2$ and F-Test?
Intuitively, I like to think that the result of the F-ratio first gives a yes-no response to the the question, 'can I reject $H_0$?' (this is determined if the ratio is much larger than 1, or the p-value < $\alpha$). Then if I determine I can reject $H_0$, $R^2$ then indicates the strength of the relationship between....
Whats the relationship between $R^2$ and F-Test?
Intuitively, I like to think that the result of the F-ratio first gives a yes-no response to the the question, 'can I reject $H_0$?' (this is determined if the ratio is much larger than 1, or the p-va
Whats the relationship between $R^2$ and F-Test? Intuitively, I like to think that the result of the F-ratio first gives a yes-no response to the the question, 'can I reject $H_0$?' (this is determined if the ratio is much larger than 1, or the p-value < $\alpha$). Then if I determine I can reject $H_0$, $R^2$ then in...
Whats the relationship between $R^2$ and F-Test? Intuitively, I like to think that the result of the F-ratio first gives a yes-no response to the the question, 'can I reject $H_0$?' (this is determined if the ratio is much larger than 1, or the p-va
11,815
Whats the relationship between $R^2$ and F-Test?
Also, quickly: R2 = F / (F + n-p/p-1) Eg, The R2 of a 1df F test = 2.53 with sample size 21, would be: R2 = 2.53 / (2.53+19) R2 = .1175
Whats the relationship between $R^2$ and F-Test?
Also, quickly: R2 = F / (F + n-p/p-1) Eg, The R2 of a 1df F test = 2.53 with sample size 21, would be: R2 = 2.53 / (2.53+19) R2 = .1175
Whats the relationship between $R^2$ and F-Test? Also, quickly: R2 = F / (F + n-p/p-1) Eg, The R2 of a 1df F test = 2.53 with sample size 21, would be: R2 = 2.53 / (2.53+19) R2 = .1175
Whats the relationship between $R^2$ and F-Test? Also, quickly: R2 = F / (F + n-p/p-1) Eg, The R2 of a 1df F test = 2.53 with sample size 21, would be: R2 = 2.53 / (2.53+19) R2 = .1175
11,816
Does mean = median imply that a unimodal distribution is symmetric?
Here is a small counterexample that is not symmetric: -3, -2, 0, 0, 1, 4 is unimodal with mode = median = mean = 0. Edit: An even smaller example is -2, -1, 0, 0, 3. If you want to imagine a random variable rather than a sample, take the support as {-2, -1, 0, 3} with probability mass function 0.2 on all of them except...
Does mean = median imply that a unimodal distribution is symmetric?
Here is a small counterexample that is not symmetric: -3, -2, 0, 0, 1, 4 is unimodal with mode = median = mean = 0. Edit: An even smaller example is -2, -1, 0, 0, 3. If you want to imagine a random va
Does mean = median imply that a unimodal distribution is symmetric? Here is a small counterexample that is not symmetric: -3, -2, 0, 0, 1, 4 is unimodal with mode = median = mean = 0. Edit: An even smaller example is -2, -1, 0, 0, 3. If you want to imagine a random variable rather than a sample, take the support as {-2...
Does mean = median imply that a unimodal distribution is symmetric? Here is a small counterexample that is not symmetric: -3, -2, 0, 0, 1, 4 is unimodal with mode = median = mean = 0. Edit: An even smaller example is -2, -1, 0, 0, 3. If you want to imagine a random va
11,817
Does mean = median imply that a unimodal distribution is symmetric?
This began as a comment but grew too long; I decided to make it into more of an answer. Alexis' fine answer deals with the immediate question (in short: i. that logically ${A\implies B}$ doesn't mean $B\implies A$; and ii. the reverse statement is actually false in general), and Silverfish gives counterexamples. I'd li...
Does mean = median imply that a unimodal distribution is symmetric?
This began as a comment but grew too long; I decided to make it into more of an answer. Alexis' fine answer deals with the immediate question (in short: i. that logically ${A\implies B}$ doesn't mean
Does mean = median imply that a unimodal distribution is symmetric? This began as a comment but grew too long; I decided to make it into more of an answer. Alexis' fine answer deals with the immediate question (in short: i. that logically ${A\implies B}$ doesn't mean $B\implies A$; and ii. the reverse statement is actu...
Does mean = median imply that a unimodal distribution is symmetric? This began as a comment but grew too long; I decided to make it into more of an answer. Alexis' fine answer deals with the immediate question (in short: i. that logically ${A\implies B}$ doesn't mean
11,818
Does mean = median imply that a unimodal distribution is symmetric?
No. If, in addition, the distribution is unimodal, then the mean = median = mode. In the same way that "If the baby animal is a chicken, then its origin is an egg" does not imply that "If the origin is an egg, then the baby animal is a chicken." From the same Wikipedia article: In cases where one tail is long but th...
Does mean = median imply that a unimodal distribution is symmetric?
No. If, in addition, the distribution is unimodal, then the mean = median = mode. In the same way that "If the baby animal is a chicken, then its origin is an egg" does not imply that "If the origin
Does mean = median imply that a unimodal distribution is symmetric? No. If, in addition, the distribution is unimodal, then the mean = median = mode. In the same way that "If the baby animal is a chicken, then its origin is an egg" does not imply that "If the origin is an egg, then the baby animal is a chicken." From...
Does mean = median imply that a unimodal distribution is symmetric? No. If, in addition, the distribution is unimodal, then the mean = median = mode. In the same way that "If the baby animal is a chicken, then its origin is an egg" does not imply that "If the origin
11,819
Does mean = median imply that a unimodal distribution is symmetric?
Interesting and easy to understand examples come from the binomial distribution. Here are binomial probabilities for 0(1)5 successes in 5 trials when the probability of success is 0.2. It's immediate that the mean is 0.2 $\times$ 5 $=$ 1, which inspection of probabilities confirms as also the median and the (single) m...
Does mean = median imply that a unimodal distribution is symmetric?
Interesting and easy to understand examples come from the binomial distribution. Here are binomial probabilities for 0(1)5 successes in 5 trials when the probability of success is 0.2. It's immediate
Does mean = median imply that a unimodal distribution is symmetric? Interesting and easy to understand examples come from the binomial distribution. Here are binomial probabilities for 0(1)5 successes in 5 trials when the probability of success is 0.2. It's immediate that the mean is 0.2 $\times$ 5 $=$ 1, which inspec...
Does mean = median imply that a unimodal distribution is symmetric? Interesting and easy to understand examples come from the binomial distribution. Here are binomial probabilities for 0(1)5 successes in 5 trials when the probability of success is 0.2. It's immediate
11,820
Does mean = median imply that a unimodal distribution is symmetric?
This answer follows the same idea as Glen B, but with some slightly different story and visual examples The median and the mean are both measures that can be seen as splitting a distribution into two parts that have equal weights on both sides. For the mean and the median, these weights on both sides are different meas...
Does mean = median imply that a unimodal distribution is symmetric?
This answer follows the same idea as Glen B, but with some slightly different story and visual examples The median and the mean are both measures that can be seen as splitting a distribution into two
Does mean = median imply that a unimodal distribution is symmetric? This answer follows the same idea as Glen B, but with some slightly different story and visual examples The median and the mean are both measures that can be seen as splitting a distribution into two parts that have equal weights on both sides. For the...
Does mean = median imply that a unimodal distribution is symmetric? This answer follows the same idea as Glen B, but with some slightly different story and visual examples The median and the mean are both measures that can be seen as splitting a distribution into two
11,821
How should we do boxplots with small samples?
What R implementations (should) do is for developers and users of that software. I wish to comment more broadly on limitations of box plots. This overlaps a little with points made in other answers, and I am happy to note agreements. But at the risk of some repetition I wanted this answer to seem coherent, at least to ...
How should we do boxplots with small samples?
What R implementations (should) do is for developers and users of that software. I wish to comment more broadly on limitations of box plots. This overlaps a little with points made in other answers, a
How should we do boxplots with small samples? What R implementations (should) do is for developers and users of that software. I wish to comment more broadly on limitations of box plots. This overlaps a little with points made in other answers, and I am happy to note agreements. But at the risk of some repetition I wan...
How should we do boxplots with small samples? What R implementations (should) do is for developers and users of that software. I wish to comment more broadly on limitations of box plots. This overlaps a little with points made in other answers, a
11,822
How should we do boxplots with small samples?
I believe that this is a case where software misleads users. So my answer to (1) is "no." When we try to "summarize" a sample of 2 values, or even 5, with a display containing 5 elements, that can only be classed as a distortion, not a summary. The goal of statistical methods is to clarify, not obfuscate; so I think th...
How should we do boxplots with small samples?
I believe that this is a case where software misleads users. So my answer to (1) is "no." When we try to "summarize" a sample of 2 values, or even 5, with a display containing 5 elements, that can onl
How should we do boxplots with small samples? I believe that this is a case where software misleads users. So my answer to (1) is "no." When we try to "summarize" a sample of 2 values, or even 5, with a display containing 5 elements, that can only be classed as a distortion, not a summary. The goal of statistical metho...
How should we do boxplots with small samples? I believe that this is a case where software misleads users. So my answer to (1) is "no." When we try to "summarize" a sample of 2 values, or even 5, with a display containing 5 elements, that can onl
11,823
How should we do boxplots with small samples?
This question touches on the intersection of statistics and software engineering. The statistical part of the question is uncontroversial: the boxplots, like many other statistics and data visualization methods, don't have much sense below some sample size. The software engineering part is more tricky and less obvious....
How should we do boxplots with small samples?
This question touches on the intersection of statistics and software engineering. The statistical part of the question is uncontroversial: the boxplots, like many other statistics and data visualizati
How should we do boxplots with small samples? This question touches on the intersection of statistics and software engineering. The statistical part of the question is uncontroversial: the boxplots, like many other statistics and data visualization methods, don't have much sense below some sample size. The software eng...
How should we do boxplots with small samples? This question touches on the intersection of statistics and software engineering. The statistical part of the question is uncontroversial: the boxplots, like many other statistics and data visualizati
11,824
How should we do boxplots with small samples?
I consider the question "What's the smallest sample size for which a box-and-whiskers plot is a useful visual summary" to be about a rule-of-thumb for making good plots. (The question "Should implementations of a box-and-whiskers plot enforce a minimum sample size" does seem to be about opinions rather than practice.) ...
How should we do boxplots with small samples?
I consider the question "What's the smallest sample size for which a box-and-whiskers plot is a useful visual summary" to be about a rule-of-thumb for making good plots. (The question "Should implemen
How should we do boxplots with small samples? I consider the question "What's the smallest sample size for which a box-and-whiskers plot is a useful visual summary" to be about a rule-of-thumb for making good plots. (The question "Should implementations of a box-and-whiskers plot enforce a minimum sample size" does see...
How should we do boxplots with small samples? I consider the question "What's the smallest sample size for which a box-and-whiskers plot is a useful visual summary" to be about a rule-of-thumb for making good plots. (The question "Should implemen
11,825
How should we do boxplots with small samples?
Just curious -- Looking outside of R with the same data... Stata SPSS SAS Enterprise Guide MATLAB (Statistics and Machine Learning tools) Minitab I was most curious about Minitab, but our virtual desktop access seemed to require a license. I'd be curious if somebody could fill this one in... Summary I see lots of d...
How should we do boxplots with small samples?
Just curious -- Looking outside of R with the same data... Stata SPSS SAS Enterprise Guide MATLAB (Statistics and Machine Learning tools) Minitab I was most curious about Minitab, but our virtual
How should we do boxplots with small samples? Just curious -- Looking outside of R with the same data... Stata SPSS SAS Enterprise Guide MATLAB (Statistics and Machine Learning tools) Minitab I was most curious about Minitab, but our virtual desktop access seemed to require a license. I'd be curious if somebody cou...
How should we do boxplots with small samples? Just curious -- Looking outside of R with the same data... Stata SPSS SAS Enterprise Guide MATLAB (Statistics and Machine Learning tools) Minitab I was most curious about Minitab, but our virtual
11,826
Confidence interval for GAM model
In the usual way: p <- predict(mod, newdata, type = "link", se.fit = TRUE) Then note that p contains a component $se.fit with standard errors of the predictions for observations in newdata. You can then form CI by multipliying the SE by a value appropriate to your desired level. E.g. an approximate 95% confidence inte...
Confidence interval for GAM model
In the usual way: p <- predict(mod, newdata, type = "link", se.fit = TRUE) Then note that p contains a component $se.fit with standard errors of the predictions for observations in newdata. You can t
Confidence interval for GAM model In the usual way: p <- predict(mod, newdata, type = "link", se.fit = TRUE) Then note that p contains a component $se.fit with standard errors of the predictions for observations in newdata. You can then form CI by multipliying the SE by a value appropriate to your desired level. E.g. ...
Confidence interval for GAM model In the usual way: p <- predict(mod, newdata, type = "link", se.fit = TRUE) Then note that p contains a component $se.fit with standard errors of the predictions for observations in newdata. You can t
11,827
Confidence interval for GAM model
If you just want to plot them the plot.gam function has shading that defaults to confidence intervals using the shade argument. Also see gam.vcomp for getting the intervals.
Confidence interval for GAM model
If you just want to plot them the plot.gam function has shading that defaults to confidence intervals using the shade argument. Also see gam.vcomp for getting the intervals.
Confidence interval for GAM model If you just want to plot them the plot.gam function has shading that defaults to confidence intervals using the shade argument. Also see gam.vcomp for getting the intervals.
Confidence interval for GAM model If you just want to plot them the plot.gam function has shading that defaults to confidence intervals using the shade argument. Also see gam.vcomp for getting the intervals.
11,828
Confidence interval for GAM model
The package mgcv (newer than gam) readily plots credible intervals. This Bayesian approach is different from confidence intervals, but the results are almost the same, as numerical simulations have shown (see the paper by Marra and Wood linked in mgcv).
Confidence interval for GAM model
The package mgcv (newer than gam) readily plots credible intervals. This Bayesian approach is different from confidence intervals, but the results are almost the same, as numerical simulations have sh
Confidence interval for GAM model The package mgcv (newer than gam) readily plots credible intervals. This Bayesian approach is different from confidence intervals, but the results are almost the same, as numerical simulations have shown (see the paper by Marra and Wood linked in mgcv).
Confidence interval for GAM model The package mgcv (newer than gam) readily plots credible intervals. This Bayesian approach is different from confidence intervals, but the results are almost the same, as numerical simulations have sh
11,829
Is the Dice coefficient the same as accuracy?
These are not the same thing and they are often used in different contexts. The Dice score is often used to quantify the performance of image segmentation methods. There you annotate some ground truth region in your image and then make an automated algorithm to do it. You validate the algorithm by calculating the Dice ...
Is the Dice coefficient the same as accuracy?
These are not the same thing and they are often used in different contexts. The Dice score is often used to quantify the performance of image segmentation methods. There you annotate some ground truth
Is the Dice coefficient the same as accuracy? These are not the same thing and they are often used in different contexts. The Dice score is often used to quantify the performance of image segmentation methods. There you annotate some ground truth region in your image and then make an automated algorithm to do it. You v...
Is the Dice coefficient the same as accuracy? These are not the same thing and they are often used in different contexts. The Dice score is often used to quantify the performance of image segmentation methods. There you annotate some ground truth
11,830
Is the Dice coefficient the same as accuracy?
The Dice coefficient (also known as Dice similarity index) is the same as the F1 score, but it's not the same as accuracy. The main difference might be the fact that accuracy takes into account true negatives while Dice coefficient and many other measures just handle true negatives as uninteresting defaults (see The Ba...
Is the Dice coefficient the same as accuracy?
The Dice coefficient (also known as Dice similarity index) is the same as the F1 score, but it's not the same as accuracy. The main difference might be the fact that accuracy takes into account true n
Is the Dice coefficient the same as accuracy? The Dice coefficient (also known as Dice similarity index) is the same as the F1 score, but it's not the same as accuracy. The main difference might be the fact that accuracy takes into account true negatives while Dice coefficient and many other measures just handle true n...
Is the Dice coefficient the same as accuracy? The Dice coefficient (also known as Dice similarity index) is the same as the F1 score, but it's not the same as accuracy. The main difference might be the fact that accuracy takes into account true n
11,831
Is the Dice coefficient the same as accuracy?
The Dice coefficient (also known as the Sørensen–Dice coefficient and F1 score) is defined as two times the area of the intersection of A and B, divided by the sum of the areas of A and B: Dice = 2 |A∩B| / (|A|+|B|) = 2 TP / (2 TP + FP + FN) (TP=True Positives, FP=False Positives, FN=False Negatives) Dice score is a pe...
Is the Dice coefficient the same as accuracy?
The Dice coefficient (also known as the Sørensen–Dice coefficient and F1 score) is defined as two times the area of the intersection of A and B, divided by the sum of the areas of A and B: Dice = 2 |A
Is the Dice coefficient the same as accuracy? The Dice coefficient (also known as the Sørensen–Dice coefficient and F1 score) is defined as two times the area of the intersection of A and B, divided by the sum of the areas of A and B: Dice = 2 |A∩B| / (|A|+|B|) = 2 TP / (2 TP + FP + FN) (TP=True Positives, FP=False Pos...
Is the Dice coefficient the same as accuracy? The Dice coefficient (also known as the Sørensen–Dice coefficient and F1 score) is defined as two times the area of the intersection of A and B, divided by the sum of the areas of A and B: Dice = 2 |A
11,832
How to generate random categorical data?
Do you want the proportions in the sample to be exactly the proportions stated? or to represent the idea of sampling from a very large population with those proportions (so the sample proportions will be close but not exact)? If you want the exact proportions then you can follow Brandon's suggestion and use the R sampl...
How to generate random categorical data?
Do you want the proportions in the sample to be exactly the proportions stated? or to represent the idea of sampling from a very large population with those proportions (so the sample proportions will
How to generate random categorical data? Do you want the proportions in the sample to be exactly the proportions stated? or to represent the idea of sampling from a very large population with those proportions (so the sample proportions will be close but not exact)? If you want the exact proportions then you can follow...
How to generate random categorical data? Do you want the proportions in the sample to be exactly the proportions stated? or to represent the idea of sampling from a very large population with those proportions (so the sample proportions will
11,833
How to generate random categorical data?
Using R (http://cran.r-project.org/). All I'm doing here is creating a random list with the proportions you specified. x <- c(rep("A",0.1*10000),rep("B",0.2*10000),rep("C",0.65*10000),rep("D",0.05*10000)) # cheating x <- sample(x, 10000) prop.table(summary(as.factor(x))) /me Waits patiently for argument over h...
How to generate random categorical data?
Using R (http://cran.r-project.org/). All I'm doing here is creating a random list with the proportions you specified. x <- c(rep("A",0.1*10000),rep("B",0.2*10000),rep("C",0.65*10000),rep("D",0.05*10
How to generate random categorical data? Using R (http://cran.r-project.org/). All I'm doing here is creating a random list with the proportions you specified. x <- c(rep("A",0.1*10000),rep("B",0.2*10000),rep("C",0.65*10000),rep("D",0.05*10000)) # cheating x <- sample(x, 10000) prop.table(summary(as.factor(x)))...
How to generate random categorical data? Using R (http://cran.r-project.org/). All I'm doing here is creating a random list with the proportions you specified. x <- c(rep("A",0.1*10000),rep("B",0.2*10000),rep("C",0.65*10000),rep("D",0.05*10
11,834
How to generate random categorical data?
n <- 10000 blah <- character(n) u <- runif(n) blah[u<=0.1] <- "A" blah[u>0.1 & u<=0.3] <- "B" blah[u>0.3 & u<=0.95] <- "C" blah[u>0.95] <- "D" table(blah) prop.table(summary(as.factor(blah))) I have no doubt this is truly random. I mean, to the extent that runif() is random :)
How to generate random categorical data?
n <- 10000 blah <- character(n) u <- runif(n) blah[u<=0.1] <- "A" blah[u>0.1 & u<=0.3] <- "B" blah[u>0.3 & u<=0.95] <- "C" blah[u>0.95] <- "D" table(blah) prop.table(su
How to generate random categorical data? n <- 10000 blah <- character(n) u <- runif(n) blah[u<=0.1] <- "A" blah[u>0.1 & u<=0.3] <- "B" blah[u>0.3 & u<=0.95] <- "C" blah[u>0.95] <- "D" table(blah) prop.table(summary(as.factor(blah))) I have no doubt this is truly random. I mean, to the e...
How to generate random categorical data? n <- 10000 blah <- character(n) u <- runif(n) blah[u<=0.1] <- "A" blah[u>0.1 & u<=0.3] <- "B" blah[u>0.3 & u<=0.95] <- "C" blah[u>0.95] <- "D" table(blah) prop.table(su
11,835
How to generate random categorical data?
If you're a SAS user, recent versions provide a similar ability to pull from what it calls a "table" distribution - which is what you are looking for, as part of the Rand() function. See http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001466748.htm
How to generate random categorical data?
If you're a SAS user, recent versions provide a similar ability to pull from what it calls a "table" distribution - which is what you are looking for, as part of the Rand() function. See http://suppor
How to generate random categorical data? If you're a SAS user, recent versions provide a similar ability to pull from what it calls a "table" distribution - which is what you are looking for, as part of the Rand() function. See http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001466748....
How to generate random categorical data? If you're a SAS user, recent versions provide a similar ability to pull from what it calls a "table" distribution - which is what you are looking for, as part of the Rand() function. See http://suppor
11,836
What does PAC learning theory mean?
Probably approximately correct (PAC) learning theory helps analyze whether and under what conditions a learner $L$ will probably output an approximately correct classifier. (You'll see some sources use $A$ in place of $L$.) First, let's define "approximate." A hypothesis $h \in H$ is approximately correct if its error ...
What does PAC learning theory mean?
Probably approximately correct (PAC) learning theory helps analyze whether and under what conditions a learner $L$ will probably output an approximately correct classifier. (You'll see some sources us
What does PAC learning theory mean? Probably approximately correct (PAC) learning theory helps analyze whether and under what conditions a learner $L$ will probably output an approximately correct classifier. (You'll see some sources use $A$ in place of $L$.) First, let's define "approximate." A hypothesis $h \in H$ is...
What does PAC learning theory mean? Probably approximately correct (PAC) learning theory helps analyze whether and under what conditions a learner $L$ will probably output an approximately correct classifier. (You'll see some sources us
11,837
What does PAC learning theory mean?
The definition of probably approximately correct is due to Valiant. It is meant to give a mathematically rigorous definition of what is machine learning. Let me ramble a bit. While PAC uses the term 'hypothesis', mostly people use the word model instead of hypothesis. With a nod to the statistics community I prefer ...
What does PAC learning theory mean?
The definition of probably approximately correct is due to Valiant. It is meant to give a mathematically rigorous definition of what is machine learning. Let me ramble a bit. While PAC uses the ter
What does PAC learning theory mean? The definition of probably approximately correct is due to Valiant. It is meant to give a mathematically rigorous definition of what is machine learning. Let me ramble a bit. While PAC uses the term 'hypothesis', mostly people use the word model instead of hypothesis. With a nod t...
What does PAC learning theory mean? The definition of probably approximately correct is due to Valiant. It is meant to give a mathematically rigorous definition of what is machine learning. Let me ramble a bit. While PAC uses the ter
11,838
Scatterplot with contour/heat overlay
Here is my take, using base functions only for drawing stuff: library(MASS) # in case it is not already loaded set.seed(101) n <- 1000 X <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) ## some pretty colors library(RColorBrewer) k <- 11 my.cols <- rev(brewer.pal(k, "RdYlBu")) ## compute 2D kernel de...
Scatterplot with contour/heat overlay
Here is my take, using base functions only for drawing stuff: library(MASS) # in case it is not already loaded set.seed(101) n <- 1000 X <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2
Scatterplot with contour/heat overlay Here is my take, using base functions only for drawing stuff: library(MASS) # in case it is not already loaded set.seed(101) n <- 1000 X <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) ## some pretty colors library(RColorBrewer) k <- 11 my.cols <- rev(brewer.pal(...
Scatterplot with contour/heat overlay Here is my take, using base functions only for drawing stuff: library(MASS) # in case it is not already loaded set.seed(101) n <- 1000 X <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2
11,839
Scatterplot with contour/heat overlay
No-one has suggested ggplot2 for this?? library(MASS) library(ggplot2) n <- 1000 x <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) df = data.frame(x); colnames(df) = c("x","y") commonTheme = list(labs(color="Density",fill="Density", x="RNA-seq Expression", ...
Scatterplot with contour/heat overlay
No-one has suggested ggplot2 for this?? library(MASS) library(ggplot2) n <- 1000 x <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) df = data.frame(x); colnames(df) = c("x","y") common
Scatterplot with contour/heat overlay No-one has suggested ggplot2 for this?? library(MASS) library(ggplot2) n <- 1000 x <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) df = data.frame(x); colnames(df) = c("x","y") commonTheme = list(labs(color="Density",fill="Density", x="RNA-s...
Scatterplot with contour/heat overlay No-one has suggested ggplot2 for this?? library(MASS) library(ggplot2) n <- 1000 x <- mvrnorm(n, mu=c(.5,2.5), Sigma=matrix(c(1,.6,.6,1), ncol=2)) df = data.frame(x); colnames(df) = c("x","y") common
11,840
Comparing non nested models with AIC
The AIC can be applied with non nested models. In fact, this is one of the most extended myths (misunderstandings?) about AIC. See: Akaike Information Criterion AIC MYTHS AND MISUNDERSTANDINGS One thing you have to be careful about is to include all the normalising constants, since these are different for the differe...
Comparing non nested models with AIC
The AIC can be applied with non nested models. In fact, this is one of the most extended myths (misunderstandings?) about AIC. See: Akaike Information Criterion AIC MYTHS AND MISUNDERSTANDINGS One t
Comparing non nested models with AIC The AIC can be applied with non nested models. In fact, this is one of the most extended myths (misunderstandings?) about AIC. See: Akaike Information Criterion AIC MYTHS AND MISUNDERSTANDINGS One thing you have to be careful about is to include all the normalising constants, sinc...
Comparing non nested models with AIC The AIC can be applied with non nested models. In fact, this is one of the most extended myths (misunderstandings?) about AIC. See: Akaike Information Criterion AIC MYTHS AND MISUNDERSTANDINGS One t
11,841
Comparing non nested models with AIC
For reference, a counterargument: Brian Ripley states in "Selecting amongst large classes of models" pp. 6-7 Crucial assumptions ... The models are nested (footnote: see the bottom of page 615 in the reprint of Akaike (1973)). – AIC is widely used when they are not The relevant passage (also p. 204 of another reprin...
Comparing non nested models with AIC
For reference, a counterargument: Brian Ripley states in "Selecting amongst large classes of models" pp. 6-7 Crucial assumptions ... The models are nested (footnote: see the bottom of page 615 in th
Comparing non nested models with AIC For reference, a counterargument: Brian Ripley states in "Selecting amongst large classes of models" pp. 6-7 Crucial assumptions ... The models are nested (footnote: see the bottom of page 615 in the reprint of Akaike (1973)). – AIC is widely used when they are not The relevant p...
Comparing non nested models with AIC For reference, a counterargument: Brian Ripley states in "Selecting amongst large classes of models" pp. 6-7 Crucial assumptions ... The models are nested (footnote: see the bottom of page 615 in th
11,842
Comparing non nested models with AIC
It appears Akaike thought AIC was a useful tool for comparing non-nested models. "One important observation about AIC is that it is defined without specific reference to the true model [ f(x|kθ) ]. Thus, for any finite number of parametric models, we may always consider an extended model that will play the role of [ f...
Comparing non nested models with AIC
It appears Akaike thought AIC was a useful tool for comparing non-nested models. "One important observation about AIC is that it is defined without specific reference to the true model [ f(x|kθ) ]. T
Comparing non nested models with AIC It appears Akaike thought AIC was a useful tool for comparing non-nested models. "One important observation about AIC is that it is defined without specific reference to the true model [ f(x|kθ) ]. Thus, for any finite number of parametric models, we may always consider an extended...
Comparing non nested models with AIC It appears Akaike thought AIC was a useful tool for comparing non-nested models. "One important observation about AIC is that it is defined without specific reference to the true model [ f(x|kθ) ]. T
11,843
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
You've interpreted the test wrong. If the p value is greater than 0.05 then the residuals are independent which we want for the model to be correct. If you simulate a white noise time series using the code below and use the same test for it then the p value will be greater than 0.05. m = c(ar, ma) w = arima.sim(m, 120)...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
You've interpreted the test wrong. If the p value is greater than 0.05 then the residuals are independent which we want for the model to be correct. If you simulate a white noise time series using the
Ljung-Box Statistics for ARIMA residuals in R: confusing test results You've interpreted the test wrong. If the p value is greater than 0.05 then the residuals are independent which we want for the model to be correct. If you simulate a white noise time series using the code below and use the same test for it then the ...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results You've interpreted the test wrong. If the p value is greater than 0.05 then the residuals are independent which we want for the model to be correct. If you simulate a white noise time series using the
11,844
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
Many statistical tests are used to try to reject some null hypothesis. In this particular case the Ljung-Box test tries to reject the independence of some values. What does it mean? If p-value < 0.051: You can reject the null hypothesis assuming a 5% chance of making a mistake. So you can assume that your values are s...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
Many statistical tests are used to try to reject some null hypothesis. In this particular case the Ljung-Box test tries to reject the independence of some values. What does it mean? If p-value < 0.05
Ljung-Box Statistics for ARIMA residuals in R: confusing test results Many statistical tests are used to try to reject some null hypothesis. In this particular case the Ljung-Box test tries to reject the independence of some values. What does it mean? If p-value < 0.051: You can reject the null hypothesis assuming a 5...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results Many statistical tests are used to try to reject some null hypothesis. In this particular case the Ljung-Box test tries to reject the independence of some values. What does it mean? If p-value < 0.05
11,845
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
According to the ACF graphs, it is obviously that the fit 1 is better since the correlation coefficient at lag k(k>1) drops sharply, and close to 0.
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
According to the ACF graphs, it is obviously that the fit 1 is better since the correlation coefficient at lag k(k>1) drops sharply, and close to 0.
Ljung-Box Statistics for ARIMA residuals in R: confusing test results According to the ACF graphs, it is obviously that the fit 1 is better since the correlation coefficient at lag k(k>1) drops sharply, and close to 0.
Ljung-Box Statistics for ARIMA residuals in R: confusing test results According to the ACF graphs, it is obviously that the fit 1 is better since the correlation coefficient at lag k(k>1) drops sharply, and close to 0.
11,846
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
If you are judging with ACF then fit 1 is more appropriate. Instead of being confused on Ljung test you can still use the correlogram of the residuals to ascertain the best fit between fit1 and fit2
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
If you are judging with ACF then fit 1 is more appropriate. Instead of being confused on Ljung test you can still use the correlogram of the residuals to ascertain the best fit between fit1 and fit2
Ljung-Box Statistics for ARIMA residuals in R: confusing test results If you are judging with ACF then fit 1 is more appropriate. Instead of being confused on Ljung test you can still use the correlogram of the residuals to ascertain the best fit between fit1 and fit2
Ljung-Box Statistics for ARIMA residuals in R: confusing test results If you are judging with ACF then fit 1 is more appropriate. Instead of being confused on Ljung test you can still use the correlogram of the residuals to ascertain the best fit between fit1 and fit2
11,847
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
The Ljung-Box test uses the following hypotheses: H0: The residuals are independently distributed. HA: The residuals are not independently distributed; they exhibit serial correlation. Ideally, we would like to be unable to reject the null hypothesis. That is, we would like to see a p-value greater than 0.05 because th...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results
The Ljung-Box test uses the following hypotheses: H0: The residuals are independently distributed. HA: The residuals are not independently distributed; they exhibit serial correlation. Ideally, we wou
Ljung-Box Statistics for ARIMA residuals in R: confusing test results The Ljung-Box test uses the following hypotheses: H0: The residuals are independently distributed. HA: The residuals are not independently distributed; they exhibit serial correlation. Ideally, we would like to be unable to reject the null hypothesis...
Ljung-Box Statistics for ARIMA residuals in R: confusing test results The Ljung-Box test uses the following hypotheses: H0: The residuals are independently distributed. HA: The residuals are not independently distributed; they exhibit serial correlation. Ideally, we wou
11,848
R-squared is equal to 81% means what?
As a matter of fact, this last explanation is the best one: r-squared is the percentage of variation in 'Y' that is accounted for by its regression on 'X' Yes, it is quite abstract. Let's try to understand it. Here is some simulated data. R code: set.seed(1) xx <- runif(100) yy <- 1-xx^2+rnorm(length(xx),0,0.1) plot...
R-squared is equal to 81% means what?
As a matter of fact, this last explanation is the best one: r-squared is the percentage of variation in 'Y' that is accounted for by its regression on 'X' Yes, it is quite abstract. Let's try to und
R-squared is equal to 81% means what? As a matter of fact, this last explanation is the best one: r-squared is the percentage of variation in 'Y' that is accounted for by its regression on 'X' Yes, it is quite abstract. Let's try to understand it. Here is some simulated data. R code: set.seed(1) xx <- runif(100) yy ...
R-squared is equal to 81% means what? As a matter of fact, this last explanation is the best one: r-squared is the percentage of variation in 'Y' that is accounted for by its regression on 'X' Yes, it is quite abstract. Let's try to und
11,849
R-squared is equal to 81% means what?
An R-squared is the percentage of variance explained by a model. Let's say your data has a variance of 100: that is the sum of squared errors versus the mean and divided by $N-1$ (the degrees of freedom). Then you go model the data and your model has an $R^2$ of 81%. That means that the model predictions have a varianc...
R-squared is equal to 81% means what?
An R-squared is the percentage of variance explained by a model. Let's say your data has a variance of 100: that is the sum of squared errors versus the mean and divided by $N-1$ (the degrees of freed
R-squared is equal to 81% means what? An R-squared is the percentage of variance explained by a model. Let's say your data has a variance of 100: that is the sum of squared errors versus the mean and divided by $N-1$ (the degrees of freedom). Then you go model the data and your model has an $R^2$ of 81%. That means tha...
R-squared is equal to 81% means what? An R-squared is the percentage of variance explained by a model. Let's say your data has a variance of 100: that is the sum of squared errors versus the mean and divided by $N-1$ (the degrees of freed
11,850
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Both the standard Normal and Student t distributions are rather poor approximations to the distribution of $$Z = \frac{\hat p - p}{\sqrt{\hat p(1-\hat p)/n}}$$ for small $n,$ so poor that the error dwarfs the differences between these two distributions. Here is a comparison of all three distributions (omitting the cas...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Both the standard Normal and Student t distributions are rather poor approximations to the distribution of $$Z = \frac{\hat p - p}{\sqrt{\hat p(1-\hat p)/n}}$$ for small $n,$ so poor that the error d
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Both the standard Normal and Student t distributions are rather poor approximations to the distribution of $$Z = \frac{\hat p - p}{\sqrt{\hat p(1-\hat p)/n}}$$ for small $n,$ so poor that the error dwarfs the differenc...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Both the standard Normal and Student t distributions are rather poor approximations to the distribution of $$Z = \frac{\hat p - p}{\sqrt{\hat p(1-\hat p)/n}}$$ for small $n,$ so poor that the error d
11,851
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
The justification for using the t distribution in the confidence interval for a mean relies on the assumption that the underlying data follows a normal distribution, which leads to a chi-squared distribution when estimating the standard deviation, and thus $\frac{\bar{x}-\mu}{s/ \sqrt{n}} \sim t_{n-1}$. This is an exac...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
The justification for using the t distribution in the confidence interval for a mean relies on the assumption that the underlying data follows a normal distribution, which leads to a chi-squared distr
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? The justification for using the t distribution in the confidence interval for a mean relies on the assumption that the underlying data follows a normal distribution, which leads to a chi-squared distribution when estima...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? The justification for using the t distribution in the confidence interval for a mean relies on the assumption that the underlying data follows a normal distribution, which leads to a chi-squared distr
11,852
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Both AdamO and jsk give a great answer. I would try to repeat their points with plain English: When the underlying distribution is normal, you know there are two parameters: mean and variance. T distribution offers a way to do inference on the mean without knowing the exact value of the variances. Instead of using ac...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Both AdamO and jsk give a great answer. I would try to repeat their points with plain English: When the underlying distribution is normal, you know there are two parameters: mean and variance. T dis
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Both AdamO and jsk give a great answer. I would try to repeat their points with plain English: When the underlying distribution is normal, you know there are two parameters: mean and variance. T distribution offers a ...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Both AdamO and jsk give a great answer. I would try to repeat their points with plain English: When the underlying distribution is normal, you know there are two parameters: mean and variance. T dis
11,853
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Confidence interval for normal mean. Suppose we have a random sample $X_1, X_2, \dots X_n$ from a normal population. Let's look at the confidence interval for normal mean $\mu$ in terms of hypothesis testing. If $\sigma$ is known, then a two-sided test of $H_0:\mu = \mu_0$ against $H_a: \mu \ne \mu_0$ is based on the s...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Confidence interval for normal mean. Suppose we have a random sample $X_1, X_2, \dots X_n$ from a normal population. Let's look at the confidence interval for normal mean $\mu$ in terms of hypothesis
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Confidence interval for normal mean. Suppose we have a random sample $X_1, X_2, \dots X_n$ from a normal population. Let's look at the confidence interval for normal mean $\mu$ in terms of hypothesis testing. If $\sigma...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Confidence interval for normal mean. Suppose we have a random sample $X_1, X_2, \dots X_n$ from a normal population. Let's look at the confidence interval for normal mean $\mu$ in terms of hypothesis
11,854
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Note your use of the $\sigma$ notation which means the (known) population standard deviation. The T-distribution arose as an answer to the question: what happens when you don't know $\sigma$? He noted that, when you cheat by estimating $\sigma$ from the sample as a plug-in estimator, your CIs are on average too narrow....
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
Note your use of the $\sigma$ notation which means the (known) population standard deviation. The T-distribution arose as an answer to the question: what happens when you don't know $\sigma$? He noted
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Note your use of the $\sigma$ notation which means the (known) population standard deviation. The T-distribution arose as an answer to the question: what happens when you don't know $\sigma$? He noted that, when you che...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion? Note your use of the $\sigma$ notation which means the (known) population standard deviation. The T-distribution arose as an answer to the question: what happens when you don't know $\sigma$? He noted
11,855
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
Using the inverse gamma distribution, we get: $$p(\sigma^2|\alpha,\beta) \propto (\sigma^2)^{-\alpha-1} \exp(-\frac{\beta}{\sigma^2})$$ You can see easily that if $\beta \rightarrow 0$ and $\alpha \rightarrow 0$ then the inverse gamma will approach the Jeffreys prior. This distribution is called "uninformative" becaus...
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
Using the inverse gamma distribution, we get: $$p(\sigma^2|\alpha,\beta) \propto (\sigma^2)^{-\alpha-1} \exp(-\frac{\beta}{\sigma^2})$$ You can see easily that if $\beta \rightarrow 0$ and $\alpha \ri
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak? Using the inverse gamma distribution, we get: $$p(\sigma^2|\alpha,\beta) \propto (\sigma^2)^{-\alpha-1} \exp(-\frac{\beta}{\sigma^2})$$ You can see easily that if $\beta \rightarrow 0$ and $\alpha \rightarrow 0$ then the inverse gamma ...
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak? Using the inverse gamma distribution, we get: $$p(\sigma^2|\alpha,\beta) \propto (\sigma^2)^{-\alpha-1} \exp(-\frac{\beta}{\sigma^2})$$ You can see easily that if $\beta \rightarrow 0$ and $\alpha \ri
11,856
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
It's pretty close to flat. Its median is 1.9 E298, almost the largest number one can represent in double precision floating arithmetic. As you point out, the probability it assigns to any interval that isn't really huge is really small. It's hard to get less informative than that!
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
It's pretty close to flat. Its median is 1.9 E298, almost the largest number one can represent in double precision floating arithmetic. As you point out, the probability it assigns to any interval t
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak? It's pretty close to flat. Its median is 1.9 E298, almost the largest number one can represent in double precision floating arithmetic. As you point out, the probability it assigns to any interval that isn't really huge is really sma...
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak? It's pretty close to flat. Its median is 1.9 E298, almost the largest number one can represent in double precision floating arithmetic. As you point out, the probability it assigns to any interval t
11,857
Is 50% 100% higher than 25% or is it 25% higher than 25%?
There are percent (%) and there are percentage points (%p), which are two different things. 50% (of $X$) is 100% more than 25% (of $X$). At the same time, 50% (of $X$) is 25%p more than 25% (of $X$). So if your bank promises to increase the interest rates on your deposit by 5%, that means nearly nothing; 5% of, say, 1%...
Is 50% 100% higher than 25% or is it 25% higher than 25%?
There are percent (%) and there are percentage points (%p), which are two different things. 50% (of $X$) is 100% more than 25% (of $X$). At the same time, 50% (of $X$) is 25%p more than 25% (of $X$).
Is 50% 100% higher than 25% or is it 25% higher than 25%? There are percent (%) and there are percentage points (%p), which are two different things. 50% (of $X$) is 100% more than 25% (of $X$). At the same time, 50% (of $X$) is 25%p more than 25% (of $X$). So if your bank promises to increase the interest rates on you...
Is 50% 100% higher than 25% or is it 25% higher than 25%? There are percent (%) and there are percentage points (%p), which are two different things. 50% (of $X$) is 100% more than 25% (of $X$). At the same time, 50% (of $X$) is 25%p more than 25% (of $X$).
11,858
Is 50% 100% higher than 25% or is it 25% higher than 25%?
Both are correct, as long as the increase is described correctly. A common way of distinguishing the two cases is to say there is a 100% relative increase or a 25% absolute increase. However, this might not be clear to all audiences. Most laypeople probably expect the latter number, and quoting the multiplicative incre...
Is 50% 100% higher than 25% or is it 25% higher than 25%?
Both are correct, as long as the increase is described correctly. A common way of distinguishing the two cases is to say there is a 100% relative increase or a 25% absolute increase. However, this mig
Is 50% 100% higher than 25% or is it 25% higher than 25%? Both are correct, as long as the increase is described correctly. A common way of distinguishing the two cases is to say there is a 100% relative increase or a 25% absolute increase. However, this might not be clear to all audiences. Most laypeople probably expe...
Is 50% 100% higher than 25% or is it 25% higher than 25%? Both are correct, as long as the increase is described correctly. A common way of distinguishing the two cases is to say there is a 100% relative increase or a 25% absolute increase. However, this mig
11,859
Is 50% 100% higher than 25% or is it 25% higher than 25%?
The expression "B is x % higher than A", implies that x is calculated as a percentage of A, because it is against A that B is being compared, not some unspecified third entity. If A=25% of C and B=50% of C, then B is 100% higher than A. It's also 2 times A. Confusingly, many people will say "B is 2 times more than A...
Is 50% 100% higher than 25% or is it 25% higher than 25%?
The expression "B is x % higher than A", implies that x is calculated as a percentage of A, because it is against A that B is being compared, not some unspecified third entity. If A=25% of C and B=50%
Is 50% 100% higher than 25% or is it 25% higher than 25%? The expression "B is x % higher than A", implies that x is calculated as a percentage of A, because it is against A that B is being compared, not some unspecified third entity. If A=25% of C and B=50% of C, then B is 100% higher than A. It's also 2 times A. C...
Is 50% 100% higher than 25% or is it 25% higher than 25%? The expression "B is x % higher than A", implies that x is calculated as a percentage of A, because it is against A that B is being compared, not some unspecified third entity. If A=25% of C and B=50%
11,860
Is 50% 100% higher than 25% or is it 25% higher than 25%?
The only valid approach here is to assume your reader does not know which version you are using, and make sure you build up enough context to make it clear. One context may be to state what Richard Hardy suggested, differentiating between percentages and percentage points. That being said, I've never seen the %p notat...
Is 50% 100% higher than 25% or is it 25% higher than 25%?
The only valid approach here is to assume your reader does not know which version you are using, and make sure you build up enough context to make it clear. One context may be to state what Richard Ha
Is 50% 100% higher than 25% or is it 25% higher than 25%? The only valid approach here is to assume your reader does not know which version you are using, and make sure you build up enough context to make it clear. One context may be to state what Richard Hardy suggested, differentiating between percentages and percent...
Is 50% 100% higher than 25% or is it 25% higher than 25%? The only valid approach here is to assume your reader does not know which version you are using, and make sure you build up enough context to make it clear. One context may be to state what Richard Ha
11,861
Using offset in binomial model to account for increased numbers of patients
If you are interested in the probability of an incident given N days of patients on ward then you want a model either like: mod1 <- glm(incident ~ 1, offset=patients.on.ward, family=binomial) the offset represents trials, incident is either 0 or 1, and the probability of an incident is constant (no heterogeneity in te...
Using offset in binomial model to account for increased numbers of patients
If you are interested in the probability of an incident given N days of patients on ward then you want a model either like: mod1 <- glm(incident ~ 1, offset=patients.on.ward, family=binomial) the off
Using offset in binomial model to account for increased numbers of patients If you are interested in the probability of an incident given N days of patients on ward then you want a model either like: mod1 <- glm(incident ~ 1, offset=patients.on.ward, family=binomial) the offset represents trials, incident is either 0 ...
Using offset in binomial model to account for increased numbers of patients If you are interested in the probability of an incident given N days of patients on ward then you want a model either like: mod1 <- glm(incident ~ 1, offset=patients.on.ward, family=binomial) the off
11,862
Using offset in binomial model to account for increased numbers of patients
Offsets in Poisson regressions Lets start by looking at why we use an offset in a Poisson regression. Often we want to due this to control for exposure. Let $\lambda$ be the baseline rate per unit of exposure and $t$ be the exposure time in the same units. The expected number of events will be $\lambda \times t$. In...
Using offset in binomial model to account for increased numbers of patients
Offsets in Poisson regressions Lets start by looking at why we use an offset in a Poisson regression. Often we want to due this to control for exposure. Let $\lambda$ be the baseline rate per unit o
Using offset in binomial model to account for increased numbers of patients Offsets in Poisson regressions Lets start by looking at why we use an offset in a Poisson regression. Often we want to due this to control for exposure. Let $\lambda$ be the baseline rate per unit of exposure and $t$ be the exposure time in t...
Using offset in binomial model to account for increased numbers of patients Offsets in Poisson regressions Lets start by looking at why we use an offset in a Poisson regression. Often we want to due this to control for exposure. Let $\lambda$ be the baseline rate per unit o
11,863
Using offset in binomial model to account for increased numbers of patients
This answer comes in two parts, the first a direct answer to the question and the second a commentary on the model you're proposing. The first part relates to the use of Numbers as an offset along with having it on the r.h.s. of the equation. The effect of doing this will simply be to subtract 1 from the estimated c...
Using offset in binomial model to account for increased numbers of patients
This answer comes in two parts, the first a direct answer to the question and the second a commentary on the model you're proposing. The first part relates to the use of Numbers as an offset along w
Using offset in binomial model to account for increased numbers of patients This answer comes in two parts, the first a direct answer to the question and the second a commentary on the model you're proposing. The first part relates to the use of Numbers as an offset along with having it on the r.h.s. of the equation....
Using offset in binomial model to account for increased numbers of patients This answer comes in two parts, the first a direct answer to the question and the second a commentary on the model you're proposing. The first part relates to the use of Numbers as an offset along w
11,864
Using offset in binomial model to account for increased numbers of patients
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. Seems simplest to specify a log-link and keep the offs...
Using offset in binomial model to account for increased numbers of patients
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Using offset in binomial model to account for increased numbers of patients Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. ...
Using offset in binomial model to account for increased numbers of patients Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
11,865
R's randomForest can not handle more than 32 levels. What is workaround?
It is actually a pretty reasonable constrain because a split on a factor with $N$ levels is actually a selection of one of the $2^N-2$ possible combinations. So even with $N$ like 25 the space of combinations is so huge that such inference makes minor sense. Most other implementations simply treat factor as an ordinal ...
R's randomForest can not handle more than 32 levels. What is workaround?
It is actually a pretty reasonable constrain because a split on a factor with $N$ levels is actually a selection of one of the $2^N-2$ possible combinations. So even with $N$ like 25 the space of comb
R's randomForest can not handle more than 32 levels. What is workaround? It is actually a pretty reasonable constrain because a split on a factor with $N$ levels is actually a selection of one of the $2^N-2$ possible combinations. So even with $N$ like 25 the space of combinations is so huge that such inference makes m...
R's randomForest can not handle more than 32 levels. What is workaround? It is actually a pretty reasonable constrain because a split on a factor with $N$ levels is actually a selection of one of the $2^N-2$ possible combinations. So even with $N$ like 25 the space of comb
11,866
R's randomForest can not handle more than 32 levels. What is workaround?
The main reason is how randomForest is implemented. Implementation from R follows a lot from the original Breiman's specifications. What is important here to note is that for factor/categorical variables, the split criteria is binary with some label values on the left and the rest label values on the right. That means ...
R's randomForest can not handle more than 32 levels. What is workaround?
The main reason is how randomForest is implemented. Implementation from R follows a lot from the original Breiman's specifications. What is important here to note is that for factor/categorical variab
R's randomForest can not handle more than 32 levels. What is workaround? The main reason is how randomForest is implemented. Implementation from R follows a lot from the original Breiman's specifications. What is important here to note is that for factor/categorical variables, the split criteria is binary with some lab...
R's randomForest can not handle more than 32 levels. What is workaround? The main reason is how randomForest is implemented. Implementation from R follows a lot from the original Breiman's specifications. What is important here to note is that for factor/categorical variab
11,867
R's randomForest can not handle more than 32 levels. What is workaround?
You might try representing that one column differently. You could represent the same data as a sparse dataframe. Minimum viable code; example <- as.data.frame(c("A", "A", "B", "F", "C", "G", "C", "D", "E", "F")) names(example) <- "strcol" for(level in unique(example$strcol)){ example[paste("dummy", level, sep ...
R's randomForest can not handle more than 32 levels. What is workaround?
You might try representing that one column differently. You could represent the same data as a sparse dataframe. Minimum viable code; example <- as.data.frame(c("A", "A", "B", "F", "C", "G", "C", "D
R's randomForest can not handle more than 32 levels. What is workaround? You might try representing that one column differently. You could represent the same data as a sparse dataframe. Minimum viable code; example <- as.data.frame(c("A", "A", "B", "F", "C", "G", "C", "D", "E", "F")) names(example) <- "strcol" for(l...
R's randomForest can not handle more than 32 levels. What is workaround? You might try representing that one column differently. You could represent the same data as a sparse dataframe. Minimum viable code; example <- as.data.frame(c("A", "A", "B", "F", "C", "G", "C", "D
11,868
R's randomForest can not handle more than 32 levels. What is workaround?
Another option: depending on the number of levels and number of observations in your data, you could merge some levels. Beyond getting under the limit, it may reduce variance if you have many levels with just a few observations. Hadley's forcats:fct_lump does this.
R's randomForest can not handle more than 32 levels. What is workaround?
Another option: depending on the number of levels and number of observations in your data, you could merge some levels. Beyond getting under the limit, it may reduce variance if you have many levels w
R's randomForest can not handle more than 32 levels. What is workaround? Another option: depending on the number of levels and number of observations in your data, you could merge some levels. Beyond getting under the limit, it may reduce variance if you have many levels with just a few observations. Hadley's forcats:f...
R's randomForest can not handle more than 32 levels. What is workaround? Another option: depending on the number of levels and number of observations in your data, you could merge some levels. Beyond getting under the limit, it may reduce variance if you have many levels w
11,869
R's randomForest can not handle more than 32 levels. What is workaround?
You may use package extraTrees instead. Extremely randomized forests algorithm do not try any breakpoint/split, but only a limited random subset of splits.
R's randomForest can not handle more than 32 levels. What is workaround?
You may use package extraTrees instead. Extremely randomized forests algorithm do not try any breakpoint/split, but only a limited random subset of splits.
R's randomForest can not handle more than 32 levels. What is workaround? You may use package extraTrees instead. Extremely randomized forests algorithm do not try any breakpoint/split, but only a limited random subset of splits.
R's randomForest can not handle more than 32 levels. What is workaround? You may use package extraTrees instead. Extremely randomized forests algorithm do not try any breakpoint/split, but only a limited random subset of splits.
11,870
What are some alternatives to a boxplot?
A boxplot isn't that complicated. After all, you just need to compute the three quartiles, and the min and max which define the range; a subtlety arises when we want to draw the whiskers and various methods have been proposed. For instance, in a Tukey boxplot values outside 1.5 times the inter-quartile from the first o...
What are some alternatives to a boxplot?
A boxplot isn't that complicated. After all, you just need to compute the three quartiles, and the min and max which define the range; a subtlety arises when we want to draw the whiskers and various m
What are some alternatives to a boxplot? A boxplot isn't that complicated. After all, you just need to compute the three quartiles, and the min and max which define the range; a subtlety arises when we want to draw the whiskers and various methods have been proposed. For instance, in a Tukey boxplot values outside 1.5 ...
What are some alternatives to a boxplot? A boxplot isn't that complicated. After all, you just need to compute the three quartiles, and the min and max which define the range; a subtlety arises when we want to draw the whiskers and various m
11,871
What are some alternatives to a boxplot?
You might also want to have a look at beanplots. [Source] Implemented in R package by Peter Kampstra.
What are some alternatives to a boxplot?
You might also want to have a look at beanplots. [Source] Implemented in R package by Peter Kampstra.
What are some alternatives to a boxplot? You might also want to have a look at beanplots. [Source] Implemented in R package by Peter Kampstra.
What are some alternatives to a boxplot? You might also want to have a look at beanplots. [Source] Implemented in R package by Peter Kampstra.
11,872
What are some alternatives to a boxplot?
I'd suggest you persevere with histograms. They're much more widely understood than the alternatives. Use a log scale to cope with the large range of values. Here's an example I cooked up in a couple of minutes in Stata: I admit that the x-axis numerical labels weren't entirely straightforward or automatic, but as you...
What are some alternatives to a boxplot?
I'd suggest you persevere with histograms. They're much more widely understood than the alternatives. Use a log scale to cope with the large range of values. Here's an example I cooked up in a couple
What are some alternatives to a boxplot? I'd suggest you persevere with histograms. They're much more widely understood than the alternatives. Use a log scale to cope with the large range of values. Here's an example I cooked up in a couple of minutes in Stata: I admit that the x-axis numerical labels weren't entirely...
What are some alternatives to a boxplot? I'd suggest you persevere with histograms. They're much more widely understood than the alternatives. Use a log scale to cope with the large range of values. Here's an example I cooked up in a couple
11,873
What are some alternatives to a boxplot?
I rather like violin plots myself, as this gives an idea of the shape of the distribution. However if the large range of values is the issue, then maybe it would be best to plot the log of the data rather than the raw values, that would then make choosing the box sizes for histograms etc. As the display is for laymen...
What are some alternatives to a boxplot?
I rather like violin plots myself, as this gives an idea of the shape of the distribution. However if the large range of values is the issue, then maybe it would be best to plot the log of the data r
What are some alternatives to a boxplot? I rather like violin plots myself, as this gives an idea of the shape of the distribution. However if the large range of values is the issue, then maybe it would be best to plot the log of the data rather than the raw values, that would then make choosing the box sizes for hist...
What are some alternatives to a boxplot? I rather like violin plots myself, as this gives an idea of the shape of the distribution. However if the large range of values is the issue, then maybe it would be best to plot the log of the data r
11,874
What are some alternatives to a boxplot?
Here is a matlab function for plotting multiple histograms side-by-side in 2D as an alternative to box-plot. See the picture on the top. And here is another one The density strip is another alternative to box-plot. It is a shaded monochrome strip whose darkness at a point is proportional to the probability density of t...
What are some alternatives to a boxplot?
Here is a matlab function for plotting multiple histograms side-by-side in 2D as an alternative to box-plot. See the picture on the top. And here is another one The density strip is another alternativ
What are some alternatives to a boxplot? Here is a matlab function for plotting multiple histograms side-by-side in 2D as an alternative to box-plot. See the picture on the top. And here is another one The density strip is another alternative to box-plot. It is a shaded monochrome strip whose darkness at a point is pro...
What are some alternatives to a boxplot? Here is a matlab function for plotting multiple histograms side-by-side in 2D as an alternative to box-plot. See the picture on the top. And here is another one The density strip is another alternativ
11,875
What are some alternatives to a boxplot?
How about using quantiles? It is not necessary to present a graph then, only a table. For village census I think the users will be most interested how many there are villages of certain size, so giving for example deciles will tell them them information such as $x\%$ of all the villages are smaller than the certain num...
What are some alternatives to a boxplot?
How about using quantiles? It is not necessary to present a graph then, only a table. For village census I think the users will be most interested how many there are villages of certain size, so givin
What are some alternatives to a boxplot? How about using quantiles? It is not necessary to present a graph then, only a table. For village census I think the users will be most interested how many there are villages of certain size, so giving for example deciles will tell them them information such as $x\%$ of all the ...
What are some alternatives to a boxplot? How about using quantiles? It is not necessary to present a graph then, only a table. For village census I think the users will be most interested how many there are villages of certain size, so givin
11,876
What are some alternatives to a boxplot?
If you are targeting the general population (i.e. a non statistical-savvy audience) you should focus on eye-candy rather than statistical accuracy. Forget about boxplots, let alone violin plots (I personally find them very difficult to read)! If you'd ask the average street man what a quantile is, you would mostly get ...
What are some alternatives to a boxplot?
If you are targeting the general population (i.e. a non statistical-savvy audience) you should focus on eye-candy rather than statistical accuracy. Forget about boxplots, let alone violin plots (I per
What are some alternatives to a boxplot? If you are targeting the general population (i.e. a non statistical-savvy audience) you should focus on eye-candy rather than statistical accuracy. Forget about boxplots, let alone violin plots (I personally find them very difficult to read)! If you'd ask the average street man ...
What are some alternatives to a boxplot? If you are targeting the general population (i.e. a non statistical-savvy audience) you should focus on eye-candy rather than statistical accuracy. Forget about boxplots, let alone violin plots (I per
11,877
Average value paradox - What is this called?
The average of every subcategory can be above the overall average if the subcategories overlap on the larger customers. Simple example to gain intuition: Let $A$ be an indicator whether an individual purchased an item in category A. Let $B$ be an indicator whether an individual purchased an item in category B. Let $X ...
Average value paradox - What is this called?
The average of every subcategory can be above the overall average if the subcategories overlap on the larger customers. Simple example to gain intuition: Let $A$ be an indicator whether an individual
Average value paradox - What is this called? The average of every subcategory can be above the overall average if the subcategories overlap on the larger customers. Simple example to gain intuition: Let $A$ be an indicator whether an individual purchased an item in category A. Let $B$ be an indicator whether an indivi...
Average value paradox - What is this called? The average of every subcategory can be above the overall average if the subcategories overlap on the larger customers. Simple example to gain intuition: Let $A$ be an indicator whether an individual
11,878
Average value paradox - What is this called?
I would call this the family size paradox or something similar Suppose, for a simple example, everybody had one partner and a Poisson-distributed number of children with parameter $2$: The average number of children per person would be $2$ The average number of children per person with children would be $\frac{2}{1-e...
Average value paradox - What is this called?
I would call this the family size paradox or something similar Suppose, for a simple example, everybody had one partner and a Poisson-distributed number of children with parameter $2$: The average n
Average value paradox - What is this called? I would call this the family size paradox or something similar Suppose, for a simple example, everybody had one partner and a Poisson-distributed number of children with parameter $2$: The average number of children per person would be $2$ The average number of children pe...
Average value paradox - What is this called? I would call this the family size paradox or something similar Suppose, for a simple example, everybody had one partner and a Poisson-distributed number of children with parameter $2$: The average n
11,879
Average value paradox - What is this called?
The other answers are overthinking what's going on. Suppose there is one product and two customers. One bought the product (once) and one didn't. The average number of products bought is 0.5, but if you look only at the customer who bought the product, the average rises to 1. This doesn't seem like a paradox or co...
Average value paradox - What is this called?
The other answers are overthinking what's going on. Suppose there is one product and two customers. One bought the product (once) and one didn't. The average number of products bought is 0.5, but i
Average value paradox - What is this called? The other answers are overthinking what's going on. Suppose there is one product and two customers. One bought the product (once) and one didn't. The average number of products bought is 0.5, but if you look only at the customer who bought the product, the average rises t...
Average value paradox - What is this called? The other answers are overthinking what's going on. Suppose there is one product and two customers. One bought the product (once) and one didn't. The average number of products bought is 0.5, but i
11,880
Average value paradox - What is this called?
Is this not merely the "average of averages" confusion (e.g. previous stackexchange question) in disguise? Your temptation appears to be that the subsample averages should end up averaging to the population average, but this will rarely happen. In the classical "average of averages", someone finds the average of N mutu...
Average value paradox - What is this called?
Is this not merely the "average of averages" confusion (e.g. previous stackexchange question) in disguise? Your temptation appears to be that the subsample averages should end up averaging to the popu
Average value paradox - What is this called? Is this not merely the "average of averages" confusion (e.g. previous stackexchange question) in disguise? Your temptation appears to be that the subsample averages should end up averaging to the population average, but this will rarely happen. In the classical "average of a...
Average value paradox - What is this called? Is this not merely the "average of averages" confusion (e.g. previous stackexchange question) in disguise? Your temptation appears to be that the subsample averages should end up averaging to the popu
11,881
Average value paradox - What is this called?
Since the issue is "I understand it but need to explain this to marketing", OP seems concerned with how a layman will interpret these facts - (not whether the facts are true, or how to show that they are). The question references 10 product categories, (A-J), so how about this example: [in meeting with marketing group...
Average value paradox - What is this called?
Since the issue is "I understand it but need to explain this to marketing", OP seems concerned with how a layman will interpret these facts - (not whether the facts are true, or how to show that they
Average value paradox - What is this called? Since the issue is "I understand it but need to explain this to marketing", OP seems concerned with how a layman will interpret these facts - (not whether the facts are true, or how to show that they are). The question references 10 product categories, (A-J), so how about t...
Average value paradox - What is this called? Since the issue is "I understand it but need to explain this to marketing", OP seems concerned with how a layman will interpret these facts - (not whether the facts are true, or how to show that they
11,882
Average value paradox - What is this called?
Ignore the other answers here. This actually is not a paradox at all. The actual issue at hand here which everyone seems to be ignoring is that you are mistaking which probability you are actually looking at. There are in fact two completely different averages and statistics at play here which both have there own uses ...
Average value paradox - What is this called?
Ignore the other answers here. This actually is not a paradox at all. The actual issue at hand here which everyone seems to be ignoring is that you are mistaking which probability you are actually loo
Average value paradox - What is this called? Ignore the other answers here. This actually is not a paradox at all. The actual issue at hand here which everyone seems to be ignoring is that you are mistaking which probability you are actually looking at. There are in fact two completely different averages and statistics...
Average value paradox - What is this called? Ignore the other answers here. This actually is not a paradox at all. The actual issue at hand here which everyone seems to be ignoring is that you are mistaking which probability you are actually loo
11,883
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
The approach based on the Cholesky decomposition should work, it is described here and is shown in the answer by Mark L. Stone posted almost at the same time that this answer. Nevertheless, I have sometimes generated draws from the multivariate Normal distribution $N(\vec\mu, \Sigma)$ as follows: $$ Y = Q X + \vec\mu...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
The approach based on the Cholesky decomposition should work, it is described here and is shown in the answer by Mark L. Stone posted almost at the same time that this answer. Nevertheless, I have so
How to use the Cholesky decomposition, or an alternative, for correlated data simulation The approach based on the Cholesky decomposition should work, it is described here and is shown in the answer by Mark L. Stone posted almost at the same time that this answer. Nevertheless, I have sometimes generated draws from th...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation The approach based on the Cholesky decomposition should work, it is described here and is shown in the answer by Mark L. Stone posted almost at the same time that this answer. Nevertheless, I have so
11,884
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
People would be likely find your error much faster if you explained what you did with words and algebra rather than code (or at least writing it using pseudocode). You appear to be doing the equivalent of this (though possibly transposed): Generate an $n\times k$ matrix of standard normals, $Z$ multiply the columns ...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
People would be likely find your error much faster if you explained what you did with words and algebra rather than code (or at least writing it using pseudocode). You appear to be doing the equivale
How to use the Cholesky decomposition, or an alternative, for correlated data simulation People would be likely find your error much faster if you explained what you did with words and algebra rather than code (or at least writing it using pseudocode). You appear to be doing the equivalent of this (though possibly tra...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation People would be likely find your error much faster if you explained what you did with words and algebra rather than code (or at least writing it using pseudocode). You appear to be doing the equivale
11,885
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
There's nothing wrong with the Cholesky factorization. There is an error in your code. See edit below. Here is MATLAB code and results, first for n_obs = 10000 as you have, then for n_obs = 1e8. For simplicity, since it doesn't affect the results, I don't bother with means, i.e., I make them zeros. Note that MATLAB's ...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
There's nothing wrong with the Cholesky factorization. There is an error in your code. See edit below. Here is MATLAB code and results, first for n_obs = 10000 as you have, then for n_obs = 1e8. For s
How to use the Cholesky decomposition, or an alternative, for correlated data simulation There's nothing wrong with the Cholesky factorization. There is an error in your code. See edit below. Here is MATLAB code and results, first for n_obs = 10000 as you have, then for n_obs = 1e8. For simplicity, since it doesn't aff...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation There's nothing wrong with the Cholesky factorization. There is an error in your code. See edit below. Here is MATLAB code and results, first for n_obs = 10000 as you have, then for n_obs = 1e8. For s
11,886
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
CV is not about code, but I was intrigued to see how this would look after all the good answers, and specifically @Mark L. Stone contribution. The actual answer to the question is provided on his post (please credit his post in case of doubt). I'm moving this appended info here to facilitate retrieval of this post in t...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
CV is not about code, but I was intrigued to see how this would look after all the good answers, and specifically @Mark L. Stone contribution. The actual answer to the question is provided on his post
How to use the Cholesky decomposition, or an alternative, for correlated data simulation CV is not about code, but I was intrigued to see how this would look after all the good answers, and specifically @Mark L. Stone contribution. The actual answer to the question is provided on his post (please credit his post in cas...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation CV is not about code, but I was intrigued to see how this would look after all the good answers, and specifically @Mark L. Stone contribution. The actual answer to the question is provided on his post
11,887
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
As others have already shown: cholesky works. Here a piece of code which is very short and very near to pseudocode: a codepiece in MatMate: Co = {{1.0, 0.6, 0.9}, _ {0.6, 1.0, 0.5}, _ {0.9, 0.5, 1.0}} // make correlation matrix chol = cholesky(co) // do cholesky-decomposition ...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
As others have already shown: cholesky works. Here a piece of code which is very short and very near to pseudocode: a codepiece in MatMate: Co = {{1.0, 0.6, 0.9}, _ {0.6, 1.0, 0.5}, _ {0
How to use the Cholesky decomposition, or an alternative, for correlated data simulation As others have already shown: cholesky works. Here a piece of code which is very short and very near to pseudocode: a codepiece in MatMate: Co = {{1.0, 0.6, 0.9}, _ {0.6, 1.0, 0.5}, _ {0.9, 0.5, 1.0}} // mak...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation As others have already shown: cholesky works. Here a piece of code which is very short and very near to pseudocode: a codepiece in MatMate: Co = {{1.0, 0.6, 0.9}, _ {0.6, 1.0, 0.5}, _ {0
11,888
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
Python code: import numpy as np # desired correlation matrix cor_matrix = np.array([[1.0, 0.6, 0.9], [0.6, 1.0, 0.5], [0.9, 0.5, 1.0]]) L = np.linalg.cholesky(cor_matrix) # build some signals that will result in the desired correlation matrix X = L.dot(np.random.normal(0...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation
Python code: import numpy as np # desired correlation matrix cor_matrix = np.array([[1.0, 0.6, 0.9], [0.6, 1.0, 0.5], [0.9, 0.5, 1.0]]) L = np.linalg.ch
How to use the Cholesky decomposition, or an alternative, for correlated data simulation Python code: import numpy as np # desired correlation matrix cor_matrix = np.array([[1.0, 0.6, 0.9], [0.6, 1.0, 0.5], [0.9, 0.5, 1.0]]) L = np.linalg.cholesky(cor_matrix) # build som...
How to use the Cholesky decomposition, or an alternative, for correlated data simulation Python code: import numpy as np # desired correlation matrix cor_matrix = np.array([[1.0, 0.6, 0.9], [0.6, 1.0, 0.5], [0.9, 0.5, 1.0]]) L = np.linalg.ch
11,889
Time series for count data, with counts < 20
To assess the historical trend, I'd use a gam with trend and seasonal components. For example require(mgcv) require(forecast) x <- ts(rpois(100,1+sin(seq(0,3*pi,l=100))),f=12) tt <- 1:100 season <- seasonaldummy(x) fit <- gam(x ~ s(tt,k=5) + season, family="poisson") plot(fit) Then summary(fit) will give you a test of...
Time series for count data, with counts < 20
To assess the historical trend, I'd use a gam with trend and seasonal components. For example require(mgcv) require(forecast) x <- ts(rpois(100,1+sin(seq(0,3*pi,l=100))),f=12) tt <- 1:100 season <- se
Time series for count data, with counts < 20 To assess the historical trend, I'd use a gam with trend and seasonal components. For example require(mgcv) require(forecast) x <- ts(rpois(100,1+sin(seq(0,3*pi,l=100))),f=12) tt <- 1:100 season <- seasonaldummy(x) fit <- gam(x ~ s(tt,k=5) + season, family="poisson") plot(fi...
Time series for count data, with counts < 20 To assess the historical trend, I'd use a gam with trend and seasonal components. For example require(mgcv) require(forecast) x <- ts(rpois(100,1+sin(seq(0,3*pi,l=100))),f=12) tt <- 1:100 season <- se
11,890
Time series for count data, with counts < 20
You might want to have a look at strucchange: Testing, monitoring and dating structural changes in (linear) regression models. strucchange features tests/methods from the generalized fluctuation test framework as well as from the F test (Chow test) framework. This includes methods to fit, plot and test fluctuation pr...
Time series for count data, with counts < 20
You might want to have a look at strucchange: Testing, monitoring and dating structural changes in (linear) regression models. strucchange features tests/methods from the generalized fluctuation tes
Time series for count data, with counts < 20 You might want to have a look at strucchange: Testing, monitoring and dating structural changes in (linear) regression models. strucchange features tests/methods from the generalized fluctuation test framework as well as from the F test (Chow test) framework. This includes...
Time series for count data, with counts < 20 You might want to have a look at strucchange: Testing, monitoring and dating structural changes in (linear) regression models. strucchange features tests/methods from the generalized fluctuation tes
11,891
Time series for count data, with counts < 20
Does it really need some advanced model? Based on what I know about TB, in case there is no epidemy the infections are stochastic acts and so the count form month N shouldn't be correlated with count from month N-1. (You can check this assumption with autocorrelation). If so, analyzing just the distribution of monthly ...
Time series for count data, with counts < 20
Does it really need some advanced model? Based on what I know about TB, in case there is no epidemy the infections are stochastic acts and so the count form month N shouldn't be correlated with count
Time series for count data, with counts < 20 Does it really need some advanced model? Based on what I know about TB, in case there is no epidemy the infections are stochastic acts and so the count form month N shouldn't be correlated with count from month N-1. (You can check this assumption with autocorrelation). If so...
Time series for count data, with counts < 20 Does it really need some advanced model? Based on what I know about TB, in case there is no epidemy the infections are stochastic acts and so the count form month N shouldn't be correlated with count
11,892
Time series for count data, with counts < 20
You may try to model your data using a Dynamic Generalized Linear Model (DGLM). In R, you can fit this kind of models using packages sspir and KFAS. In a sense, this is similar to the gam approach suggested by Rob, except that instead of assuming that the log mean of the Poisson observations be a smooth function of tim...
Time series for count data, with counts < 20
You may try to model your data using a Dynamic Generalized Linear Model (DGLM). In R, you can fit this kind of models using packages sspir and KFAS. In a sense, this is similar to the gam approach sug
Time series for count data, with counts < 20 You may try to model your data using a Dynamic Generalized Linear Model (DGLM). In R, you can fit this kind of models using packages sspir and KFAS. In a sense, this is similar to the gam approach suggested by Rob, except that instead of assuming that the log mean of the Poi...
Time series for count data, with counts < 20 You may try to model your data using a Dynamic Generalized Linear Model (DGLM). In R, you can fit this kind of models using packages sspir and KFAS. In a sense, this is similar to the gam approach sug
11,893
Time series for count data, with counts < 20
Often, disease data like this is performed with a generalized linear model, as its not necessarily a great application of time series analysis - the months often aren't all that correlated with each other. If I were given this data, here's what I would do (and indeed, have done with data similar to it): Create a "time"...
Time series for count data, with counts < 20
Often, disease data like this is performed with a generalized linear model, as its not necessarily a great application of time series analysis - the months often aren't all that correlated with each o
Time series for count data, with counts < 20 Often, disease data like this is performed with a generalized linear model, as its not necessarily a great application of time series analysis - the months often aren't all that correlated with each other. If I were given this data, here's what I would do (and indeed, have d...
Time series for count data, with counts < 20 Often, disease data like this is performed with a generalized linear model, as its not necessarily a great application of time series analysis - the months often aren't all that correlated with each o
11,894
Time series for count data, with counts < 20
You might consider applying a Tukey Control chart to the data.
Time series for count data, with counts < 20
You might consider applying a Tukey Control chart to the data.
Time series for count data, with counts < 20 You might consider applying a Tukey Control chart to the data.
Time series for count data, with counts < 20 You might consider applying a Tukey Control chart to the data.
11,895
Time series for count data, with counts < 20
I'm going to leave the main question alone, because I think I will get it wrong (although I too analyse data for a healthcare provider, and to be honest, if I had these data, I would just analyse them using standard techniques and hope for the best, they look pretty okay to me). As for R packages, I have found the TSA ...
Time series for count data, with counts < 20
I'm going to leave the main question alone, because I think I will get it wrong (although I too analyse data for a healthcare provider, and to be honest, if I had these data, I would just analyse them
Time series for count data, with counts < 20 I'm going to leave the main question alone, because I think I will get it wrong (although I too analyse data for a healthcare provider, and to be honest, if I had these data, I would just analyse them using standard techniques and hope for the best, they look pretty okay to ...
Time series for count data, with counts < 20 I'm going to leave the main question alone, because I think I will get it wrong (although I too analyse data for a healthcare provider, and to be honest, if I had these data, I would just analyse them
11,896
Time series for count data, with counts < 20
Escape from traditional enumerative statistics as Deming would suggest and venture into traditional analytical statistics - in this case, control charts. See any books by Donald Wheeler PhD, particularly his "Advanced Topics in SPC" for more info.
Time series for count data, with counts < 20
Escape from traditional enumerative statistics as Deming would suggest and venture into traditional analytical statistics - in this case, control charts. See any books by Donald Wheeler PhD, particul
Time series for count data, with counts < 20 Escape from traditional enumerative statistics as Deming would suggest and venture into traditional analytical statistics - in this case, control charts. See any books by Donald Wheeler PhD, particularly his "Advanced Topics in SPC" for more info.
Time series for count data, with counts < 20 Escape from traditional enumerative statistics as Deming would suggest and venture into traditional analytical statistics - in this case, control charts. See any books by Donald Wheeler PhD, particul
11,897
Time series for count data, with counts < 20
In response to your direct question "How can I test if there's a real change in the process? And if I can identify a decline, how could I use that trend and whatever seasonality there might be to estimate the number of cases we might see in the upcoming months?" Develop a Transfer Function Model ( ARMAX ) that readily ...
Time series for count data, with counts < 20
In response to your direct question "How can I test if there's a real change in the process? And if I can identify a decline, how could I use that trend and whatever seasonality there might be to esti
Time series for count data, with counts < 20 In response to your direct question "How can I test if there's a real change in the process? And if I can identify a decline, how could I use that trend and whatever seasonality there might be to estimate the number of cases we might see in the upcoming months?" Develop a Tr...
Time series for count data, with counts < 20 In response to your direct question "How can I test if there's a real change in the process? And if I can identify a decline, how could I use that trend and whatever seasonality there might be to esti
11,898
Difference between selecting features based on "F regression" and based on $R^2$ values?
TL:DR There won't be a difference if F-regression just computes the F statistic and pick the best features. There might be a difference in the ranking, assuming F-regression does the following: Start with a constant model, $M_0$ Try all models $M_1$ consisting of just one feature and pick the best according to the F s...
Difference between selecting features based on "F regression" and based on $R^2$ values?
TL:DR There won't be a difference if F-regression just computes the F statistic and pick the best features. There might be a difference in the ranking, assuming F-regression does the following: Start
Difference between selecting features based on "F regression" and based on $R^2$ values? TL:DR There won't be a difference if F-regression just computes the F statistic and pick the best features. There might be a difference in the ranking, assuming F-regression does the following: Start with a constant model, $M_0$ T...
Difference between selecting features based on "F regression" and based on $R^2$ values? TL:DR There won't be a difference if F-regression just computes the F statistic and pick the best features. There might be a difference in the ranking, assuming F-regression does the following: Start
11,899
Difference between selecting features based on "F regression" and based on $R^2$ values?
I spent some time looking through the Scikit source code in order to understand what f_regression does, and I would like to post my observations here. The original question was: Q: Does SelectKBest(f_regression, k = 4) produce the same result as using LinearRegression(fit_intercept=True) and choosing the first 4 featur...
Difference between selecting features based on "F regression" and based on $R^2$ values?
I spent some time looking through the Scikit source code in order to understand what f_regression does, and I would like to post my observations here. The original question was: Q: Does SelectKBest(f_
Difference between selecting features based on "F regression" and based on $R^2$ values? I spent some time looking through the Scikit source code in order to understand what f_regression does, and I would like to post my observations here. The original question was: Q: Does SelectKBest(f_regression, k = 4) produce the ...
Difference between selecting features based on "F regression" and based on $R^2$ values? I spent some time looking through the Scikit source code in order to understand what f_regression does, and I would like to post my observations here. The original question was: Q: Does SelectKBest(f_
11,900
Splitting Time Series Data into Train/Test/Validation Sets
You should use a split based on time to avoid the look-ahead bias. Train/validation/test in this order by time. The test set should be the most recent part of data. You need to simulate a situation in a production environment, where after training a model you evaluate data coming after the time of creation of the model...
Splitting Time Series Data into Train/Test/Validation Sets
You should use a split based on time to avoid the look-ahead bias. Train/validation/test in this order by time. The test set should be the most recent part of data. You need to simulate a situation in
Splitting Time Series Data into Train/Test/Validation Sets You should use a split based on time to avoid the look-ahead bias. Train/validation/test in this order by time. The test set should be the most recent part of data. You need to simulate a situation in a production environment, where after training a model you e...
Splitting Time Series Data into Train/Test/Validation Sets You should use a split based on time to avoid the look-ahead bias. Train/validation/test in this order by time. The test set should be the most recent part of data. You need to simulate a situation in