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
55,501
Modeling vacancy rate
It would seem to make sense to use a generalized linear mixed model with family=binomial and a logit or probit link. This would restrict your fitted values to the range (0,1). I don't know whether you can combine that with an autoregressive error structure in lmer4 though.
Modeling vacancy rate
It would seem to make sense to use a generalized linear mixed model with family=binomial and a logit or probit link. This would restrict your fitted values to the range (0,1). I don't know whether you
Modeling vacancy rate It would seem to make sense to use a generalized linear mixed model with family=binomial and a logit or probit link. This would restrict your fitted values to the range (0,1). I don't know whether you can combine that with an autoregressive error structure in lmer4 though.
Modeling vacancy rate It would seem to make sense to use a generalized linear mixed model with family=binomial and a logit or probit link. This would restrict your fitted values to the range (0,1). I don't know whether you
55,502
What is the prediction error while using deming regression (weighted total least squares)
Update I've updated the answer to reflect the discussions in the comments. The model is given as \begin{align*} y&=y^{*}+\varepsilon\\\\ x&=x^{*}+\eta\\\\ y^{*}&=\alpha+x^{*}\beta \end{align*} So when forecasting with a new value $x$ we can forecast either $y$ or $y^{*}$. Their forecasts coincide $\hat{y}=\hat{y}^{*}=\...
What is the prediction error while using deming regression (weighted total least squares)
Update I've updated the answer to reflect the discussions in the comments. The model is given as \begin{align*} y&=y^{*}+\varepsilon\\\\ x&=x^{*}+\eta\\\\ y^{*}&=\alpha+x^{*}\beta \end{align*} So when
What is the prediction error while using deming regression (weighted total least squares) Update I've updated the answer to reflect the discussions in the comments. The model is given as \begin{align*} y&=y^{*}+\varepsilon\\\\ x&=x^{*}+\eta\\\\ y^{*}&=\alpha+x^{*}\beta \end{align*} So when forecasting with a new value ...
What is the prediction error while using deming regression (weighted total least squares) Update I've updated the answer to reflect the discussions in the comments. The model is given as \begin{align*} y&=y^{*}+\varepsilon\\\\ x&=x^{*}+\eta\\\\ y^{*}&=\alpha+x^{*}\beta \end{align*} So when
55,503
Interpreting correlation from two linear mixed-effect models
You're misinterpreting these results, which is easy to do as with mixed models there's more than one type of 'fitted value' and the documentation of lmer isn't as clear as it might be. Try using fixed.effects() in place of fitted() and you should get correlations which makes more intuitive sense if you're interested in...
Interpreting correlation from two linear mixed-effect models
You're misinterpreting these results, which is easy to do as with mixed models there's more than one type of 'fitted value' and the documentation of lmer isn't as clear as it might be. Try using fixed
Interpreting correlation from two linear mixed-effect models You're misinterpreting these results, which is easy to do as with mixed models there's more than one type of 'fitted value' and the documentation of lmer isn't as clear as it might be. Try using fixed.effects() in place of fitted() and you should get correlat...
Interpreting correlation from two linear mixed-effect models You're misinterpreting these results, which is easy to do as with mixed models there's more than one type of 'fitted value' and the documentation of lmer isn't as clear as it might be. Try using fixed
55,504
Two-sample test for multivariate normal distributions under the assumption that means are the same
The Mauchly's test allows to test if a given covariance matrix is proportional to a reference (identity or other) and is available through mauchly.test() under R. It is mostly used in repeated-measures design (to test (1) if the dependent variable VC matrices are equal or homogeneous, and (2) whether the correlations b...
Two-sample test for multivariate normal distributions under the assumption that means are the same
The Mauchly's test allows to test if a given covariance matrix is proportional to a reference (identity or other) and is available through mauchly.test() under R. It is mostly used in repeated-measure
Two-sample test for multivariate normal distributions under the assumption that means are the same The Mauchly's test allows to test if a given covariance matrix is proportional to a reference (identity or other) and is available through mauchly.test() under R. It is mostly used in repeated-measures design (to test (1)...
Two-sample test for multivariate normal distributions under the assumption that means are the same The Mauchly's test allows to test if a given covariance matrix is proportional to a reference (identity or other) and is available through mauchly.test() under R. It is mostly used in repeated-measure
55,505
Using R2WinBUGS, how to extract information from each chain?
The object returned by read.bugs is an object of S3 class mcmc.list. You can use the double brackets [[ to access the separate chains, i.e. the different mcmc-objects that make up the larger mcmc.list object, which really is simply a list of mcmc-objects that inherits some information about thinning and chain length f...
Using R2WinBUGS, how to extract information from each chain?
The object returned by read.bugs is an object of S3 class mcmc.list. You can use the double brackets [[ to access the separate chains, i.e. the different mcmc-objects that make up the larger mcmc.lis
Using R2WinBUGS, how to extract information from each chain? The object returned by read.bugs is an object of S3 class mcmc.list. You can use the double brackets [[ to access the separate chains, i.e. the different mcmc-objects that make up the larger mcmc.list object, which really is simply a list of mcmc-objects tha...
Using R2WinBUGS, how to extract information from each chain? The object returned by read.bugs is an object of S3 class mcmc.list. You can use the double brackets [[ to access the separate chains, i.e. the different mcmc-objects that make up the larger mcmc.lis
55,506
Using R2WinBUGS, how to extract information from each chain?
The contents of your chains are stored in three different formats. Take a look at bugs.sim$sims.array bugs.sim$sims.list bugs.sim$sims.matrix and read the Value section of ?bugs.
Using R2WinBUGS, how to extract information from each chain?
The contents of your chains are stored in three different formats. Take a look at bugs.sim$sims.array bugs.sim$sims.list bugs.sim$sims.matrix and read the Value section of ?bugs.
Using R2WinBUGS, how to extract information from each chain? The contents of your chains are stored in three different formats. Take a look at bugs.sim$sims.array bugs.sim$sims.list bugs.sim$sims.matrix and read the Value section of ?bugs.
Using R2WinBUGS, how to extract information from each chain? The contents of your chains are stored in three different formats. Take a look at bugs.sim$sims.array bugs.sim$sims.list bugs.sim$sims.matrix and read the Value section of ?bugs.
55,507
Calculation of incidence rate for epidemiological study in hospital
It is commonly admitted that the denominator for IRs is the "population at risk" (i.e., all individuals in which the studied event(s) may occur). Although your first formula is generally used, I found in The new public health, by Tulchinsky and Varavikova (Elsevier, 2009, 2nd. ed., p. 84) that a distinction is made bet...
Calculation of incidence rate for epidemiological study in hospital
It is commonly admitted that the denominator for IRs is the "population at risk" (i.e., all individuals in which the studied event(s) may occur). Although your first formula is generally used, I found
Calculation of incidence rate for epidemiological study in hospital It is commonly admitted that the denominator for IRs is the "population at risk" (i.e., all individuals in which the studied event(s) may occur). Although your first formula is generally used, I found in The new public health, by Tulchinsky and Varavik...
Calculation of incidence rate for epidemiological study in hospital It is commonly admitted that the denominator for IRs is the "population at risk" (i.e., all individuals in which the studied event(s) may occur). Although your first formula is generally used, I found
55,508
Calculation of incidence rate for epidemiological study in hospital
Short answer: When in doubt, trust in Rothman. Long answer: It depends. You only want to include time where you are actually at risk of the outcome in your calculation of the denominator. Time where you aren't at risk (known as immortal person-time) should never be used in the calculation of a rate. In your case, if th...
Calculation of incidence rate for epidemiological study in hospital
Short answer: When in doubt, trust in Rothman. Long answer: It depends. You only want to include time where you are actually at risk of the outcome in your calculation of the denominator. Time where y
Calculation of incidence rate for epidemiological study in hospital Short answer: When in doubt, trust in Rothman. Long answer: It depends. You only want to include time where you are actually at risk of the outcome in your calculation of the denominator. Time where you aren't at risk (known as immortal person-time) sh...
Calculation of incidence rate for epidemiological study in hospital Short answer: When in doubt, trust in Rothman. Long answer: It depends. You only want to include time where you are actually at risk of the outcome in your calculation of the denominator. Time where y
55,509
Calculation of incidence rate for epidemiological study in hospital
I think Rothman's definition should be used. In the second definition all patients seem to be given the same duration (is this correct?) so that the incidence will not be the incidence rate but will be proportional to the cumulative incidence (cases / total in given time frame)
Calculation of incidence rate for epidemiological study in hospital
I think Rothman's definition should be used. In the second definition all patients seem to be given the same duration (is this correct?) so that the incidence will not be the incidence rate but will b
Calculation of incidence rate for epidemiological study in hospital I think Rothman's definition should be used. In the second definition all patients seem to be given the same duration (is this correct?) so that the incidence will not be the incidence rate but will be proportional to the cumulative incidence (cases / ...
Calculation of incidence rate for epidemiological study in hospital I think Rothman's definition should be used. In the second definition all patients seem to be given the same duration (is this correct?) so that the incidence will not be the incidence rate but will b
55,510
How to test if change is significant across multiple categories?
There are subtle issues involving the difference between designed comparisons and post-hoc comparisons, of which this likely is an example. If, before collecting the data, you anticipated this kind of pattern, you could employ a simple nonparametric test. The null hypothesis would be that all changes are due to chance...
How to test if change is significant across multiple categories?
There are subtle issues involving the difference between designed comparisons and post-hoc comparisons, of which this likely is an example. If, before collecting the data, you anticipated this kind of
How to test if change is significant across multiple categories? There are subtle issues involving the difference between designed comparisons and post-hoc comparisons, of which this likely is an example. If, before collecting the data, you anticipated this kind of pattern, you could employ a simple nonparametric test....
How to test if change is significant across multiple categories? There are subtle issues involving the difference between designed comparisons and post-hoc comparisons, of which this likely is an example. If, before collecting the data, you anticipated this kind of
55,511
How to test if change is significant across multiple categories?
Given the additional information you've subsequently posted I'm not sure any statistical test is going to be that informative. If you had a strong prediction of a pattern such as this or similar, this is such a low probability event that you're pretty much set just getting these data. With an N of 400 almost any test...
How to test if change is significant across multiple categories?
Given the additional information you've subsequently posted I'm not sure any statistical test is going to be that informative. If you had a strong prediction of a pattern such as this or similar, thi
How to test if change is significant across multiple categories? Given the additional information you've subsequently posted I'm not sure any statistical test is going to be that informative. If you had a strong prediction of a pattern such as this or similar, this is such a low probability event that you're pretty mu...
How to test if change is significant across multiple categories? Given the additional information you've subsequently posted I'm not sure any statistical test is going to be that informative. If you had a strong prediction of a pattern such as this or similar, thi
55,512
Expected distribution of random draws
The expected frequency of observing $k$ purple balls in $d$ draws (without replacement) from an urn of $p$ purple balls and $n-p$ other balls is obtained by counting and equals $$\frac{{p \choose k} {n-p \choose d-k} }{{n \choose d}}.$$ Test a sample (of say $100$) such experiments with a chi-squared statistic using th...
Expected distribution of random draws
The expected frequency of observing $k$ purple balls in $d$ draws (without replacement) from an urn of $p$ purple balls and $n-p$ other balls is obtained by counting and equals $$\frac{{p \choose k} {
Expected distribution of random draws The expected frequency of observing $k$ purple balls in $d$ draws (without replacement) from an urn of $p$ purple balls and $n-p$ other balls is obtained by counting and equals $$\frac{{p \choose k} {n-p \choose d-k} }{{n \choose d}}.$$ Test a sample (of say $100$) such experiments...
Expected distribution of random draws The expected frequency of observing $k$ purple balls in $d$ draws (without replacement) from an urn of $p$ purple balls and $n-p$ other balls is obtained by counting and equals $$\frac{{p \choose k} {
55,513
Expected distribution of random draws
First Part: The draws from the urn follow a hypergeometric distribution assuming random draws. Any deviation from the theoretical probabilities vis-a-vis the observed frequencies can be evaluated using chi-square tests. Second Part: Let: $n \sim U(20,30)$ be the total number of balls in the urn $p \sim U(0,4)$ be the ...
Expected distribution of random draws
First Part: The draws from the urn follow a hypergeometric distribution assuming random draws. Any deviation from the theoretical probabilities vis-a-vis the observed frequencies can be evaluated usin
Expected distribution of random draws First Part: The draws from the urn follow a hypergeometric distribution assuming random draws. Any deviation from the theoretical probabilities vis-a-vis the observed frequencies can be evaluated using chi-square tests. Second Part: Let: $n \sim U(20,30)$ be the total number of ba...
Expected distribution of random draws First Part: The draws from the urn follow a hypergeometric distribution assuming random draws. Any deviation from the theoretical probabilities vis-a-vis the observed frequencies can be evaluated usin
55,514
Expected distribution of random draws
So here is my motivation for the questions, although I know this is not necessary I like it when people follow up on their questions so I will do the same. I would like to thank both Srikant and whuber for their helpful answers. (I ask no-one upvote this as it is not an answer to the question and both whuber's and Srik...
Expected distribution of random draws
So here is my motivation for the questions, although I know this is not necessary I like it when people follow up on their questions so I will do the same. I would like to thank both Srikant and whube
Expected distribution of random draws So here is my motivation for the questions, although I know this is not necessary I like it when people follow up on their questions so I will do the same. I would like to thank both Srikant and whuber for their helpful answers. (I ask no-one upvote this as it is not an answer to t...
Expected distribution of random draws So here is my motivation for the questions, although I know this is not necessary I like it when people follow up on their questions so I will do the same. I would like to thank both Srikant and whube
55,515
When is it acceptable to collapse across groups when performing a factor analysis?
There seems to be two cases to consider, depending on whether your scale was already validated using standard psychometric methods (from classical test or item response theory). In what follows, I will consider the first case where I assume preliminary studies have demonstrated construct validity and scores reliability...
When is it acceptable to collapse across groups when performing a factor analysis?
There seems to be two cases to consider, depending on whether your scale was already validated using standard psychometric methods (from classical test or item response theory). In what follows, I wil
When is it acceptable to collapse across groups when performing a factor analysis? There seems to be two cases to consider, depending on whether your scale was already validated using standard psychometric methods (from classical test or item response theory). In what follows, I will consider the first case where I ass...
When is it acceptable to collapse across groups when performing a factor analysis? There seems to be two cases to consider, depending on whether your scale was already validated using standard psychometric methods (from classical test or item response theory). In what follows, I wil
55,516
When is it acceptable to collapse across groups when performing a factor analysis?
The approach you mention seems reasonable, but you'd have to take into account that you cannot see the total dataset as a single population. So theoretically, you should use any kind of method that can take differences between those groups into account, similar to using "group" as a random term in an ANOVA or GLM appro...
When is it acceptable to collapse across groups when performing a factor analysis?
The approach you mention seems reasonable, but you'd have to take into account that you cannot see the total dataset as a single population. So theoretically, you should use any kind of method that ca
When is it acceptable to collapse across groups when performing a factor analysis? The approach you mention seems reasonable, but you'd have to take into account that you cannot see the total dataset as a single population. So theoretically, you should use any kind of method that can take differences between those grou...
When is it acceptable to collapse across groups when performing a factor analysis? The approach you mention seems reasonable, but you'd have to take into account that you cannot see the total dataset as a single population. So theoretically, you should use any kind of method that ca
55,517
When is it acceptable to collapse across groups when performing a factor analysis?
It might be a little fly by night, but your theory may suggest whether the two groups have the same factor structure or not. If your theory suggests they do, and there is no reason to doubt the theory, I'd suggest you could go right ahead and trust that they have the same factor structure. Your empirical assessment ...
When is it acceptable to collapse across groups when performing a factor analysis?
It might be a little fly by night, but your theory may suggest whether the two groups have the same factor structure or not. If your theory suggests they do, and there is no reason to doubt the theor
When is it acceptable to collapse across groups when performing a factor analysis? It might be a little fly by night, but your theory may suggest whether the two groups have the same factor structure or not. If your theory suggests they do, and there is no reason to doubt the theory, I'd suggest you could go right ahe...
When is it acceptable to collapse across groups when performing a factor analysis? It might be a little fly by night, but your theory may suggest whether the two groups have the same factor structure or not. If your theory suggests they do, and there is no reason to doubt the theor
55,518
Two answers to the dartboard problem
Intuitively, imagine modeling the second formulation as follows: randomly select an angle to the $x$-axis, calling it $\theta$, then model the location of the dart as falling uniformly in a very thin rectangle along the line $y = (\tan\theta) x$. Approximately, the dart is in the inner circle with probability $1/3$. H...
Two answers to the dartboard problem
Intuitively, imagine modeling the second formulation as follows: randomly select an angle to the $x$-axis, calling it $\theta$, then model the location of the dart as falling uniformly in a very thin
Two answers to the dartboard problem Intuitively, imagine modeling the second formulation as follows: randomly select an angle to the $x$-axis, calling it $\theta$, then model the location of the dart as falling uniformly in a very thin rectangle along the line $y = (\tan\theta) x$. Approximately, the dart is in the i...
Two answers to the dartboard problem Intuitively, imagine modeling the second formulation as follows: randomly select an angle to the $x$-axis, calling it $\theta$, then model the location of the dart as falling uniformly in a very thin
55,519
Two answers to the dartboard problem
It seems to me that the fundamental issue is that the two scenarios assume different data generating process for the position of a dart which results in different probabilities. The first situation's data generating process looks like so: (a) Pick a $x \in U[-1,1]$ and (b) Pick a $y$ uniformly subject to the constrain...
Two answers to the dartboard problem
It seems to me that the fundamental issue is that the two scenarios assume different data generating process for the position of a dart which results in different probabilities. The first situation's
Two answers to the dartboard problem It seems to me that the fundamental issue is that the two scenarios assume different data generating process for the position of a dart which results in different probabilities. The first situation's data generating process looks like so: (a) Pick a $x \in U[-1,1]$ and (b) Pick a $...
Two answers to the dartboard problem It seems to me that the fundamental issue is that the two scenarios assume different data generating process for the position of a dart which results in different probabilities. The first situation's
55,520
Two answers to the dartboard problem
Think of the board as a filter -- it just converts the positions on board into an id of a field that dart hit. So that the output will be only a deterministically converted input -- and thus it is obvious that different realization of throwing darts will result in distribution of results. The paradox itself is purely l...
Two answers to the dartboard problem
Think of the board as a filter -- it just converts the positions on board into an id of a field that dart hit. So that the output will be only a deterministically converted input -- and thus it is obv
Two answers to the dartboard problem Think of the board as a filter -- it just converts the positions on board into an id of a field that dart hit. So that the output will be only a deterministically converted input -- and thus it is obvious that different realization of throwing darts will result in distribution of re...
Two answers to the dartboard problem Think of the board as a filter -- it just converts the positions on board into an id of a field that dart hit. So that the output will be only a deterministically converted input -- and thus it is obv
55,521
Method to compare variable coefficient in two regression models
Here is my suggestion. Rerun your model(s) using one single regression. And, the Summer/Winter variable would be simply a single dummy variable (1,0). This way you would have a coefficient for Summer to differentiate it from Winter. And, the regression coefficients for your three other variables would be consistent...
Method to compare variable coefficient in two regression models
Here is my suggestion. Rerun your model(s) using one single regression. And, the Summer/Winter variable would be simply a single dummy variable (1,0). This way you would have a coefficient for Summ
Method to compare variable coefficient in two regression models Here is my suggestion. Rerun your model(s) using one single regression. And, the Summer/Winter variable would be simply a single dummy variable (1,0). This way you would have a coefficient for Summer to differentiate it from Winter. And, the regression...
Method to compare variable coefficient in two regression models Here is my suggestion. Rerun your model(s) using one single regression. And, the Summer/Winter variable would be simply a single dummy variable (1,0). This way you would have a coefficient for Summ
55,522
Method to compare variable coefficient in two regression models
One answer is to do a seemingly unrelated regression. Suppose that you only have a single predictor plus an intercept. Create a data set (or data matrix) like wo 1 wp 0 0 so 0 0 1 sp where 'wo' is the outcome in the winter season and 'wp' is the winter predictor/"X" value and 'so' is the summer outcome value and 'sp'...
Method to compare variable coefficient in two regression models
One answer is to do a seemingly unrelated regression. Suppose that you only have a single predictor plus an intercept. Create a data set (or data matrix) like wo 1 wp 0 0 so 0 0 1 sp where 'wo' is t
Method to compare variable coefficient in two regression models One answer is to do a seemingly unrelated regression. Suppose that you only have a single predictor plus an intercept. Create a data set (or data matrix) like wo 1 wp 0 0 so 0 0 1 sp where 'wo' is the outcome in the winter season and 'wp' is the winter p...
Method to compare variable coefficient in two regression models One answer is to do a seemingly unrelated regression. Suppose that you only have a single predictor plus an intercept. Create a data set (or data matrix) like wo 1 wp 0 0 so 0 0 1 sp where 'wo' is t
55,523
Good references on communicating the results of a statistical analysis to laypeople or non-expert stakeholders?
I picked up lots of useful tips from The Art of Statistics by David Spiegelhalter. I think he does an exceptional job of communicating some very abstract concepts without flattening the nuance in the process
Good references on communicating the results of a statistical analysis to laypeople or non-expert st
I picked up lots of useful tips from The Art of Statistics by David Spiegelhalter. I think he does an exceptional job of communicating some very abstract concepts without flattening the nuance in the
Good references on communicating the results of a statistical analysis to laypeople or non-expert stakeholders? I picked up lots of useful tips from The Art of Statistics by David Spiegelhalter. I think he does an exceptional job of communicating some very abstract concepts without flattening the nuance in the process
Good references on communicating the results of a statistical analysis to laypeople or non-expert st I picked up lots of useful tips from The Art of Statistics by David Spiegelhalter. I think he does an exceptional job of communicating some very abstract concepts without flattening the nuance in the
55,524
GLM dropping an interaction
You actually need to remove the main effect of ano0. So your model formula should be casos ~ 0 + municipio + municipio:ano0 + offset(log(populacao)) I know it looks like you're omitting a term, but you will estimate exactly the same number of parameters and the model fit will be identical. This gives you an inter...
GLM dropping an interaction
You actually need to remove the main effect of ano0. So your model formula should be casos ~ 0 + municipio + municipio:ano0 + offset(log(populacao)) I know it looks like you're omitting a term,
GLM dropping an interaction You actually need to remove the main effect of ano0. So your model formula should be casos ~ 0 + municipio + municipio:ano0 + offset(log(populacao)) I know it looks like you're omitting a term, but you will estimate exactly the same number of parameters and the model fit will be identi...
GLM dropping an interaction You actually need to remove the main effect of ano0. So your model formula should be casos ~ 0 + municipio + municipio:ano0 + offset(log(populacao)) I know it looks like you're omitting a term,
55,525
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$?
The definition of the hypoexponential distribution (HD) requires that: $$f(x)=\sum_i^d \left(\prod_{j=1,i\neq j}^{d}\frac{\lambda_j}{\lambda_j-\lambda_i}\right)\lambda_i e^{(-\lambda_ix)},\quad x>0 $$ that expression is only a special case when $\lambda_i \neq \lambda_j$. It is not a requirement for the hypoexponentia...
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$?
The definition of the hypoexponential distribution (HD) requires that: $$f(x)=\sum_i^d \left(\prod_{j=1,i\neq j}^{d}\frac{\lambda_j}{\lambda_j-\lambda_i}\right)\lambda_i e^{(-\lambda_ix)},\quad x>0 $$
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$? The definition of the hypoexponential distribution (HD) requires that: $$f(x)=\sum_i^d \left(\prod_{j=1,i\neq j}^{d}\frac{\lambda_j}{\lambda_j-\lambda_i}\right)\lambda_i e^{(-\lambda_ix)},\quad x>0 $$ that expression is only a special case wh...
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$? The definition of the hypoexponential distribution (HD) requires that: $$f(x)=\sum_i^d \left(\prod_{j=1,i\neq j}^{d}\frac{\lambda_j}{\lambda_j-\lambda_i}\right)\lambda_i e^{(-\lambda_ix)},\quad x>0 $$
55,526
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$?
The distribution in question is a mixture of Exponential distributions $\mathcal E(\lambda_i)$ with specified weight, i.e. its density is $$f(x) = \sum_{i=1}^d p_i\,\lambda_i\exp\{-\lambda_i x\}\quad x\ge 0\tag{1}$$ with $$p_i=\prod_{j=1\\ j\ne i}^d\dfrac{\lambda_j}{\lambda_i-\lambda_j}\quad i=1,\ldots,d$$ There is the...
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$?
The distribution in question is a mixture of Exponential distributions $\mathcal E(\lambda_i)$ with specified weight, i.e. its density is $$f(x) = \sum_{i=1}^d p_i\,\lambda_i\exp\{-\lambda_i x\}\quad
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$? The distribution in question is a mixture of Exponential distributions $\mathcal E(\lambda_i)$ with specified weight, i.e. its density is $$f(x) = \sum_{i=1}^d p_i\,\lambda_i\exp\{-\lambda_i x\}\quad x\ge 0\tag{1}$$ with $$p_i=\prod_{j=1\\ j\n...
Hypoexponential distribution is stuck because of $\lambda_i \neq \lambda_j$? The distribution in question is a mixture of Exponential distributions $\mathcal E(\lambda_i)$ with specified weight, i.e. its density is $$f(x) = \sum_{i=1}^d p_i\,\lambda_i\exp\{-\lambda_i x\}\quad
55,527
Quantifying the confidence that the most sampled outcome is the most probable outcome
Using Bayesian methods, you could start with a conjugate Dirichlet prior for the probabilities of the six sides, update it with your observations, and then find the probability from the Dirichlet posterior that side five has the highest underlying probability of the six sides. This will be affected slightly by the pri...
Quantifying the confidence that the most sampled outcome is the most probable outcome
Using Bayesian methods, you could start with a conjugate Dirichlet prior for the probabilities of the six sides, update it with your observations, and then find the probability from the Dirichlet pos
Quantifying the confidence that the most sampled outcome is the most probable outcome Using Bayesian methods, you could start with a conjugate Dirichlet prior for the probabilities of the six sides, update it with your observations, and then find the probability from the Dirichlet posterior that side five has the high...
Quantifying the confidence that the most sampled outcome is the most probable outcome Using Bayesian methods, you could start with a conjugate Dirichlet prior for the probabilities of the six sides, update it with your observations, and then find the probability from the Dirichlet pos
55,528
Quantifying the confidence that the most sampled outcome is the most probable outcome
We can use profile likelihood methods to construct a confidence interval for the maximum probability $\theta = \max_{j=1}^k p_k$. Here $p_1, p_2, \dotsc, p_k$ represent the discrete distribution of dice rolls, where in your example $p_5$ is somewhat larger than the others. The results of $n$ dice rolls is given by th...
Quantifying the confidence that the most sampled outcome is the most probable outcome
We can use profile likelihood methods to construct a confidence interval for the maximum probability $\theta = \max_{j=1}^k p_k$. Here $p_1, p_2, \dotsc, p_k$ represent the discrete distribution of d
Quantifying the confidence that the most sampled outcome is the most probable outcome We can use profile likelihood methods to construct a confidence interval for the maximum probability $\theta = \max_{j=1}^k p_k$. Here $p_1, p_2, \dotsc, p_k$ represent the discrete distribution of dice rolls, where in your example $...
Quantifying the confidence that the most sampled outcome is the most probable outcome We can use profile likelihood methods to construct a confidence interval for the maximum probability $\theta = \max_{j=1}^k p_k$. Here $p_1, p_2, \dotsc, p_k$ represent the discrete distribution of d
55,529
VECM: alpha is a 0-vector? cointegration rank = $k$ even though $X_t$ is I(1)?
A brief answer: You logic is correct. In theory, this should not happen. In practice, this may be caused by estimation imprecision and/or low power of tests. In theory, the lag does not matter. As long as the lag is finite, the appropriate linear combination of the cointegrated series is a finite sum of I(0) elements,...
VECM: alpha is a 0-vector? cointegration rank = $k$ even though $X_t$ is I(1)?
A brief answer: You logic is correct. In theory, this should not happen. In practice, this may be caused by estimation imprecision and/or low power of tests. In theory, the lag does not matter. As lo
VECM: alpha is a 0-vector? cointegration rank = $k$ even though $X_t$ is I(1)? A brief answer: You logic is correct. In theory, this should not happen. In practice, this may be caused by estimation imprecision and/or low power of tests. In theory, the lag does not matter. As long as the lag is finite, the appropriate ...
VECM: alpha is a 0-vector? cointegration rank = $k$ even though $X_t$ is I(1)? A brief answer: You logic is correct. In theory, this should not happen. In practice, this may be caused by estimation imprecision and/or low power of tests. In theory, the lag does not matter. As lo
55,530
Random number generator for non-central chi-squared with non-integer dimension
I am assuming you know how to generate random draws from a central chi-squared distribution, or from its equivalent gamma version; see below for the details. I also suggest possible readings on algorithms for the generation of random variates from a gamma distribution, in case this premise does not hold; see also the r...
Random number generator for non-central chi-squared with non-integer dimension
I am assuming you know how to generate random draws from a central chi-squared distribution, or from its equivalent gamma version; see below for the details. I also suggest possible readings on algori
Random number generator for non-central chi-squared with non-integer dimension I am assuming you know how to generate random draws from a central chi-squared distribution, or from its equivalent gamma version; see below for the details. I also suggest possible readings on algorithms for the generation of random variate...
Random number generator for non-central chi-squared with non-integer dimension I am assuming you know how to generate random draws from a central chi-squared distribution, or from its equivalent gamma version; see below for the details. I also suggest possible readings on algori
55,531
How to Find PDF of Transformed Random Variables Numerically?
As far as I can tell, R doesn't have such symbolic computation capabilities; though R does have some limited symbolic computation capabilities (e.g. the command D computes symbolically the derivative of a user-provided function). Nevertheless, when the analytical computation is hard/long, or you are sceptical about you...
How to Find PDF of Transformed Random Variables Numerically?
As far as I can tell, R doesn't have such symbolic computation capabilities; though R does have some limited symbolic computation capabilities (e.g. the command D computes symbolically the derivative
How to Find PDF of Transformed Random Variables Numerically? As far as I can tell, R doesn't have such symbolic computation capabilities; though R does have some limited symbolic computation capabilities (e.g. the command D computes symbolically the derivative of a user-provided function). Nevertheless, when the analyt...
How to Find PDF of Transformed Random Variables Numerically? As far as I can tell, R doesn't have such symbolic computation capabilities; though R does have some limited symbolic computation capabilities (e.g. the command D computes symbolically the derivative
55,532
Boosting definition clarification
Both definitions are reasonable working definitions and equally valid as they capture the iterative nature of boosting algorithms. I view the first one as more general because the iterative nature of boosting was not strictly speaking a requirement early on. Originally boosting was defined with respect to PAC learning ...
Boosting definition clarification
Both definitions are reasonable working definitions and equally valid as they capture the iterative nature of boosting algorithms. I view the first one as more general because the iterative nature of
Boosting definition clarification Both definitions are reasonable working definitions and equally valid as they capture the iterative nature of boosting algorithms. I view the first one as more general because the iterative nature of boosting was not strictly speaking a requirement early on. Originally boosting was def...
Boosting definition clarification Both definitions are reasonable working definitions and equally valid as they capture the iterative nature of boosting algorithms. I view the first one as more general because the iterative nature of
55,533
What is the meaning of squared root n when we talk about asymptotic properties?
It "comes from" the central limit theorem, see What intuitive explanation is there for the central limit theorem?. It turns out that for many, although clearly not all estimators, scaling the estimation error $\hat\beta-\beta$ by $\sqrt{n}$ yields a nondegenerate asymptotic normal distribution. See root-n consistent es...
What is the meaning of squared root n when we talk about asymptotic properties?
It "comes from" the central limit theorem, see What intuitive explanation is there for the central limit theorem?. It turns out that for many, although clearly not all estimators, scaling the estimati
What is the meaning of squared root n when we talk about asymptotic properties? It "comes from" the central limit theorem, see What intuitive explanation is there for the central limit theorem?. It turns out that for many, although clearly not all estimators, scaling the estimation error $\hat\beta-\beta$ by $\sqrt{n}$...
What is the meaning of squared root n when we talk about asymptotic properties? It "comes from" the central limit theorem, see What intuitive explanation is there for the central limit theorem?. It turns out that for many, although clearly not all estimators, scaling the estimati
55,534
bootstrapping a linear mixed model with R's lmeresampler or lme4 or a robust regression?
You can certainly use bootstrapping with the (new to me) lmeresampler package but, as you point out, there are only 21 students/participants. You should expect lots of uncertainty, esp. about the interaction. It's often helpful to start by visualizing the data. First let's look at the main effects. The plot below tells...
bootstrapping a linear mixed model with R's lmeresampler or lme4 or a robust regression?
You can certainly use bootstrapping with the (new to me) lmeresampler package but, as you point out, there are only 21 students/participants. You should expect lots of uncertainty, esp. about the inte
bootstrapping a linear mixed model with R's lmeresampler or lme4 or a robust regression? You can certainly use bootstrapping with the (new to me) lmeresampler package but, as you point out, there are only 21 students/participants. You should expect lots of uncertainty, esp. about the interaction. It's often helpful to ...
bootstrapping a linear mixed model with R's lmeresampler or lme4 or a robust regression? You can certainly use bootstrapping with the (new to me) lmeresampler package but, as you point out, there are only 21 students/participants. You should expect lots of uncertainty, esp. about the inte
55,535
Levels of significance for a publication
To have two significant figures, $0.06$ should be written as $0.61$ (to rule out something like $0.062$), and $0.003$ should be written as $0.0030$ (to rule out something like $0.0031$). Additionally, $0.00021>0.0001$, so that should be written as $0.00021$.
Levels of significance for a publication
To have two significant figures, $0.06$ should be written as $0.61$ (to rule out something like $0.062$), and $0.003$ should be written as $0.0030$ (to rule out something like $0.0031$). Additionally,
Levels of significance for a publication To have two significant figures, $0.06$ should be written as $0.61$ (to rule out something like $0.062$), and $0.003$ should be written as $0.0030$ (to rule out something like $0.0031$). Additionally, $0.00021>0.0001$, so that should be written as $0.00021$.
Levels of significance for a publication To have two significant figures, $0.06$ should be written as $0.61$ (to rule out something like $0.062$), and $0.003$ should be written as $0.0030$ (to rule out something like $0.0031$). Additionally,
55,536
Does gridsearch on random forest/extra trees make sense?
You are right that randomness will play a role (like with many other algorithms including MCMC samplers for Bayesian models, XGBoost, LightGBM, neural networks etc.) in the results. The obvious way to minimize randomness in the results of any hyper-parameter optimization method for RF (whether it's random grid-search, ...
Does gridsearch on random forest/extra trees make sense?
You are right that randomness will play a role (like with many other algorithms including MCMC samplers for Bayesian models, XGBoost, LightGBM, neural networks etc.) in the results. The obvious way to
Does gridsearch on random forest/extra trees make sense? You are right that randomness will play a role (like with many other algorithms including MCMC samplers for Bayesian models, XGBoost, LightGBM, neural networks etc.) in the results. The obvious way to minimize randomness in the results of any hyper-parameter opti...
Does gridsearch on random forest/extra trees make sense? You are right that randomness will play a role (like with many other algorithms including MCMC samplers for Bayesian models, XGBoost, LightGBM, neural networks etc.) in the results. The obvious way to
55,537
Does gridsearch on random forest/extra trees make sense?
To add a little to @Björn's answer, when the model selection criterion is noisy (or there is a random element to the classifier) grid search (or random search) actually makes more sense than some more elegant or more efficient model selection procedures, such as gradient descent or Nelder-Mead simplex, where the random...
Does gridsearch on random forest/extra trees make sense?
To add a little to @Björn's answer, when the model selection criterion is noisy (or there is a random element to the classifier) grid search (or random search) actually makes more sense than some more
Does gridsearch on random forest/extra trees make sense? To add a little to @Björn's answer, when the model selection criterion is noisy (or there is a random element to the classifier) grid search (or random search) actually makes more sense than some more elegant or more efficient model selection procedures, such as ...
Does gridsearch on random forest/extra trees make sense? To add a little to @Björn's answer, when the model selection criterion is noisy (or there is a random element to the classifier) grid search (or random search) actually makes more sense than some more
55,538
Calculating accuracy of prediction
I'll take a somewhat different track from Demetri. There are multiple aspects here. A best quantification of prediction accuracy is surprisingly tricky. An accuracy measure is, for practical purposes, a mapping $f$ that takes your point prediction $\hat{p}$ (the predicted proportion of blue marbles, say) and a random s...
Calculating accuracy of prediction
I'll take a somewhat different track from Demetri. There are multiple aspects here. A best quantification of prediction accuracy is surprisingly tricky. An accuracy measure is, for practical purposes,
Calculating accuracy of prediction I'll take a somewhat different track from Demetri. There are multiple aspects here. A best quantification of prediction accuracy is surprisingly tricky. An accuracy measure is, for practical purposes, a mapping $f$ that takes your point prediction $\hat{p}$ (the predicted proportion o...
Calculating accuracy of prediction I'll take a somewhat different track from Demetri. There are multiple aspects here. A best quantification of prediction accuracy is surprisingly tricky. An accuracy measure is, for practical purposes,
55,539
Calculating accuracy of prediction
Is it possible to restrict such a quantification to a range between 0 and 100%, such that a correct prediction (20%) would evaluate to a 100% accuracy? I don't believe so. What you're asking is "is there a way to know when my prediction is equal to the truth" and that just can't be done. That is the entire reason we...
Calculating accuracy of prediction
Is it possible to restrict such a quantification to a range between 0 and 100%, such that a correct prediction (20%) would evaluate to a 100% accuracy? I don't believe so. What you're asking is "is
Calculating accuracy of prediction Is it possible to restrict such a quantification to a range between 0 and 100%, such that a correct prediction (20%) would evaluate to a 100% accuracy? I don't believe so. What you're asking is "is there a way to know when my prediction is equal to the truth" and that just can't be ...
Calculating accuracy of prediction Is it possible to restrict such a quantification to a range between 0 and 100%, such that a correct prediction (20%) would evaluate to a 100% accuracy? I don't believe so. What you're asking is "is
55,540
Interpretation of correlation coefficient between two binary variables
There are several possible interpretations. They come down to understanding the correlation between two binary variables. By definition, the correlation of a joint random variable $(X,Y)$ is the expectation of the product of the standardized versions of these variables. This leads to several useful formulas commonly ...
Interpretation of correlation coefficient between two binary variables
There are several possible interpretations. They come down to understanding the correlation between two binary variables. By definition, the correlation of a joint random variable $(X,Y)$ is the expe
Interpretation of correlation coefficient between two binary variables There are several possible interpretations. They come down to understanding the correlation between two binary variables. By definition, the correlation of a joint random variable $(X,Y)$ is the expectation of the product of the standardized versio...
Interpretation of correlation coefficient between two binary variables There are several possible interpretations. They come down to understanding the correlation between two binary variables. By definition, the correlation of a joint random variable $(X,Y)$ is the expe
55,541
Interpretation of correlation coefficient between two binary variables
For binary data, the correlation coefficient is: $$r = \frac{p_{11}-p_{1 \bullet} p_{\bullet 1}}{\sqrt{p_{1 \bullet} p_{\bullet 1} (1-p_{1 \bullet})(1-p_{\bullet 1})}},$$ where $p_{1 \bullet}$ and $p_{\bullet 1}$ are the proportions of occurrences for each individual variable and $p_{11}$ is the proportion of mutual oc...
Interpretation of correlation coefficient between two binary variables
For binary data, the correlation coefficient is: $$r = \frac{p_{11}-p_{1 \bullet} p_{\bullet 1}}{\sqrt{p_{1 \bullet} p_{\bullet 1} (1-p_{1 \bullet})(1-p_{\bullet 1})}},$$ where $p_{1 \bullet}$ and $p_
Interpretation of correlation coefficient between two binary variables For binary data, the correlation coefficient is: $$r = \frac{p_{11}-p_{1 \bullet} p_{\bullet 1}}{\sqrt{p_{1 \bullet} p_{\bullet 1} (1-p_{1 \bullet})(1-p_{\bullet 1})}},$$ where $p_{1 \bullet}$ and $p_{\bullet 1}$ are the proportions of occurrences f...
Interpretation of correlation coefficient between two binary variables For binary data, the correlation coefficient is: $$r = \frac{p_{11}-p_{1 \bullet} p_{\bullet 1}}{\sqrt{p_{1 \bullet} p_{\bullet 1} (1-p_{1 \bullet})(1-p_{\bullet 1})}},$$ where $p_{1 \bullet}$ and $p_
55,542
Simulating a joint distribution with the inverse method
For the record, integrating out $y$ gives the marginal density $$f_X(x) = \int_0^1 f(x,y)\,\mathrm{d}y = 3x^2e^{-x^3}.$$ By inspection (or integration via a substitution for $x^3$) this has distribution function $$F_X(x) = 1 - e^{-x^3}\quad (x \ge 0).$$ Conditional on $x,$ the density of $y$ is proportional to $y^x,$ w...
Simulating a joint distribution with the inverse method
For the record, integrating out $y$ gives the marginal density $$f_X(x) = \int_0^1 f(x,y)\,\mathrm{d}y = 3x^2e^{-x^3}.$$ By inspection (or integration via a substitution for $x^3$) this has distributi
Simulating a joint distribution with the inverse method For the record, integrating out $y$ gives the marginal density $$f_X(x) = \int_0^1 f(x,y)\,\mathrm{d}y = 3x^2e^{-x^3}.$$ By inspection (or integration via a substitution for $x^3$) this has distribution function $$F_X(x) = 1 - e^{-x^3}\quad (x \ge 0).$$ Conditiona...
Simulating a joint distribution with the inverse method For the record, integrating out $y$ gives the marginal density $$f_X(x) = \int_0^1 f(x,y)\,\mathrm{d}y = 3x^2e^{-x^3}.$$ By inspection (or integration via a substitution for $x^3$) this has distributi
55,543
Is there a preference in the regression performance metric for regression models with the same type of loss minimization?
Dave's answer has nothing to do with whether there's bias in an in-sample metric vs. an out-of-sample metric when the algorithm optimizes the in-sample metric. His answer addresses whether minimizing the in-sample metric necessarily also minimizes the (expected) out-of-sample metric (Edit: it doesn't); it says nothing...
Is there a preference in the regression performance metric for regression models with the same type
Dave's answer has nothing to do with whether there's bias in an in-sample metric vs. an out-of-sample metric when the algorithm optimizes the in-sample metric. His answer addresses whether minimizing
Is there a preference in the regression performance metric for regression models with the same type of loss minimization? Dave's answer has nothing to do with whether there's bias in an in-sample metric vs. an out-of-sample metric when the algorithm optimizes the in-sample metric. His answer addresses whether minimizi...
Is there a preference in the regression performance metric for regression models with the same type Dave's answer has nothing to do with whether there's bias in an in-sample metric vs. an out-of-sample metric when the algorithm optimizes the in-sample metric. His answer addresses whether minimizing
55,544
Is there a preference in the regression performance metric for regression models with the same type of loss minimization?
Since the out-of-sample data are different from the in-sample data, all bets are off when it comes to what the out-of-sample metric chooses as its preferred model. In some sense, we are tuning the in-sample loss function as a hyperparameter in order to achieve the best out-of-sample performance on our metric of choice....
Is there a preference in the regression performance metric for regression models with the same type
Since the out-of-sample data are different from the in-sample data, all bets are off when it comes to what the out-of-sample metric chooses as its preferred model. In some sense, we are tuning the in-
Is there a preference in the regression performance metric for regression models with the same type of loss minimization? Since the out-of-sample data are different from the in-sample data, all bets are off when it comes to what the out-of-sample metric chooses as its preferred model. In some sense, we are tuning the i...
Is there a preference in the regression performance metric for regression models with the same type Since the out-of-sample data are different from the in-sample data, all bets are off when it comes to what the out-of-sample metric chooses as its preferred model. In some sense, we are tuning the in-
55,545
A universal measure of the accuracy of linear regression models
You say that you don’t want to use a metric that is going to prefer a particular model, so out-of-sample (R)MSE is out because it will prefer the model that was trained with square loss. Au contraire! Let’s do a simulation and show a model trained by minimizing square loss having greater out-of-sample square loss than ...
A universal measure of the accuracy of linear regression models
You say that you don’t want to use a metric that is going to prefer a particular model, so out-of-sample (R)MSE is out because it will prefer the model that was trained with square loss. Au contraire!
A universal measure of the accuracy of linear regression models You say that you don’t want to use a metric that is going to prefer a particular model, so out-of-sample (R)MSE is out because it will prefer the model that was trained with square loss. Au contraire! Let’s do a simulation and show a model trained by minim...
A universal measure of the accuracy of linear regression models You say that you don’t want to use a metric that is going to prefer a particular model, so out-of-sample (R)MSE is out because it will prefer the model that was trained with square loss. Au contraire!
55,546
A universal measure of the accuracy of linear regression models
RMSE tells us how far the model residuals are from zero on average, i.e. the average distance between the observed values and the predicate values. However, Willmott et. al. suggested that RMSE might be misleading to assess the model performance since RMSE is a function of the average error and the distribution of squ...
A universal measure of the accuracy of linear regression models
RMSE tells us how far the model residuals are from zero on average, i.e. the average distance between the observed values and the predicate values. However, Willmott et. al. suggested that RMSE might
A universal measure of the accuracy of linear regression models RMSE tells us how far the model residuals are from zero on average, i.e. the average distance between the observed values and the predicate values. However, Willmott et. al. suggested that RMSE might be misleading to assess the model performance since RMSE...
A universal measure of the accuracy of linear regression models RMSE tells us how far the model residuals are from zero on average, i.e. the average distance between the observed values and the predicate values. However, Willmott et. al. suggested that RMSE might
55,547
Closed form for a markov chain, where transition probabilities depend on $n$?
Let $a_{n+1} = \log(1 - \Pr(A_{n+1}))$ for $n=d, d+1, \ldots.$ In these terms the recurrence reads $$\begin{aligned} a_{n+1} &= \log(1 - [\Pr(A_n) + 2^{-n}(1 - \Pr(A_n))])\\ &= \log((1-2^{-n})(1 - \Pr(A_n))\\ &= \log(1 - 2^{-n}) + \log(1-\Pr(A_n)) \\ &= \log(1 - 2^{-n}) + a_n \end{aligned}$$ with initial condition $a_...
Closed form for a markov chain, where transition probabilities depend on $n$?
Let $a_{n+1} = \log(1 - \Pr(A_{n+1}))$ for $n=d, d+1, \ldots.$ In these terms the recurrence reads $$\begin{aligned} a_{n+1} &= \log(1 - [\Pr(A_n) + 2^{-n}(1 - \Pr(A_n))])\\ &= \log((1-2^{-n})(1 - \P
Closed form for a markov chain, where transition probabilities depend on $n$? Let $a_{n+1} = \log(1 - \Pr(A_{n+1}))$ for $n=d, d+1, \ldots.$ In these terms the recurrence reads $$\begin{aligned} a_{n+1} &= \log(1 - [\Pr(A_n) + 2^{-n}(1 - \Pr(A_n))])\\ &= \log((1-2^{-n})(1 - \Pr(A_n))\\ &= \log(1 - 2^{-n}) + \log(1-\Pr...
Closed form for a markov chain, where transition probabilities depend on $n$? Let $a_{n+1} = \log(1 - \Pr(A_{n+1}))$ for $n=d, d+1, \ldots.$ In these terms the recurrence reads $$\begin{aligned} a_{n+1} &= \log(1 - [\Pr(A_n) + 2^{-n}(1 - \Pr(A_n))])\\ &= \log((1-2^{-n})(1 - \P
55,548
Arguing against statistical power
IIUC, you interaction term is a hidden confounder? In this case, indeed you should compute your effects conditioned on that confounder. The average causal effect would then be computed with the standard formula for backdoor adjustment.
Arguing against statistical power
IIUC, you interaction term is a hidden confounder? In this case, indeed you should compute your effects conditioned on that confounder. The average causal effect would then be computed with the standa
Arguing against statistical power IIUC, you interaction term is a hidden confounder? In this case, indeed you should compute your effects conditioned on that confounder. The average causal effect would then be computed with the standard formula for backdoor adjustment.
Arguing against statistical power IIUC, you interaction term is a hidden confounder? In this case, indeed you should compute your effects conditioned on that confounder. The average causal effect would then be computed with the standa
55,549
Arguing against statistical power
If you have two populations, it doesn't make sense to model one mean. I think you should model the difference as a fixed effect (i.e. as a covariate). This means you estimate two means, but gain the power from having one model - best of both worlds?
Arguing against statistical power
If you have two populations, it doesn't make sense to model one mean. I think you should model the difference as a fixed effect (i.e. as a covariate). This means you estimate two means, but gain the p
Arguing against statistical power If you have two populations, it doesn't make sense to model one mean. I think you should model the difference as a fixed effect (i.e. as a covariate). This means you estimate two means, but gain the power from having one model - best of both worlds?
Arguing against statistical power If you have two populations, it doesn't make sense to model one mean. I think you should model the difference as a fixed effect (i.e. as a covariate). This means you estimate two means, but gain the p
55,550
When not to use the elastic net penalty in regression?
I am not aware of any practical situation where Ridge or Lasso are preferable to Elastic Net. The large-sample (asymptotic) theory for Ridge and Lasso seem to be better developed, so people may use them when they develop theory or if they want theoretical guarantees on the performance of their method. As OP is already ...
When not to use the elastic net penalty in regression?
I am not aware of any practical situation where Ridge or Lasso are preferable to Elastic Net. The large-sample (asymptotic) theory for Ridge and Lasso seem to be better developed, so people may use th
When not to use the elastic net penalty in regression? I am not aware of any practical situation where Ridge or Lasso are preferable to Elastic Net. The large-sample (asymptotic) theory for Ridge and Lasso seem to be better developed, so people may use them when they develop theory or if they want theoretical guarantee...
When not to use the elastic net penalty in regression? I am not aware of any practical situation where Ridge or Lasso are preferable to Elastic Net. The large-sample (asymptotic) theory for Ridge and Lasso seem to be better developed, so people may use th
55,551
Is there a clustering method that allows me to indicate the number of points desired per cluster?
Being some specific here, the question is not strictly speaking about clustering (i.e. discover underlying data structures) but rather for partitioning with general similarity constraints, to that extent this task is often referred at as balanced clustering. Finally to help one going forward terminology-wise: we care f...
Is there a clustering method that allows me to indicate the number of points desired per cluster?
Being some specific here, the question is not strictly speaking about clustering (i.e. discover underlying data structures) but rather for partitioning with general similarity constraints, to that ext
Is there a clustering method that allows me to indicate the number of points desired per cluster? Being some specific here, the question is not strictly speaking about clustering (i.e. discover underlying data structures) but rather for partitioning with general similarity constraints, to that extent this task is often...
Is there a clustering method that allows me to indicate the number of points desired per cluster? Being some specific here, the question is not strictly speaking about clustering (i.e. discover underlying data structures) but rather for partitioning with general similarity constraints, to that ext
55,552
Is there a clustering method that allows me to indicate the number of points desired per cluster?
@Eyal Shulman's python solution provides a K-means method that allows one to define cluster cardinality.
Is there a clustering method that allows me to indicate the number of points desired per cluster?
@Eyal Shulman's python solution provides a K-means method that allows one to define cluster cardinality.
Is there a clustering method that allows me to indicate the number of points desired per cluster? @Eyal Shulman's python solution provides a K-means method that allows one to define cluster cardinality.
Is there a clustering method that allows me to indicate the number of points desired per cluster? @Eyal Shulman's python solution provides a K-means method that allows one to define cluster cardinality.
55,553
Understanding Propensity Score Matching
What you described in the text before the images is just "matching". Propensity score matching is one type of matching that uses the difference between two units' propensity scores as the distance between them. There are several other popular ways of computing the distance between them, some of which do not involve the...
Understanding Propensity Score Matching
What you described in the text before the images is just "matching". Propensity score matching is one type of matching that uses the difference between two units' propensity scores as the distance bet
Understanding Propensity Score Matching What you described in the text before the images is just "matching". Propensity score matching is one type of matching that uses the difference between two units' propensity scores as the distance between them. There are several other popular ways of computing the distance betwee...
Understanding Propensity Score Matching What you described in the text before the images is just "matching". Propensity score matching is one type of matching that uses the difference between two units' propensity scores as the distance bet
55,554
Understanding Propensity Score Matching
My opinion is that adjusting by the PS is not a good ide. It is true that a circumstance under which a linear estimate will not change in expectation is if a covariate that is fitted is balanced between the two groups. However It is not the only circumstance under which the estimate will not change in expectation. The...
Understanding Propensity Score Matching
My opinion is that adjusting by the PS is not a good ide. It is true that a circumstance under which a linear estimate will not change in expectation is if a covariate that is fitted is balanced betwe
Understanding Propensity Score Matching My opinion is that adjusting by the PS is not a good ide. It is true that a circumstance under which a linear estimate will not change in expectation is if a covariate that is fitted is balanced between the two groups. However It is not the only circumstance under which the esti...
Understanding Propensity Score Matching My opinion is that adjusting by the PS is not a good ide. It is true that a circumstance under which a linear estimate will not change in expectation is if a covariate that is fitted is balanced betwe
55,555
Understanding Propensity Score Matching
Due to the Propensity Score Theorem, the propensity score can serve as a dimension reduction - especially if you have many covariates, matching based on covariates is not easily feasible. The propensity score has the additional advantage of matching only on covariates that actually determine selection - in a standard m...
Understanding Propensity Score Matching
Due to the Propensity Score Theorem, the propensity score can serve as a dimension reduction - especially if you have many covariates, matching based on covariates is not easily feasible. The propensi
Understanding Propensity Score Matching Due to the Propensity Score Theorem, the propensity score can serve as a dimension reduction - especially if you have many covariates, matching based on covariates is not easily feasible. The propensity score has the additional advantage of matching only on covariates that actual...
Understanding Propensity Score Matching Due to the Propensity Score Theorem, the propensity score can serve as a dimension reduction - especially if you have many covariates, matching based on covariates is not easily feasible. The propensi
55,556
What is the name of this kind of smoothing?
This technique is called kernel regression: https://en.wikipedia.org/wiki/Kernel_regression . I believe your variant is Nadaraya–Watson kernel regression with a Gaussian kernel.
What is the name of this kind of smoothing?
This technique is called kernel regression: https://en.wikipedia.org/wiki/Kernel_regression . I believe your variant is Nadaraya–Watson kernel regression with a Gaussian kernel.
What is the name of this kind of smoothing? This technique is called kernel regression: https://en.wikipedia.org/wiki/Kernel_regression . I believe your variant is Nadaraya–Watson kernel regression with a Gaussian kernel.
What is the name of this kind of smoothing? This technique is called kernel regression: https://en.wikipedia.org/wiki/Kernel_regression . I believe your variant is Nadaraya–Watson kernel regression with a Gaussian kernel.
55,557
What is the purpose of Add & Norm layers in Transformers?
Add & Norm are in fact two separate steps. The add step is a residual connection It means that we take sum together the output of a layer with the input $\mathcal{F}(\mathbf{x}) + \mathbf{x}$. The idea was introduced by He et al (2005) with the ResNet model. It is one of the solutions for vanishing gradient problem. T...
What is the purpose of Add & Norm layers in Transformers?
Add & Norm are in fact two separate steps. The add step is a residual connection It means that we take sum together the output of a layer with the input $\mathcal{F}(\mathbf{x}) + \mathbf{x}$. The id
What is the purpose of Add & Norm layers in Transformers? Add & Norm are in fact two separate steps. The add step is a residual connection It means that we take sum together the output of a layer with the input $\mathcal{F}(\mathbf{x}) + \mathbf{x}$. The idea was introduced by He et al (2005) with the ResNet model. It...
What is the purpose of Add & Norm layers in Transformers? Add & Norm are in fact two separate steps. The add step is a residual connection It means that we take sum together the output of a layer with the input $\mathcal{F}(\mathbf{x}) + \mathbf{x}$. The id
55,558
Why does propensity score matching fail to estimate the true causal effect when OLS works?
As @CloseToC mentioned in the comments, this is because you have a nearly pathological data scenario here. There are a few things that make this scenario "unfair" to matching (i.e., not suitable for matching but well suited for regression). The greatest is that there is essentially no overlap in the propensity score di...
Why does propensity score matching fail to estimate the true causal effect when OLS works?
As @CloseToC mentioned in the comments, this is because you have a nearly pathological data scenario here. There are a few things that make this scenario "unfair" to matching (i.e., not suitable for m
Why does propensity score matching fail to estimate the true causal effect when OLS works? As @CloseToC mentioned in the comments, this is because you have a nearly pathological data scenario here. There are a few things that make this scenario "unfair" to matching (i.e., not suitable for matching but well suited for r...
Why does propensity score matching fail to estimate the true causal effect when OLS works? As @CloseToC mentioned in the comments, this is because you have a nearly pathological data scenario here. There are a few things that make this scenario "unfair" to matching (i.e., not suitable for m
55,559
Best way to compare two treatment groups to a control
Your variable group is a factor with three levels, control, Fertilizer_A, Fertilizer_B, and control is used as reference )or baseline) level, so its implied coefficient is zero. See What to do in a multinomial logistic regression when all levels of DV are of interest?. The coefficients for the two non-reference levels,...
Best way to compare two treatment groups to a control
Your variable group is a factor with three levels, control, Fertilizer_A, Fertilizer_B, and control is used as reference )or baseline) level, so its implied coefficient is zero. See What to do in a mu
Best way to compare two treatment groups to a control Your variable group is a factor with three levels, control, Fertilizer_A, Fertilizer_B, and control is used as reference )or baseline) level, so its implied coefficient is zero. See What to do in a multinomial logistic regression when all levels of DV are of interes...
Best way to compare two treatment groups to a control Your variable group is a factor with three levels, control, Fertilizer_A, Fertilizer_B, and control is used as reference )or baseline) level, so its implied coefficient is zero. See What to do in a mu
55,560
Best way to compare two treatment groups to a control
kjetil's answer explains well the interpretation of the two coefficients from your model as contrasts between each fertilizer and control. You can use the package contrast to explicitly perform the final contrast, between the two fertilizers. First, simulating data and fitting a model as you did: library("contrast") li...
Best way to compare two treatment groups to a control
kjetil's answer explains well the interpretation of the two coefficients from your model as contrasts between each fertilizer and control. You can use the package contrast to explicitly perform the fi
Best way to compare two treatment groups to a control kjetil's answer explains well the interpretation of the two coefficients from your model as contrasts between each fertilizer and control. You can use the package contrast to explicitly perform the final contrast, between the two fertilizers. First, simulating data ...
Best way to compare two treatment groups to a control kjetil's answer explains well the interpretation of the two coefficients from your model as contrasts between each fertilizer and control. You can use the package contrast to explicitly perform the fi
55,561
Best way to compare two treatment groups to a control
This question comes up a lot and there is a method that answers all the questions you have. Look at Ways of comparing linear regression interepts and slopes?. It explains how to compare slopes and intercepts of as many groups as you want and will tell you the difference between groups.
Best way to compare two treatment groups to a control
This question comes up a lot and there is a method that answers all the questions you have. Look at Ways of comparing linear regression interepts and slopes?. It explains how to compare slopes and int
Best way to compare two treatment groups to a control This question comes up a lot and there is a method that answers all the questions you have. Look at Ways of comparing linear regression interepts and slopes?. It explains how to compare slopes and intercepts of as many groups as you want and will tell you the differ...
Best way to compare two treatment groups to a control This question comes up a lot and there is a method that answers all the questions you have. Look at Ways of comparing linear regression interepts and slopes?. It explains how to compare slopes and int
55,562
When should we use lag variable in a regression?
When a lagged explanatory variable is used in a model, this represents a situation where the analyst thinks that the explanatory variable might have a statistical relationship with the response, but they believe that there may be a "lag" in the relationship. This could occur when the explanatory variable has a causal ...
When should we use lag variable in a regression?
When a lagged explanatory variable is used in a model, this represents a situation where the analyst thinks that the explanatory variable might have a statistical relationship with the response, but t
When should we use lag variable in a regression? When a lagged explanatory variable is used in a model, this represents a situation where the analyst thinks that the explanatory variable might have a statistical relationship with the response, but they believe that there may be a "lag" in the relationship. This could ...
When should we use lag variable in a regression? When a lagged explanatory variable is used in a model, this represents a situation where the analyst thinks that the explanatory variable might have a statistical relationship with the response, but t
55,563
Preparing data for modelling
Would it be correct to use the following data format for such modelling? Yes, the model: offer ~ year + population + (1 | county) adjusts for the repeated measures within each county Or is this a problem that every county has multiple rows in data? No, that's precisely why we use a mixed model in such cases. Prepa...
Preparing data for modelling
Would it be correct to use the following data format for such modelling? Yes, the model: offer ~ year + population + (1 | county) adjusts for the repeated measures within each county Or is this a p
Preparing data for modelling Would it be correct to use the following data format for such modelling? Yes, the model: offer ~ year + population + (1 | county) adjusts for the repeated measures within each county Or is this a problem that every county has multiple rows in data? No, that's precisely why we use a mixe...
Preparing data for modelling Would it be correct to use the following data format for such modelling? Yes, the model: offer ~ year + population + (1 | county) adjusts for the repeated measures within each county Or is this a p
55,564
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
$\newcommand{\Var}{\operatorname{Var}}$ In response to the edited version. I think there's a glitch in that the "$=$" sign ought to be a "$\geq$" sign. With that change, everything seems to be (at least locally) OK. A general fact is that $\Var(|X|)\leq \Var(X)$ for any random variable $X$. (Since $\Var(X)-\Var(|X|)=E(...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
$\newcommand{\Var}{\operatorname{Var}}$ In response to the edited version. I think there's a glitch in that the "$=$" sign ought to be a "$\geq$" sign. With that change, everything seems to be (at lea
Conditional variance of the absolute sum of zero-mean i.i.d. random variables $\newcommand{\Var}{\operatorname{Var}}$ In response to the edited version. I think there's a glitch in that the "$=$" sign ought to be a "$\geq$" sign. With that change, everything seems to be (at least locally) OK. A general fact is that $\V...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables $\newcommand{\Var}{\operatorname{Var}}$ In response to the edited version. I think there's a glitch in that the "$=$" sign ought to be a "$\geq$" sign. With that change, everything seems to be (at lea
55,565
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
Your equation doesn't hold in general. As a simple counter-example, consider random variables that are conditionally IID with distribution $\mathbb{P}(U_i=-1|D_n) = \mathbb{P}(U_i=1|D_n)=\tfrac{1}{2}$.$^\dagger$ In this simple case you get: $$\begin{align} \mathbb{E}(U_1 + U_2 | D_n) &= (-2) \cdot \frac{1}{4} + 0 \c...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
Your equation doesn't hold in general. As a simple counter-example, consider random variables that are conditionally IID with distribution $\mathbb{P}(U_i=-1|D_n) = \mathbb{P}(U_i=1|D_n)=\tfrac{1}{2}
Conditional variance of the absolute sum of zero-mean i.i.d. random variables Your equation doesn't hold in general. As a simple counter-example, consider random variables that are conditionally IID with distribution $\mathbb{P}(U_i=-1|D_n) = \mathbb{P}(U_i=1|D_n)=\tfrac{1}{2}$.$^\dagger$ In this simple case you get:...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables Your equation doesn't hold in general. As a simple counter-example, consider random variables that are conditionally IID with distribution $\mathbb{P}(U_i=-1|D_n) = \mathbb{P}(U_i=1|D_n)=\tfrac{1}{2}
55,566
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
This is a new answer looking at the later question supplemented by your additional information. This new answer should be seen as augmenting my previous general observations in the other answer. With the new information added to the question, you now have a specific distribution for the values under consideration. Su...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables
This is a new answer looking at the later question supplemented by your additional information. This new answer should be seen as augmenting my previous general observations in the other answer. With
Conditional variance of the absolute sum of zero-mean i.i.d. random variables This is a new answer looking at the later question supplemented by your additional information. This new answer should be seen as augmenting my previous general observations in the other answer. With the new information added to the question...
Conditional variance of the absolute sum of zero-mean i.i.d. random variables This is a new answer looking at the later question supplemented by your additional information. This new answer should be seen as augmenting my previous general observations in the other answer. With
55,567
When does complexity in machine learning algorithms actually become an issue?
I use least-squares support vector machines a fair bit, which are $\mathcal{O}(n^3)$ for the most obvious implementation, and problems with up to a ten thousand or so examples are just about practical on my machine, but memory usage is not insignificant either, and 8192*8192 matrix in double precision format is 0.5Gb o...
When does complexity in machine learning algorithms actually become an issue?
I use least-squares support vector machines a fair bit, which are $\mathcal{O}(n^3)$ for the most obvious implementation, and problems with up to a ten thousand or so examples are just about practical
When does complexity in machine learning algorithms actually become an issue? I use least-squares support vector machines a fair bit, which are $\mathcal{O}(n^3)$ for the most obvious implementation, and problems with up to a ten thousand or so examples are just about practical on my machine, but memory usage is not in...
When does complexity in machine learning algorithms actually become an issue? I use least-squares support vector machines a fair bit, which are $\mathcal{O}(n^3)$ for the most obvious implementation, and problems with up to a ten thousand or so examples are just about practical
55,568
Are interactions with quadratic terms in MARS possible?
Yes with some modification. On its own, MARS won't try to take higher-order functions of the predictors. MARS can only include three types of basis functions: A constant A hinge function Interactions of hinge functions You can "trick" MARS into including a quadratic term by making a new variable xnew = x1*x1 then fit...
Are interactions with quadratic terms in MARS possible?
Yes with some modification. On its own, MARS won't try to take higher-order functions of the predictors. MARS can only include three types of basis functions: A constant A hinge function Interactions
Are interactions with quadratic terms in MARS possible? Yes with some modification. On its own, MARS won't try to take higher-order functions of the predictors. MARS can only include three types of basis functions: A constant A hinge function Interactions of hinge functions You can "trick" MARS into including a quadr...
Are interactions with quadratic terms in MARS possible? Yes with some modification. On its own, MARS won't try to take higher-order functions of the predictors. MARS can only include three types of basis functions: A constant A hinge function Interactions
55,569
Is there any reason to use LIME now that shap is available?
I wouldn't say that LIME is a flawed half-solution and that SHAP is a perfect full solution. If anything, I would say both solutions are inherently flawed but perhaps are the best we have. If you are going to use a locally correct linear approximation of your machine learning model for the purpose of explaining predict...
Is there any reason to use LIME now that shap is available?
I wouldn't say that LIME is a flawed half-solution and that SHAP is a perfect full solution. If anything, I would say both solutions are inherently flawed but perhaps are the best we have. If you are
Is there any reason to use LIME now that shap is available? I wouldn't say that LIME is a flawed half-solution and that SHAP is a perfect full solution. If anything, I would say both solutions are inherently flawed but perhaps are the best we have. If you are going to use a locally correct linear approximation of your ...
Is there any reason to use LIME now that shap is available? I wouldn't say that LIME is a flawed half-solution and that SHAP is a perfect full solution. If anything, I would say both solutions are inherently flawed but perhaps are the best we have. If you are
55,570
Interpretation of the autocorrelation of a binary process
Your intuition is correct. There are various definitions of the autocorrelation: see Understanding this acf output for a discussion of some of the pitfalls. But for a sufficiently long sequence all definitions will produce essentially the same value. One of these definitions is that the autocorrelation of the sequenc...
Interpretation of the autocorrelation of a binary process
Your intuition is correct. There are various definitions of the autocorrelation: see Understanding this acf output for a discussion of some of the pitfalls. But for a sufficiently long sequence all d
Interpretation of the autocorrelation of a binary process Your intuition is correct. There are various definitions of the autocorrelation: see Understanding this acf output for a discussion of some of the pitfalls. But for a sufficiently long sequence all definitions will produce essentially the same value. One of th...
Interpretation of the autocorrelation of a binary process Your intuition is correct. There are various definitions of the autocorrelation: see Understanding this acf output for a discussion of some of the pitfalls. But for a sufficiently long sequence all d
55,571
How to implement a mixed-model with a beta distribution?
Please note that there is no requirement, condition, or assumption regarding the distribution of the variables in any regression model. When the data are strictly positive and bounded then the beta distribution is often a very good choice. GLMMadaptive and glmmTMB both allow for the beta distribution. Since you seem to...
How to implement a mixed-model with a beta distribution?
Please note that there is no requirement, condition, or assumption regarding the distribution of the variables in any regression model. When the data are strictly positive and bounded then the beta di
How to implement a mixed-model with a beta distribution? Please note that there is no requirement, condition, or assumption regarding the distribution of the variables in any regression model. When the data are strictly positive and bounded then the beta distribution is often a very good choice. GLMMadaptive and glmmTM...
How to implement a mixed-model with a beta distribution? Please note that there is no requirement, condition, or assumption regarding the distribution of the variables in any regression model. When the data are strictly positive and bounded then the beta di
55,572
Likelihood function as number of observations increases
Here are three slides from my statistical modelling course illustrating why the average log-likelihood function concentrates with the number $n$ of iid observations: This second picture represents $L_n(\theta;\mathbf x)^{1/n}$ as $n$ increases. This function stabilises around its (entropy) limiting function $$\exp\i...
Likelihood function as number of observations increases
Here are three slides from my statistical modelling course illustrating why the average log-likelihood function concentrates with the number $n$ of iid observations: This second picture represents
Likelihood function as number of observations increases Here are three slides from my statistical modelling course illustrating why the average log-likelihood function concentrates with the number $n$ of iid observations: This second picture represents $L_n(\theta;\mathbf x)^{1/n}$ as $n$ increases. This function st...
Likelihood function as number of observations increases Here are three slides from my statistical modelling course illustrating why the average log-likelihood function concentrates with the number $n$ of iid observations: This second picture represents
55,573
mutual information and maximual infomation coffecient
Mutual information is well known, sklearn has a good implementation here and in R package entropy. Regarding MIC, MICtools and minerva are Python/R good implementations. See references given in MICtools repo description for further papers. Edit: This is a dummy example how to compute MIC score for $x$ and $y$ condition...
mutual information and maximual infomation coffecient
Mutual information is well known, sklearn has a good implementation here and in R package entropy. Regarding MIC, MICtools and minerva are Python/R good implementations. See references given in MICtoo
mutual information and maximual infomation coffecient Mutual information is well known, sklearn has a good implementation here and in R package entropy. Regarding MIC, MICtools and minerva are Python/R good implementations. See references given in MICtools repo description for further papers. Edit: This is a dummy exam...
mutual information and maximual infomation coffecient Mutual information is well known, sklearn has a good implementation here and in R package entropy. Regarding MIC, MICtools and minerva are Python/R good implementations. See references given in MICtoo
55,574
Why am I observing non-uniformly distributed (negatively skewed) p-values for two-sample tests of mixture distributions when the null is true?
You aren't generating two samples of independent observations from a Gaussian mixture, because you are fixing the number taken from each component rather than making it random. If $X$ is a 50/50 mixture of $N(.5,0.05^2)$ and $N(0.075,0.05^2)$, and you sample $n$ observations, the number of observations from the first ...
Why am I observing non-uniformly distributed (negatively skewed) p-values for two-sample tests of mi
You aren't generating two samples of independent observations from a Gaussian mixture, because you are fixing the number taken from each component rather than making it random. If $X$ is a 50/50 mixtu
Why am I observing non-uniformly distributed (negatively skewed) p-values for two-sample tests of mixture distributions when the null is true? You aren't generating two samples of independent observations from a Gaussian mixture, because you are fixing the number taken from each component rather than making it random. ...
Why am I observing non-uniformly distributed (negatively skewed) p-values for two-sample tests of mi You aren't generating two samples of independent observations from a Gaussian mixture, because you are fixing the number taken from each component rather than making it random. If $X$ is a 50/50 mixtu
55,575
Asymptotic distribution of OLS standard errors
Let me start by giving you a hint, and if that is enough, then no need to read through the rest of the solution. Hint: $\beta=(X'X)^{-1}(X'Y)=n^{-1}\sum_i^nY_i=\bar Y$. So the sample variance is given by, $$\hat\sigma^2=\sum_{i=1}^n(Y_i - X_i \beta)^2=\sum_{i=1}^n(Y_i - \bar Y)^2$$ Solution: Okay, if that hint is not ...
Asymptotic distribution of OLS standard errors
Let me start by giving you a hint, and if that is enough, then no need to read through the rest of the solution. Hint: $\beta=(X'X)^{-1}(X'Y)=n^{-1}\sum_i^nY_i=\bar Y$. So the sample variance is given
Asymptotic distribution of OLS standard errors Let me start by giving you a hint, and if that is enough, then no need to read through the rest of the solution. Hint: $\beta=(X'X)^{-1}(X'Y)=n^{-1}\sum_i^nY_i=\bar Y$. So the sample variance is given by, $$\hat\sigma^2=\sum_{i=1}^n(Y_i - X_i \beta)^2=\sum_{i=1}^n(Y_i - \b...
Asymptotic distribution of OLS standard errors Let me start by giving you a hint, and if that is enough, then no need to read through the rest of the solution. Hint: $\beta=(X'X)^{-1}(X'Y)=n^{-1}\sum_i^nY_i=\bar Y$. So the sample variance is given
55,576
Analytical expression of the log-likelihood of the Binomial model with unknown $n$ and known $y$ and $p$ and its conjugate prior
I completely concur with Sycorax's comment that Adrian Raftery's 1988 Biometrika paper is the canon on this topic. How to derive analytically the negative log-likelihood (and its first-order conditions)? The likelihood is the same whether or not $n$ is unknown: $$L(n|y_1,\ldots,y_I)=\prod_{i=1}^I {n \choose y_i}p^{...
Analytical expression of the log-likelihood of the Binomial model with unknown $n$ and known $y$ and
I completely concur with Sycorax's comment that Adrian Raftery's 1988 Biometrika paper is the canon on this topic. How to derive analytically the negative log-likelihood (and its first-order conditi
Analytical expression of the log-likelihood of the Binomial model with unknown $n$ and known $y$ and $p$ and its conjugate prior I completely concur with Sycorax's comment that Adrian Raftery's 1988 Biometrika paper is the canon on this topic. How to derive analytically the negative log-likelihood (and its first-orde...
Analytical expression of the log-likelihood of the Binomial model with unknown $n$ and known $y$ and I completely concur with Sycorax's comment that Adrian Raftery's 1988 Biometrika paper is the canon on this topic. How to derive analytically the negative log-likelihood (and its first-order conditi
55,577
Why is the formula for the density of a transformed random variable expressed in terms of the derivative of the inverse?
It seems that the heuristic described by @whuber in their answer to the linked problem can be modified slightly to yield the change of variables formula for the density in its more familiar form. Consider a finite sum approximation to the probability elements; the "conservation of mass" requirement stipulates that $$h_...
Why is the formula for the density of a transformed random variable expressed in terms of the deriva
It seems that the heuristic described by @whuber in their answer to the linked problem can be modified slightly to yield the change of variables formula for the density in its more familiar form. Cons
Why is the formula for the density of a transformed random variable expressed in terms of the derivative of the inverse? It seems that the heuristic described by @whuber in their answer to the linked problem can be modified slightly to yield the change of variables formula for the density in its more familiar form. Con...
Why is the formula for the density of a transformed random variable expressed in terms of the deriva It seems that the heuristic described by @whuber in their answer to the linked problem can be modified slightly to yield the change of variables formula for the density in its more familiar form. Cons
55,578
Why is the formula for the density of a transformed random variable expressed in terms of the derivative of the inverse?
One heuristic way to look at this is to consider the probability density as a scaled probability by considering an "infinitesimally small" region encompassing a point. For any infinitesimally small distances $\Delta_X > 0$ and $\Delta_Y > 0$ you have: $$\begin{align} \Delta_X \times f_X(x) &= \mathbb{P}(x \leqslant X ...
Why is the formula for the density of a transformed random variable expressed in terms of the deriva
One heuristic way to look at this is to consider the probability density as a scaled probability by considering an "infinitesimally small" region encompassing a point. For any infinitesimally small d
Why is the formula for the density of a transformed random variable expressed in terms of the derivative of the inverse? One heuristic way to look at this is to consider the probability density as a scaled probability by considering an "infinitesimally small" region encompassing a point. For any infinitesimally small ...
Why is the formula for the density of a transformed random variable expressed in terms of the deriva One heuristic way to look at this is to consider the probability density as a scaled probability by considering an "infinitesimally small" region encompassing a point. For any infinitesimally small d
55,579
Convergence of uniformly distributed random variables on a sphere
In outline: one approach is to think of generating $U_n$ by generating $n$ iid standard Normals $Z_{n,1},\ldots,Z_{n,n}$ and defining $$U_{n,i}=\frac{Z_{n,i}}{\sqrt{\sum_j Z_{n,j}^2}}$$ As $n\to\infty$, the denominator converges to its expected value (eg, by Chebyshev's inequality) and can be treated as a constant. The...
Convergence of uniformly distributed random variables on a sphere
In outline: one approach is to think of generating $U_n$ by generating $n$ iid standard Normals $Z_{n,1},\ldots,Z_{n,n}$ and defining $$U_{n,i}=\frac{Z_{n,i}}{\sqrt{\sum_j Z_{n,j}^2}}$$ As $n\to\infty
Convergence of uniformly distributed random variables on a sphere In outline: one approach is to think of generating $U_n$ by generating $n$ iid standard Normals $Z_{n,1},\ldots,Z_{n,n}$ and defining $$U_{n,i}=\frac{Z_{n,i}}{\sqrt{\sum_j Z_{n,j}^2}}$$ As $n\to\infty$, the denominator converges to its expected value (eg...
Convergence of uniformly distributed random variables on a sphere In outline: one approach is to think of generating $U_n$ by generating $n$ iid standard Normals $Z_{n,1},\ldots,Z_{n,n}$ and defining $$U_{n,i}=\frac{Z_{n,i}}{\sqrt{\sum_j Z_{n,j}^2}}$$ As $n\to\infty
55,580
Convergence of uniformly distributed random variables on a sphere
This answer is essentially similar to @Thomas Lumley's, but hopefully to add more clarity by explicitly justifying some key steps. Let $X_n = (X_{n, 1}, \ldots, X_{n, n}) \sim N_n(0, I_{(n)})$ (i.e., $X_{n, 1}, \ldots, X_{n, n} \text{ i.i.d.} \sim N(0, 1)$), then it follows by a property of spherical distribution (see,...
Convergence of uniformly distributed random variables on a sphere
This answer is essentially similar to @Thomas Lumley's, but hopefully to add more clarity by explicitly justifying some key steps. Let $X_n = (X_{n, 1}, \ldots, X_{n, n}) \sim N_n(0, I_{(n)})$ (i.e.,
Convergence of uniformly distributed random variables on a sphere This answer is essentially similar to @Thomas Lumley's, but hopefully to add more clarity by explicitly justifying some key steps. Let $X_n = (X_{n, 1}, \ldots, X_{n, n}) \sim N_n(0, I_{(n)})$ (i.e., $X_{n, 1}, \ldots, X_{n, n} \text{ i.i.d.} \sim N(0, 1...
Convergence of uniformly distributed random variables on a sphere This answer is essentially similar to @Thomas Lumley's, but hopefully to add more clarity by explicitly justifying some key steps. Let $X_n = (X_{n, 1}, \ldots, X_{n, n}) \sim N_n(0, I_{(n)})$ (i.e.,
55,581
Weights from inverse probability treatment weighting in regression model in R?
You need to be clear about the quantity you want to estimate. Most causal inference applications are concerned with the average marginal effect of the treatment on the outcome. This does not correspond to the coefficient on treatment in a logistic regression model. The way to use regression to estimate causal effects i...
Weights from inverse probability treatment weighting in regression model in R?
You need to be clear about the quantity you want to estimate. Most causal inference applications are concerned with the average marginal effect of the treatment on the outcome. This does not correspon
Weights from inverse probability treatment weighting in regression model in R? You need to be clear about the quantity you want to estimate. Most causal inference applications are concerned with the average marginal effect of the treatment on the outcome. This does not correspond to the coefficient on treatment in a lo...
Weights from inverse probability treatment weighting in regression model in R? You need to be clear about the quantity you want to estimate. Most causal inference applications are concerned with the average marginal effect of the treatment on the outcome. This does not correspon
55,582
Beginner Bayesian question - which statement is false?
The problem isn't that you have a false statement. It's that you're measuring the wrong quantity. It’s helpful to remember that there are two events here: birth 1 and birth 2. We care about what happens in birth 2, given what we know about birth 1. You're finding $p(\textrm{Birth2}=\textrm{twins} \mid \textrm{speciesA}...
Beginner Bayesian question - which statement is false?
The problem isn't that you have a false statement. It's that you're measuring the wrong quantity. It’s helpful to remember that there are two events here: birth 1 and birth 2. We care about what happe
Beginner Bayesian question - which statement is false? The problem isn't that you have a false statement. It's that you're measuring the wrong quantity. It’s helpful to remember that there are two events here: birth 1 and birth 2. We care about what happens in birth 2, given what we know about birth 1. You're finding $...
Beginner Bayesian question - which statement is false? The problem isn't that you have a false statement. It's that you're measuring the wrong quantity. It’s helpful to remember that there are two events here: birth 1 and birth 2. We care about what happe
55,583
Beginner Bayesian question - which statement is false?
You are very close to the answer, but there is a key word in the quantity that is being asked of you to calculate. You have a new female panda of unknown species, and she has just given birth to twins. What is the probability that her next birth will also be twins? That is, you are not interested in the evidence, $Pr(\...
Beginner Bayesian question - which statement is false?
You are very close to the answer, but there is a key word in the quantity that is being asked of you to calculate. You have a new female panda of unknown species, and she has just given birth to twins
Beginner Bayesian question - which statement is false? You are very close to the answer, but there is a key word in the quantity that is being asked of you to calculate. You have a new female panda of unknown species, and she has just given birth to twins. What is the probability that her next birth will also be twins?...
Beginner Bayesian question - which statement is false? You are very close to the answer, but there is a key word in the quantity that is being asked of you to calculate. You have a new female panda of unknown species, and she has just given birth to twins
55,584
Minimum sample size required in paired t-tests and statistic significance
What is the minimum sample size depends on the question: "Minimum sample size to accomplish what?". A paired-t test can be done on as few as 2 pairs if the only goal is to be able do some computations and get an answer (and you do not care about the quality of the answer). If the question is how big a sample size do yo...
Minimum sample size required in paired t-tests and statistic significance
What is the minimum sample size depends on the question: "Minimum sample size to accomplish what?". A paired-t test can be done on as few as 2 pairs if the only goal is to be able do some computations
Minimum sample size required in paired t-tests and statistic significance What is the minimum sample size depends on the question: "Minimum sample size to accomplish what?". A paired-t test can be done on as few as 2 pairs if the only goal is to be able do some computations and get an answer (and you do not care about ...
Minimum sample size required in paired t-tests and statistic significance What is the minimum sample size depends on the question: "Minimum sample size to accomplish what?". A paired-t test can be done on as few as 2 pairs if the only goal is to be able do some computations
55,585
Minimum sample size required in paired t-tests and statistic significance
According to what I have learned there is no minimum sample size for a t-test. In fact the t-test is suitable for cases where the $n$ sample size is: 3 and more. Even $n=2$ would work. A paired t-test on observations $\{X_{1i}\}_{i=1}^n$ and $\{X_{2i}\}_{i=1}^n$ is the same as a one-sample t test on differences. * You ...
Minimum sample size required in paired t-tests and statistic significance
According to what I have learned there is no minimum sample size for a t-test. In fact the t-test is suitable for cases where the $n$ sample size is: 3 and more. Even $n=2$ would work. A paired t-test
Minimum sample size required in paired t-tests and statistic significance According to what I have learned there is no minimum sample size for a t-test. In fact the t-test is suitable for cases where the $n$ sample size is: 3 and more. Even $n=2$ would work. A paired t-test on observations $\{X_{1i}\}_{i=1}^n$ and $\{X...
Minimum sample size required in paired t-tests and statistic significance According to what I have learned there is no minimum sample size for a t-test. In fact the t-test is suitable for cases where the $n$ sample size is: 3 and more. Even $n=2$ would work. A paired t-test
55,586
Minimum sample size required in paired t-tests and statistic significance
Note: The question was subjected to multiple round of edits, when other answers were made in between. This answer is made after Edit 2 was posted, and refrained from dealing with the part on Wilcoxon and ANOVA as it is unlikely to add on what existing answers have. In the world of experiment design involving $t$-tests...
Minimum sample size required in paired t-tests and statistic significance
Note: The question was subjected to multiple round of edits, when other answers were made in between. This answer is made after Edit 2 was posted, and refrained from dealing with the part on Wilcoxon
Minimum sample size required in paired t-tests and statistic significance Note: The question was subjected to multiple round of edits, when other answers were made in between. This answer is made after Edit 2 was posted, and refrained from dealing with the part on Wilcoxon and ANOVA as it is unlikely to add on what exi...
Minimum sample size required in paired t-tests and statistic significance Note: The question was subjected to multiple round of edits, when other answers were made in between. This answer is made after Edit 2 was posted, and refrained from dealing with the part on Wilcoxon
55,587
Paired and repeated measures! Now what? ANOVA or mixed model?
This is basically an analysis of change model. 2 measurements on each subject were taken at baseline, and 2 more at follow-up. I will refrain from calling this "control" and "intervention" as that could be somewhat misleading. We have repeated measures within patients. So we could consider a model that fits random inte...
Paired and repeated measures! Now what? ANOVA or mixed model?
This is basically an analysis of change model. 2 measurements on each subject were taken at baseline, and 2 more at follow-up. I will refrain from calling this "control" and "intervention" as that cou
Paired and repeated measures! Now what? ANOVA or mixed model? This is basically an analysis of change model. 2 measurements on each subject were taken at baseline, and 2 more at follow-up. I will refrain from calling this "control" and "intervention" as that could be somewhat misleading. We have repeated measures withi...
Paired and repeated measures! Now what? ANOVA or mixed model? This is basically an analysis of change model. 2 measurements on each subject were taken at baseline, and 2 more at follow-up. I will refrain from calling this "control" and "intervention" as that cou
55,588
Trimmed, weighted mean
This is even more complicated than you think. Let's start with sampling weights: the data are sampled from a larger population and $w_i$ is the reciprocal of the sampling probability for observation $i$. Now, it could be that you have a 'gross error contamination' model: units are sampled from the population and measur...
Trimmed, weighted mean
This is even more complicated than you think. Let's start with sampling weights: the data are sampled from a larger population and $w_i$ is the reciprocal of the sampling probability for observation $
Trimmed, weighted mean This is even more complicated than you think. Let's start with sampling weights: the data are sampled from a larger population and $w_i$ is the reciprocal of the sampling probability for observation $i$. Now, it could be that you have a 'gross error contamination' model: units are sampled from th...
Trimmed, weighted mean This is even more complicated than you think. Let's start with sampling weights: the data are sampled from a larger population and $w_i$ is the reciprocal of the sampling probability for observation $
55,589
theoretical confidence interval depending on sample size [closed]
Nice experiment. The blue lines will be at $\mu \pm z_{\alpha/2} \sigma/\sqrt{n}$ where $\alpha = 0.05$ and $\alpha \mapsto z_\alpha$ is the upper quantile function of the standard normal and $n$ is sample_size_. In this case, this is exact since you are generating from the normal distribution and the sample mean will...
theoretical confidence interval depending on sample size [closed]
Nice experiment. The blue lines will be at $\mu \pm z_{\alpha/2} \sigma/\sqrt{n}$ where $\alpha = 0.05$ and $\alpha \mapsto z_\alpha$ is the upper quantile function of the standard normal and $n$ is
theoretical confidence interval depending on sample size [closed] Nice experiment. The blue lines will be at $\mu \pm z_{\alpha/2} \sigma/\sqrt{n}$ where $\alpha = 0.05$ and $\alpha \mapsto z_\alpha$ is the upper quantile function of the standard normal and $n$ is sample_size_. In this case, this is exact since you ar...
theoretical confidence interval depending on sample size [closed] Nice experiment. The blue lines will be at $\mu \pm z_{\alpha/2} \sigma/\sqrt{n}$ where $\alpha = 0.05$ and $\alpha \mapsto z_\alpha$ is the upper quantile function of the standard normal and $n$ is
55,590
ANOVA three group test is significant but the difference is small
The hypothesis test is doing exactly what it claims to be able to do: it is flagging to the investigator that there is an unusually high F-stat, too high for the null hypothesis to be believable. Armed with that information, the investigator is allowed to conclude, "That is not enough of a difference to be interesting....
ANOVA three group test is significant but the difference is small
The hypothesis test is doing exactly what it claims to be able to do: it is flagging to the investigator that there is an unusually high F-stat, too high for the null hypothesis to be believable. Arme
ANOVA three group test is significant but the difference is small The hypothesis test is doing exactly what it claims to be able to do: it is flagging to the investigator that there is an unusually high F-stat, too high for the null hypothesis to be believable. Armed with that information, the investigator is allowed t...
ANOVA three group test is significant but the difference is small The hypothesis test is doing exactly what it claims to be able to do: it is flagging to the investigator that there is an unusually high F-stat, too high for the null hypothesis to be believable. Arme
55,591
$X^n$ where $X$ is normally distributed?
Let $Z_n := Z := g(X) := n X^n$. The relation between $Z$ and $Y$ is quite simple (one is a scaled version of the other). Let's figure out the distribution of $Z$. Assume for simplicity that $n$ is odd. Then, $g^{-1}(z) = (z/n)^{1/n}$. Hence, $|{g^{-1}}'(z)| = \frac1n (|z|/n)^{1/n-1}$. It follows that the density of $Z...
$X^n$ where $X$ is normally distributed?
Let $Z_n := Z := g(X) := n X^n$. The relation between $Z$ and $Y$ is quite simple (one is a scaled version of the other). Let's figure out the distribution of $Z$. Assume for simplicity that $n$ is od
$X^n$ where $X$ is normally distributed? Let $Z_n := Z := g(X) := n X^n$. The relation between $Z$ and $Y$ is quite simple (one is a scaled version of the other). Let's figure out the distribution of $Z$. Assume for simplicity that $n$ is odd. Then, $g^{-1}(z) = (z/n)^{1/n}$. Hence, $|{g^{-1}}'(z)| = \frac1n (|z|/n)^{1...
$X^n$ where $X$ is normally distributed? Let $Z_n := Z := g(X) := n X^n$. The relation between $Z$ and $Y$ is quite simple (one is a scaled version of the other). Let's figure out the distribution of $Z$. Assume for simplicity that $n$ is od
55,592
$X^n$ where $X$ is normally distributed?
Far from an answer in general, but there is a formula for $\text{E}[X^n]$ if $\mu=0$. Then we have $$ \text{E}[\text{X}^n] = \begin{cases}0\,, & n \text{ odd }\\ \sigma^n(n-1)(n-3)\cdot\ldots\cdot 1\,, & n \text{ even }\end{cases} $$
$X^n$ where $X$ is normally distributed?
Far from an answer in general, but there is a formula for $\text{E}[X^n]$ if $\mu=0$. Then we have $$ \text{E}[\text{X}^n] = \begin{cases}0\,, & n \text{ odd }\\ \sigma^n(n-1)(n-3)\cdot\ldots\cdot 1
$X^n$ where $X$ is normally distributed? Far from an answer in general, but there is a formula for $\text{E}[X^n]$ if $\mu=0$. Then we have $$ \text{E}[\text{X}^n] = \begin{cases}0\,, & n \text{ odd }\\ \sigma^n(n-1)(n-3)\cdot\ldots\cdot 1\,, & n \text{ even }\end{cases} $$
$X^n$ where $X$ is normally distributed? Far from an answer in general, but there is a formula for $\text{E}[X^n]$ if $\mu=0$. Then we have $$ \text{E}[\text{X}^n] = \begin{cases}0\,, & n \text{ odd }\\ \sigma^n(n-1)(n-3)\cdot\ldots\cdot 1
55,593
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name?
It is known as a Power semi-circle distribution with pdf $f(x)$: $$f(x) = \frac{1}{\sqrt{\pi }}\frac{\Gamma (\theta +2) }{ \Gamma \left(\theta +\frac{3}{2}\right)} \sqrt{1-x^2}^{2 \theta +1} \quad \quad \text{for } -1 < x < 1$$ ... where shape parameter $\theta > -\frac{3}{2}$, and where your parameter $n = 2 \theta + ...
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name?
It is known as a Power semi-circle distribution with pdf $f(x)$: $$f(x) = \frac{1}{\sqrt{\pi }}\frac{\Gamma (\theta +2) }{ \Gamma \left(\theta +\frac{3}{2}\right)} \sqrt{1-x^2}^{2 \theta +1} \quad \qu
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name? It is known as a Power semi-circle distribution with pdf $f(x)$: $$f(x) = \frac{1}{\sqrt{\pi }}\frac{\Gamma (\theta +2) }{ \Gamma \left(\theta +\frac{3}{2}\right)} \sqrt{1-x^2}^{2 \theta +1} \quad \quad \text{for } -1 < x < 1$$ ... where shape parameter $\...
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name? It is known as a Power semi-circle distribution with pdf $f(x)$: $$f(x) = \frac{1}{\sqrt{\pi }}\frac{\Gamma (\theta +2) }{ \Gamma \left(\theta +\frac{3}{2}\right)} \sqrt{1-x^2}^{2 \theta +1} \quad \qu
55,594
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name?
This distribution is a scaled and shifted beta distribution. This can be seen by rewriting $t=0.5+0.5x$ or $x = 2t-1$ such that $1-x^2 = 4 t(1-t)$
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name?
This distribution is a scaled and shifted beta distribution. This can be seen by rewriting $t=0.5+0.5x$ or $x = 2t-1$ such that $1-x^2 = 4 t(1-t)$
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name? This distribution is a scaled and shifted beta distribution. This can be seen by rewriting $t=0.5+0.5x$ or $x = 2t-1$ such that $1-x^2 = 4 t(1-t)$
Does the distribution $f(x) \propto (1-x^2)^{n/2}$ have a name? This distribution is a scaled and shifted beta distribution. This can be seen by rewriting $t=0.5+0.5x$ or $x = 2t-1$ such that $1-x^2 = 4 t(1-t)$
55,595
Intuition - Uncountable sum of zeros
The problem here is that there isn't really any concept of an "uncountable sum" for you to have an intuition about! Summation is initially defined as a binary operation, then extended to finite sums by induction, and then extended to countable sums by taking limits. That is as far as it goes. The closest analogy we ...
Intuition - Uncountable sum of zeros
The problem here is that there isn't really any concept of an "uncountable sum" for you to have an intuition about! Summation is initially defined as a binary operation, then extended to finite sums
Intuition - Uncountable sum of zeros The problem here is that there isn't really any concept of an "uncountable sum" for you to have an intuition about! Summation is initially defined as a binary operation, then extended to finite sums by induction, and then extended to countable sums by taking limits. That is as far...
Intuition - Uncountable sum of zeros The problem here is that there isn't really any concept of an "uncountable sum" for you to have an intuition about! Summation is initially defined as a binary operation, then extended to finite sums
55,596
Intuition - Uncountable sum of zeros
It's important to realize that probability, by its definition/construction as a mathematical concept, is only countably additive and not "uncountably additive." Generally in mathematics there is no such concept as uncountably additive (there are a few contexts where uncountable sums have been defined, but they aren't a...
Intuition - Uncountable sum of zeros
It's important to realize that probability, by its definition/construction as a mathematical concept, is only countably additive and not "uncountably additive." Generally in mathematics there is no su
Intuition - Uncountable sum of zeros It's important to realize that probability, by its definition/construction as a mathematical concept, is only countably additive and not "uncountably additive." Generally in mathematics there is no such concept as uncountably additive (there are a few contexts where uncountable sums...
Intuition - Uncountable sum of zeros It's important to realize that probability, by its definition/construction as a mathematical concept, is only countably additive and not "uncountably additive." Generally in mathematics there is no su
55,597
Intuition - Uncountable sum of zeros
An example for which $\text{Prob}(X\in[a,b])$ should be able to take any value between 0 and 1 is a uniform distributed variable. In that case if $X \sim \mathcal{U}(0,1)$ then for $0\leq a\leq b\leq1$ you have $$\text{Prob}(X\in[a,b]) =b-a$$ This is a contradiction with $$\text{Prob}(X\in[a,b]) =\sum_{\lbrace x \in \...
Intuition - Uncountable sum of zeros
An example for which $\text{Prob}(X\in[a,b])$ should be able to take any value between 0 and 1 is a uniform distributed variable. In that case if $X \sim \mathcal{U}(0,1)$ then for $0\leq a\leq b\leq
Intuition - Uncountable sum of zeros An example for which $\text{Prob}(X\in[a,b])$ should be able to take any value between 0 and 1 is a uniform distributed variable. In that case if $X \sim \mathcal{U}(0,1)$ then for $0\leq a\leq b\leq1$ you have $$\text{Prob}(X\in[a,b]) =b-a$$ This is a contradiction with $$\text{Pr...
Intuition - Uncountable sum of zeros An example for which $\text{Prob}(X\in[a,b])$ should be able to take any value between 0 and 1 is a uniform distributed variable. In that case if $X \sim \mathcal{U}(0,1)$ then for $0\leq a\leq b\leq
55,598
Intuition - Uncountable sum of zeros
Let f: X -> R, f(X)>=0 and X is a subset of R (real numbers), if we define Sum_{x in X}f(x) := sup{sum_{x in F}f(x), F is a finite subset of X} Sum_{x inX}0 = 0
Intuition - Uncountable sum of zeros
Let f: X -> R, f(X)>=0 and X is a subset of R (real numbers), if we define Sum_{x in X}f(x) := sup{sum_{x in F}f(x), F is a finite subset of X} Sum_{x inX}0 = 0
Intuition - Uncountable sum of zeros Let f: X -> R, f(X)>=0 and X is a subset of R (real numbers), if we define Sum_{x in X}f(x) := sup{sum_{x in F}f(x), F is a finite subset of X} Sum_{x inX}0 = 0
Intuition - Uncountable sum of zeros Let f: X -> R, f(X)>=0 and X is a subset of R (real numbers), if we define Sum_{x in X}f(x) := sup{sum_{x in F}f(x), F is a finite subset of X} Sum_{x inX}0 = 0
55,599
Is overfitting an issue if all I care about is training error
With this type of propensity-score evaluation you can have less fear of overfitting, but you can take it too far. This paper, for example, concluded from simulation studies: Overfitting of propensity score models should be avoided to obtain reliable estimates of treatment or exposure effects in individual studies. If...
Is overfitting an issue if all I care about is training error
With this type of propensity-score evaluation you can have less fear of overfitting, but you can take it too far. This paper, for example, concluded from simulation studies: Overfitting of propensity
Is overfitting an issue if all I care about is training error With this type of propensity-score evaluation you can have less fear of overfitting, but you can take it too far. This paper, for example, concluded from simulation studies: Overfitting of propensity score models should be avoided to obtain reliable estimat...
Is overfitting an issue if all I care about is training error With this type of propensity-score evaluation you can have less fear of overfitting, but you can take it too far. This paper, for example, concluded from simulation studies: Overfitting of propensity
55,600
Does an explicit expression exist for the moments of the residuals in least squares regression?
Let's take a classical linear regression model: $$y_i = \boldsymbol{x}_i^T\beta + \varepsilon$$ where $\varepsilon_1, ..., \varepsilon_n \overset{IID}{\sim}\mathcal{N}(0, \sigma^2)$ and $\boldsymbol{x}_i^T = (1, x_{i1}, ...x_{ip})$. This model can be written in matrix form as: $$Y = X\beta + \boldsymbol{\varepsilon}$$ ...
Does an explicit expression exist for the moments of the residuals in least squares regression?
Let's take a classical linear regression model: $$y_i = \boldsymbol{x}_i^T\beta + \varepsilon$$ where $\varepsilon_1, ..., \varepsilon_n \overset{IID}{\sim}\mathcal{N}(0, \sigma^2)$ and $\boldsymbol{x
Does an explicit expression exist for the moments of the residuals in least squares regression? Let's take a classical linear regression model: $$y_i = \boldsymbol{x}_i^T\beta + \varepsilon$$ where $\varepsilon_1, ..., \varepsilon_n \overset{IID}{\sim}\mathcal{N}(0, \sigma^2)$ and $\boldsymbol{x}_i^T = (1, x_{i1}, ...x...
Does an explicit expression exist for the moments of the residuals in least squares regression? Let's take a classical linear regression model: $$y_i = \boldsymbol{x}_i^T\beta + \varepsilon$$ where $\varepsilon_1, ..., \varepsilon_n \overset{IID}{\sim}\mathcal{N}(0, \sigma^2)$ and $\boldsymbol{x