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 |
|---|---|---|---|---|---|---|
5,801 | Why is RSS distributed chi square times n-p? | There is a more general result that underlies many instances of the chi-squared distribution.
Quadratic form $Z^TAZ$ with standard normal $Z$ and symmetric idempotent $A$
Lemma: If $A$ is a symmetric and idempotent $n\times n$ real matrix and $Z\sim N(0,I_n)$ is a random vector of $n$ independent standard normal varia... | Why is RSS distributed chi square times n-p? | There is a more general result that underlies many instances of the chi-squared distribution.
Quadratic form $Z^TAZ$ with standard normal $Z$ and symmetric idempotent $A$
Lemma: If $A$ is a symmetric | Why is RSS distributed chi square times n-p?
There is a more general result that underlies many instances of the chi-squared distribution.
Quadratic form $Z^TAZ$ with standard normal $Z$ and symmetric idempotent $A$
Lemma: If $A$ is a symmetric and idempotent $n\times n$ real matrix and $Z\sim N(0,I_n)$ is a random ve... | Why is RSS distributed chi square times n-p?
There is a more general result that underlies many instances of the chi-squared distribution.
Quadratic form $Z^TAZ$ with standard normal $Z$ and symmetric idempotent $A$
Lemma: If $A$ is a symmetric |
5,802 | Assumptions of linear models and what to do if the residuals are not normally distributed | First off, I would get yourself a copy of this classic and approachable article and read it: Anscombe FJ. (1973) Graphs in statistical analysis. The American Statistician. 27:17–21.
On to your questions:
Answer 1: Neither the dependent nor independent variable needs to be normally distributed. In fact they can have all... | Assumptions of linear models and what to do if the residuals are not normally distributed | First off, I would get yourself a copy of this classic and approachable article and read it: Anscombe FJ. (1973) Graphs in statistical analysis. The American Statistician. 27:17–21.
On to your questio | Assumptions of linear models and what to do if the residuals are not normally distributed
First off, I would get yourself a copy of this classic and approachable article and read it: Anscombe FJ. (1973) Graphs in statistical analysis. The American Statistician. 27:17–21.
On to your questions:
Answer 1: Neither the depe... | Assumptions of linear models and what to do if the residuals are not normally distributed
First off, I would get yourself a copy of this classic and approachable article and read it: Anscombe FJ. (1973) Graphs in statistical analysis. The American Statistician. 27:17–21.
On to your questio |
5,803 | Assumptions of linear models and what to do if the residuals are not normally distributed | Your first problems are
in spite of your assurances, the residual plot shows that the conditional expected response isn't linear in the fitted values; the model for the mean is wrong.
you don't have constant variance. The model for the variance is wrong.
you can't even assess normality with those problems there. | Assumptions of linear models and what to do if the residuals are not normally distributed | Your first problems are
in spite of your assurances, the residual plot shows that the conditional expected response isn't linear in the fitted values; the model for the mean is wrong.
you don't have | Assumptions of linear models and what to do if the residuals are not normally distributed
Your first problems are
in spite of your assurances, the residual plot shows that the conditional expected response isn't linear in the fitted values; the model for the mean is wrong.
you don't have constant variance. The model f... | Assumptions of linear models and what to do if the residuals are not normally distributed
Your first problems are
in spite of your assurances, the residual plot shows that the conditional expected response isn't linear in the fitted values; the model for the mean is wrong.
you don't have |
5,804 | Assumptions of linear models and what to do if the residuals are not normally distributed | The most accessible exploration of the impact of non-normal errors that I have found is this paper by Schmidt and Finan.
Here is the summary of the results in the abstract:
Although outcome transformations bias point estimates, violations of the normality assumption in linear regression analyses do not. The normality ... | Assumptions of linear models and what to do if the residuals are not normally distributed | The most accessible exploration of the impact of non-normal errors that I have found is this paper by Schmidt and Finan.
Here is the summary of the results in the abstract:
Although outcome transform | Assumptions of linear models and what to do if the residuals are not normally distributed
The most accessible exploration of the impact of non-normal errors that I have found is this paper by Schmidt and Finan.
Here is the summary of the results in the abstract:
Although outcome transformations bias point estimates, v... | Assumptions of linear models and what to do if the residuals are not normally distributed
The most accessible exploration of the impact of non-normal errors that I have found is this paper by Schmidt and Finan.
Here is the summary of the results in the abstract:
Although outcome transform |
5,805 | Assumptions of linear models and what to do if the residuals are not normally distributed | In addition to the previous answer, I would like to add some points to improve your model:
Sometimes non-normality of residuals indicates the presence of outliers. If this is the case, handle the outliers first.
Maybe using some transformations solve the purpose however, it has consequences. Like the interpretation o... | Assumptions of linear models and what to do if the residuals are not normally distributed | In addition to the previous answer, I would like to add some points to improve your model:
Sometimes non-normality of residuals indicates the presence of outliers. If this is the case, handle the out | Assumptions of linear models and what to do if the residuals are not normally distributed
In addition to the previous answer, I would like to add some points to improve your model:
Sometimes non-normality of residuals indicates the presence of outliers. If this is the case, handle the outliers first.
Maybe using some... | Assumptions of linear models and what to do if the residuals are not normally distributed
In addition to the previous answer, I would like to add some points to improve your model:
Sometimes non-normality of residuals indicates the presence of outliers. If this is the case, handle the out |
5,806 | Assumptions of linear models and what to do if the residuals are not normally distributed | I wouldn't say the linear model is completely useless. However, this means that your model doesn't correctly/fully explain your data. There is a part where you have to decide whether the model is "good enough" or not.
For your first question, I don't think that a linear regression model assumes that your dependent and... | Assumptions of linear models and what to do if the residuals are not normally distributed | I wouldn't say the linear model is completely useless. However, this means that your model doesn't correctly/fully explain your data. There is a part where you have to decide whether the model is "goo | Assumptions of linear models and what to do if the residuals are not normally distributed
I wouldn't say the linear model is completely useless. However, this means that your model doesn't correctly/fully explain your data. There is a part where you have to decide whether the model is "good enough" or not.
For your fi... | Assumptions of linear models and what to do if the residuals are not normally distributed
I wouldn't say the linear model is completely useless. However, this means that your model doesn't correctly/fully explain your data. There is a part where you have to decide whether the model is "goo |
5,807 | Assumptions of linear models and what to do if the residuals are not normally distributed | For your second question,
Something that happened to me in practice was that I was overfitting my response with many independent variables. In the overfitted model I had non normal residuals. Even though, the results stablished that there wasn´t enought evidence to discart the posibility that some coeficients were zero... | Assumptions of linear models and what to do if the residuals are not normally distributed | For your second question,
Something that happened to me in practice was that I was overfitting my response with many independent variables. In the overfitted model I had non normal residuals. Even tho | Assumptions of linear models and what to do if the residuals are not normally distributed
For your second question,
Something that happened to me in practice was that I was overfitting my response with many independent variables. In the overfitted model I had non normal residuals. Even though, the results stablished th... | Assumptions of linear models and what to do if the residuals are not normally distributed
For your second question,
Something that happened to me in practice was that I was overfitting my response with many independent variables. In the overfitted model I had non normal residuals. Even tho |
5,808 | Is machine learning less useful for understanding causality, thus less interesting for social science? | There are IMHO no formal differences that distinguish machine learning and statistics at the fundamental level of fitting models to data. There may be cultural differences in the choice of models, the objectives of fitting models to data, and to some extend the interpretations.
In the typical examples I can think of we... | Is machine learning less useful for understanding causality, thus less interesting for social scienc | There are IMHO no formal differences that distinguish machine learning and statistics at the fundamental level of fitting models to data. There may be cultural differences in the choice of models, the | Is machine learning less useful for understanding causality, thus less interesting for social science?
There are IMHO no formal differences that distinguish machine learning and statistics at the fundamental level of fitting models to data. There may be cultural differences in the choice of models, the objectives of fi... | Is machine learning less useful for understanding causality, thus less interesting for social scienc
There are IMHO no formal differences that distinguish machine learning and statistics at the fundamental level of fitting models to data. There may be cultural differences in the choice of models, the |
5,809 | Is machine learning less useful for understanding causality, thus less interesting for social science? | There is a (fairly limited) set of statistical tools for so-called "causal inference". These are designed for actually assessing causal relationships and are proven to do this correctly. Excellent, but not for the meek of heart (or brain, for that matter).
Apart from that, in many instances, the ability to imply causal... | Is machine learning less useful for understanding causality, thus less interesting for social scienc | There is a (fairly limited) set of statistical tools for so-called "causal inference". These are designed for actually assessing causal relationships and are proven to do this correctly. Excellent, bu | Is machine learning less useful for understanding causality, thus less interesting for social science?
There is a (fairly limited) set of statistical tools for so-called "causal inference". These are designed for actually assessing causal relationships and are proven to do this correctly. Excellent, but not for the mee... | Is machine learning less useful for understanding causality, thus less interesting for social scienc
There is a (fairly limited) set of statistical tools for so-called "causal inference". These are designed for actually assessing causal relationships and are proven to do this correctly. Excellent, bu |
5,810 | Is machine learning less useful for understanding causality, thus less interesting for social science? | My view is that the models used in economics and the other social sciences are useful only insofar as they have predictive power in the real world - a model which doesn't predict the real world is just some clever math. A favorite saying of mine to colleagues is that "data is king".
It seems to me that your question ra... | Is machine learning less useful for understanding causality, thus less interesting for social scienc | My view is that the models used in economics and the other social sciences are useful only insofar as they have predictive power in the real world - a model which doesn't predict the real world is jus | Is machine learning less useful for understanding causality, thus less interesting for social science?
My view is that the models used in economics and the other social sciences are useful only insofar as they have predictive power in the real world - a model which doesn't predict the real world is just some clever mat... | Is machine learning less useful for understanding causality, thus less interesting for social scienc
My view is that the models used in economics and the other social sciences are useful only insofar as they have predictive power in the real world - a model which doesn't predict the real world is jus |
5,811 | Is machine learning less useful for understanding causality, thus less interesting for social science? | No. Causal inference is an active area of research in machine learning, for instance see the proceedings of this workshop and this one. I would however point out that even if causal inference or model interpretation is your primary interest, it is still a good idea to try an opaque purely predictive approach in paral... | Is machine learning less useful for understanding causality, thus less interesting for social scienc | No. Causal inference is an active area of research in machine learning, for instance see the proceedings of this workshop and this one. I would however point out that even if causal inference or mod | Is machine learning less useful for understanding causality, thus less interesting for social science?
No. Causal inference is an active area of research in machine learning, for instance see the proceedings of this workshop and this one. I would however point out that even if causal inference or model interpretation... | Is machine learning less useful for understanding causality, thus less interesting for social scienc
No. Causal inference is an active area of research in machine learning, for instance see the proceedings of this workshop and this one. I would however point out that even if causal inference or mod |
5,812 | Is machine learning less useful for understanding causality, thus less interesting for social science? | I will not re-iterate the very good points already made in other answers, but would like to add a somewhat different perspective. What I say here is somewhat philosophical, not necessarily drawn from professional experience, but from a mixed background in the physical sciences, complex systems theory and machine learni... | Is machine learning less useful for understanding causality, thus less interesting for social scienc | I will not re-iterate the very good points already made in other answers, but would like to add a somewhat different perspective. What I say here is somewhat philosophical, not necessarily drawn from | Is machine learning less useful for understanding causality, thus less interesting for social science?
I will not re-iterate the very good points already made in other answers, but would like to add a somewhat different perspective. What I say here is somewhat philosophical, not necessarily drawn from professional expe... | Is machine learning less useful for understanding causality, thus less interesting for social scienc
I will not re-iterate the very good points already made in other answers, but would like to add a somewhat different perspective. What I say here is somewhat philosophical, not necessarily drawn from |
5,813 | Softmax layer in a neural network | I feel a little bit bad about providing my own answer for this because it is pretty well captured by amoeba and juampa, except for maybe the final intuition about how the Jacobian can be reduced back to a vector.
You correctly derived the gradient of the diagonal of the Jacobian matrix, which is to say that
$ {\parti... | Softmax layer in a neural network | I feel a little bit bad about providing my own answer for this because it is pretty well captured by amoeba and juampa, except for maybe the final intuition about how the Jacobian can be reduced back | Softmax layer in a neural network
I feel a little bit bad about providing my own answer for this because it is pretty well captured by amoeba and juampa, except for maybe the final intuition about how the Jacobian can be reduced back to a vector.
You correctly derived the gradient of the diagonal of the Jacobian matri... | Softmax layer in a neural network
I feel a little bit bad about providing my own answer for this because it is pretty well captured by amoeba and juampa, except for maybe the final intuition about how the Jacobian can be reduced back |
5,814 | Softmax layer in a neural network | The derivative is wrong. It should be,
$$\frac{\partial h_{j}}{\partial z_{k}} = h_{j}\delta_{kj}-h_{j}h_{k}$$
check your calculations again.
Also, the expression given by amoeba for the cross-entropy is not entirely correct. For a set of data samples drawn from $C$ different classes, it reads,
$$-\sum_{n}\sum_{k=1}^{C... | Softmax layer in a neural network | The derivative is wrong. It should be,
$$\frac{\partial h_{j}}{\partial z_{k}} = h_{j}\delta_{kj}-h_{j}h_{k}$$
check your calculations again.
Also, the expression given by amoeba for the cross-entropy | Softmax layer in a neural network
The derivative is wrong. It should be,
$$\frac{\partial h_{j}}{\partial z_{k}} = h_{j}\delta_{kj}-h_{j}h_{k}$$
check your calculations again.
Also, the expression given by amoeba for the cross-entropy is not entirely correct. For a set of data samples drawn from $C$ different classes, ... | Softmax layer in a neural network
The derivative is wrong. It should be,
$$\frac{\partial h_{j}}{\partial z_{k}} = h_{j}\delta_{kj}-h_{j}h_{k}$$
check your calculations again.
Also, the expression given by amoeba for the cross-entropy |
5,815 | Softmax layer in a neural network | Each output of the softmax depends on all the inputs, so the gradient is indeed a whole Jacobian matrix. You correctly computed $\partial_j h_j = \frac{\partial h_j}{\partial z_j}=h_j(1-h_j)$, but you also need $\partial_k h_j=-h_jh_k$ if $j \neq k$. I guess if you can derive the first expression, you should easily be ... | Softmax layer in a neural network | Each output of the softmax depends on all the inputs, so the gradient is indeed a whole Jacobian matrix. You correctly computed $\partial_j h_j = \frac{\partial h_j}{\partial z_j}=h_j(1-h_j)$, but you | Softmax layer in a neural network
Each output of the softmax depends on all the inputs, so the gradient is indeed a whole Jacobian matrix. You correctly computed $\partial_j h_j = \frac{\partial h_j}{\partial z_j}=h_j(1-h_j)$, but you also need $\partial_k h_j=-h_jh_k$ if $j \neq k$. I guess if you can derive the first... | Softmax layer in a neural network
Each output of the softmax depends on all the inputs, so the gradient is indeed a whole Jacobian matrix. You correctly computed $\partial_j h_j = \frac{\partial h_j}{\partial z_j}=h_j(1-h_j)$, but you |
5,816 | Difference between naive Bayes & multinomial naive Bayes | The general term Naive Bayes refers the the strong independence assumptions in the model, rather than the particular distribution of each feature. A Naive Bayes model assumes that each of the features it uses are conditionally independent of one another given some class. More formally, if I want to calculate the probab... | Difference between naive Bayes & multinomial naive Bayes | The general term Naive Bayes refers the the strong independence assumptions in the model, rather than the particular distribution of each feature. A Naive Bayes model assumes that each of the features | Difference between naive Bayes & multinomial naive Bayes
The general term Naive Bayes refers the the strong independence assumptions in the model, rather than the particular distribution of each feature. A Naive Bayes model assumes that each of the features it uses are conditionally independent of one another given som... | Difference between naive Bayes & multinomial naive Bayes
The general term Naive Bayes refers the the strong independence assumptions in the model, rather than the particular distribution of each feature. A Naive Bayes model assumes that each of the features |
5,817 | Difference between naive Bayes & multinomial naive Bayes | In general, to train Naive Bayes for n-dimensional data, and k classes you need to estimate $P(x_i | c_j)$ for each $1 \leq i \leq n$, $1 \leq j \leq k$ . You can assume any probability distribution for any pair $(i,j)$ (although it's better to not assume discrete distribution for $P(x_i|c_{j_1})$ and continuous for $P... | Difference between naive Bayes & multinomial naive Bayes | In general, to train Naive Bayes for n-dimensional data, and k classes you need to estimate $P(x_i | c_j)$ for each $1 \leq i \leq n$, $1 \leq j \leq k$ . You can assume any probability distribution f | Difference between naive Bayes & multinomial naive Bayes
In general, to train Naive Bayes for n-dimensional data, and k classes you need to estimate $P(x_i | c_j)$ for each $1 \leq i \leq n$, $1 \leq j \leq k$ . You can assume any probability distribution for any pair $(i,j)$ (although it's better to not assume discret... | Difference between naive Bayes & multinomial naive Bayes
In general, to train Naive Bayes for n-dimensional data, and k classes you need to estimate $P(x_i | c_j)$ for each $1 \leq i \leq n$, $1 \leq j \leq k$ . You can assume any probability distribution f |
5,818 | How to interpret F- and p-value in ANOVA? | To answer your questions:
You find the critical F value from an F distribution (here's a table). See an example. You have to be careful about one-way versus two-way, degrees of freedom of numerator and denominator.
Yes. | How to interpret F- and p-value in ANOVA? | To answer your questions:
You find the critical F value from an F distribution (here's a table). See an example. You have to be careful about one-way versus two-way, degrees of freedom of numerator | How to interpret F- and p-value in ANOVA?
To answer your questions:
You find the critical F value from an F distribution (here's a table). See an example. You have to be careful about one-way versus two-way, degrees of freedom of numerator and denominator.
Yes. | How to interpret F- and p-value in ANOVA?
To answer your questions:
You find the critical F value from an F distribution (here's a table). See an example. You have to be careful about one-way versus two-way, degrees of freedom of numerator |
5,819 | How to interpret F- and p-value in ANOVA? | The F statistic is a ratio of 2 different measure of variance for the data. If the null hypothesis is true then these are both estimates of the same thing and the ratio will be around 1.
The numerator is computed by measuring the variance of the means and if the true means of the groups are identical then this is a ... | How to interpret F- and p-value in ANOVA? | The F statistic is a ratio of 2 different measure of variance for the data. If the null hypothesis is true then these are both estimates of the same thing and the ratio will be around 1.
The numera | How to interpret F- and p-value in ANOVA?
The F statistic is a ratio of 2 different measure of variance for the data. If the null hypothesis is true then these are both estimates of the same thing and the ratio will be around 1.
The numerator is computed by measuring the variance of the means and if the true means o... | How to interpret F- and p-value in ANOVA?
The F statistic is a ratio of 2 different measure of variance for the data. If the null hypothesis is true then these are both estimates of the same thing and the ratio will be around 1.
The numera |
5,820 | How to interpret F- and p-value in ANOVA? | The best way to think about the relationship between $F$, $p$, and the critical value is with a picture:
The curve here is an $F$ distribution, that is, the distribution of $F$ statistics that we'd see if the null hypothesis were true. In this diagram, the observed $F$ statistic is the distance from black dashed line ... | How to interpret F- and p-value in ANOVA? | The best way to think about the relationship between $F$, $p$, and the critical value is with a picture:
The curve here is an $F$ distribution, that is, the distribution of $F$ statistics that we'd s | How to interpret F- and p-value in ANOVA?
The best way to think about the relationship between $F$, $p$, and the critical value is with a picture:
The curve here is an $F$ distribution, that is, the distribution of $F$ statistics that we'd see if the null hypothesis were true. In this diagram, the observed $F$ statist... | How to interpret F- and p-value in ANOVA?
The best way to think about the relationship between $F$, $p$, and the critical value is with a picture:
The curve here is an $F$ distribution, that is, the distribution of $F$ statistics that we'd s |
5,821 | Relationship between Binomial and Beta distributions | Consider the order statistics $x_{[0]} \le x_{[1]} \le \cdots \le x_{[n]}$ of $n+1$ independent draws from a uniform distribution. Because order statistics have Beta distributions, the chance that $x_{[k]}$ does not exceed $p$ is given by the Beta integral
$$\Pr[x_{[k]} \le p] = \frac{1}{B(k+1, n-k+1)} \int_0^p{x^k(1-... | Relationship between Binomial and Beta distributions | Consider the order statistics $x_{[0]} \le x_{[1]} \le \cdots \le x_{[n]}$ of $n+1$ independent draws from a uniform distribution. Because order statistics have Beta distributions, the chance that $x | Relationship between Binomial and Beta distributions
Consider the order statistics $x_{[0]} \le x_{[1]} \le \cdots \le x_{[n]}$ of $n+1$ independent draws from a uniform distribution. Because order statistics have Beta distributions, the chance that $x_{[k]}$ does not exceed $p$ is given by the Beta integral
$$\Pr[x_{... | Relationship between Binomial and Beta distributions
Consider the order statistics $x_{[0]} \le x_{[1]} \le \cdots \le x_{[n]}$ of $n+1$ independent draws from a uniform distribution. Because order statistics have Beta distributions, the chance that $x |
5,822 | Relationship between Binomial and Beta distributions | Look at the pdf of Binomial as a function of $x$: $$f(x) = {n\choose{x}}p^{x}(1-p)^{n-x}$$ and the pdf of Beta as a function of $p$: $$g(p)=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}p^{a-1}(1-p)^{b-1}$$
You probably can see that with an appropriate (integer) choice for $a$ and $b$ these are the same. As far as I can tel... | Relationship between Binomial and Beta distributions | Look at the pdf of Binomial as a function of $x$: $$f(x) = {n\choose{x}}p^{x}(1-p)^{n-x}$$ and the pdf of Beta as a function of $p$: $$g(p)=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}p^{a-1}(1-p)^{b-1}$$ | Relationship between Binomial and Beta distributions
Look at the pdf of Binomial as a function of $x$: $$f(x) = {n\choose{x}}p^{x}(1-p)^{n-x}$$ and the pdf of Beta as a function of $p$: $$g(p)=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}p^{a-1}(1-p)^{b-1}$$
You probably can see that with an appropriate (integer) choice fo... | Relationship between Binomial and Beta distributions
Look at the pdf of Binomial as a function of $x$: $$f(x) = {n\choose{x}}p^{x}(1-p)^{n-x}$$ and the pdf of Beta as a function of $p$: $$g(p)=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}p^{a-1}(1-p)^{b-1}$$ |
5,823 | Relationship between Binomial and Beta distributions | As you noted, the Beta distribution describes the distribution of the trial probability parameter $F$, while the binomial distribution describes the distribution of the outcome parameter $I$. Rewriting your question, what you asked about was why
$$P(F \le \frac {i+1} n)+P(I \le fn-1)=1$$
$$P(Fn \le i+1)+P(I+1 \le fn)... | Relationship between Binomial and Beta distributions | As you noted, the Beta distribution describes the distribution of the trial probability parameter $F$, while the binomial distribution describes the distribution of the outcome parameter $I$. Rewritin | Relationship between Binomial and Beta distributions
As you noted, the Beta distribution describes the distribution of the trial probability parameter $F$, while the binomial distribution describes the distribution of the outcome parameter $I$. Rewriting your question, what you asked about was why
$$P(F \le \frac {i+1... | Relationship between Binomial and Beta distributions
As you noted, the Beta distribution describes the distribution of the trial probability parameter $F$, while the binomial distribution describes the distribution of the outcome parameter $I$. Rewritin |
5,824 | Relationship between Binomial and Beta distributions | Summary: It is often said that Beta distribution is a distribution on distributions! But what is means?
It essentially means that you may fix $n,k$ and think of $\mathbb P[Bin(n,p)\geqslant k]$ as a function of $p$. What the calculation below says is that the value of $\mathbb P[Bin(n,p)\geqslant k]$ increases from $0$... | Relationship between Binomial and Beta distributions | Summary: It is often said that Beta distribution is a distribution on distributions! But what is means?
It essentially means that you may fix $n,k$ and think of $\mathbb P[Bin(n,p)\geqslant k]$ as a f | Relationship between Binomial and Beta distributions
Summary: It is often said that Beta distribution is a distribution on distributions! But what is means?
It essentially means that you may fix $n,k$ and think of $\mathbb P[Bin(n,p)\geqslant k]$ as a function of $p$. What the calculation below says is that the value o... | Relationship between Binomial and Beta distributions
Summary: It is often said that Beta distribution is a distribution on distributions! But what is means?
It essentially means that you may fix $n,k$ and think of $\mathbb P[Bin(n,p)\geqslant k]$ as a f |
5,825 | Relationship between Binomial and Beta distributions | In Bayesian land, the Beta distribution is the conjugate prior for the p parameter of the Binomial distribution. | Relationship between Binomial and Beta distributions | In Bayesian land, the Beta distribution is the conjugate prior for the p parameter of the Binomial distribution. | Relationship between Binomial and Beta distributions
In Bayesian land, the Beta distribution is the conjugate prior for the p parameter of the Binomial distribution. | Relationship between Binomial and Beta distributions
In Bayesian land, the Beta distribution is the conjugate prior for the p parameter of the Binomial distribution. |
5,826 | Relationship between Binomial and Beta distributions | Can't comment on other answers, so i have to create my own answer.
Posterior = C * Likelihood * Prior (C is a constant that makes Posterior integrated to 1)
Given a model that uses Binomial distribution for likelihood, and Beta distribution for Prior. The product of the two which generates the Posterior is also a Beta ... | Relationship between Binomial and Beta distributions | Can't comment on other answers, so i have to create my own answer.
Posterior = C * Likelihood * Prior (C is a constant that makes Posterior integrated to 1)
Given a model that uses Binomial distributi | Relationship between Binomial and Beta distributions
Can't comment on other answers, so i have to create my own answer.
Posterior = C * Likelihood * Prior (C is a constant that makes Posterior integrated to 1)
Given a model that uses Binomial distribution for likelihood, and Beta distribution for Prior. The product of ... | Relationship between Binomial and Beta distributions
Can't comment on other answers, so i have to create my own answer.
Posterior = C * Likelihood * Prior (C is a constant that makes Posterior integrated to 1)
Given a model that uses Binomial distributi |
5,827 | Relationship between Binomial and Beta distributions | Here is an intuitive explanation that works for me:
$Binomial(n, p)$:
When repeating a Bernoulli trial with $p$ probability $n$ times. The chance of exactly $k$ successes is:
$$Binomial_\mathit{pmf}(\pmb{k}, n, p) = {n\choose \pmb{k}} p^{\pmb{k}} (1-p)^{n-\pmb{k}}$$
$Beta(n, k)^*$:
For a fixed $n$ and $k$, given prob... | Relationship between Binomial and Beta distributions | Here is an intuitive explanation that works for me:
$Binomial(n, p)$:
When repeating a Bernoulli trial with $p$ probability $n$ times. The chance of exactly $k$ successes is:
$$Binomial_\mathit{pmf}( | Relationship between Binomial and Beta distributions
Here is an intuitive explanation that works for me:
$Binomial(n, p)$:
When repeating a Bernoulli trial with $p$ probability $n$ times. The chance of exactly $k$ successes is:
$$Binomial_\mathit{pmf}(\pmb{k}, n, p) = {n\choose \pmb{k}} p^{\pmb{k}} (1-p)^{n-\pmb{k}}$$... | Relationship between Binomial and Beta distributions
Here is an intuitive explanation that works for me:
$Binomial(n, p)$:
When repeating a Bernoulli trial with $p$ probability $n$ times. The chance of exactly $k$ successes is:
$$Binomial_\mathit{pmf}( |
5,828 | Analysis with complex data, anything different? | Summary
The generalization of least-squares regression to complex-valued variables is straightforward, consisting primarily of replacing matrix transposes by conjugate transposes in the usual matrix formulas. A complex-valued regression, though, corresponds to a complicated multivariate multiple regression whose solut... | Analysis with complex data, anything different? | Summary
The generalization of least-squares regression to complex-valued variables is straightforward, consisting primarily of replacing matrix transposes by conjugate transposes in the usual matrix f | Analysis with complex data, anything different?
Summary
The generalization of least-squares regression to complex-valued variables is straightforward, consisting primarily of replacing matrix transposes by conjugate transposes in the usual matrix formulas. A complex-valued regression, though, corresponds to a complica... | Analysis with complex data, anything different?
Summary
The generalization of least-squares regression to complex-valued variables is straightforward, consisting primarily of replacing matrix transposes by conjugate transposes in the usual matrix f |
5,829 | Analysis with complex data, anything different? | After a nice long google sesh, I found some relevant information on understanding the problem in an alternative manner. It turns out similar problems are somewhat common in statistical signal processing. Instead of starting with a Gaussian likelihood which corresponds to a linear least squares for real data, one star... | Analysis with complex data, anything different? | After a nice long google sesh, I found some relevant information on understanding the problem in an alternative manner. It turns out similar problems are somewhat common in statistical signal process | Analysis with complex data, anything different?
After a nice long google sesh, I found some relevant information on understanding the problem in an alternative manner. It turns out similar problems are somewhat common in statistical signal processing. Instead of starting with a Gaussian likelihood which corresponds t... | Analysis with complex data, anything different?
After a nice long google sesh, I found some relevant information on understanding the problem in an alternative manner. It turns out similar problems are somewhat common in statistical signal process |
5,830 | Analysis with complex data, anything different? | This issue has come up again on the Mathematica StackExchange and my answer/extended comment there is that @whuber 's excellent answer should be followed.
My answer here is an attempt to extend @whuber 's answer just a little bit by making the error structure a little more explicit. The proposed least squares estimato... | Analysis with complex data, anything different? | This issue has come up again on the Mathematica StackExchange and my answer/extended comment there is that @whuber 's excellent answer should be followed.
My answer here is an attempt to extend @whube | Analysis with complex data, anything different?
This issue has come up again on the Mathematica StackExchange and my answer/extended comment there is that @whuber 's excellent answer should be followed.
My answer here is an attempt to extend @whuber 's answer just a little bit by making the error structure a little mor... | Analysis with complex data, anything different?
This issue has come up again on the Mathematica StackExchange and my answer/extended comment there is that @whuber 's excellent answer should be followed.
My answer here is an attempt to extend @whube |
5,831 | Analysis with complex data, anything different? | While @whuber has a beautifully-illustrated and well-explained answer, I think it's a simplified model that misses some of the power of the complex space.
Linear least-squares regression on reals is equivalent to the following model with inputs $w$, parameters $\beta$, and target $x$:
$$z = \beta_0 + \beta_1 w + \epsil... | Analysis with complex data, anything different? | While @whuber has a beautifully-illustrated and well-explained answer, I think it's a simplified model that misses some of the power of the complex space.
Linear least-squares regression on reals is e | Analysis with complex data, anything different?
While @whuber has a beautifully-illustrated and well-explained answer, I think it's a simplified model that misses some of the power of the complex space.
Linear least-squares regression on reals is equivalent to the following model with inputs $w$, parameters $\beta$, an... | Analysis with complex data, anything different?
While @whuber has a beautifully-illustrated and well-explained answer, I think it's a simplified model that misses some of the power of the complex space.
Linear least-squares regression on reals is e |
5,832 | Analysis with complex data, anything different? | Start replacing transpose for conjugate transpose in the normal equations:
$$ {\hat\beta} = (X^H X)^{-1} (X^H y) $$
The residual vector remains simply:
$$ r = y - H {\hat\beta} $$
The covariance matrix and the additional pseudo-covariance matrix will be:
$$ K = (X^H X)^{-1} \sigma^2_K $$
$$ J = (X^T X)^{-1} \sigma^2_J ... | Analysis with complex data, anything different? | Start replacing transpose for conjugate transpose in the normal equations:
$$ {\hat\beta} = (X^H X)^{-1} (X^H y) $$
The residual vector remains simply:
$$ r = y - H {\hat\beta} $$
The covariance matri | Analysis with complex data, anything different?
Start replacing transpose for conjugate transpose in the normal equations:
$$ {\hat\beta} = (X^H X)^{-1} (X^H y) $$
The residual vector remains simply:
$$ r = y - H {\hat\beta} $$
The covariance matrix and the additional pseudo-covariance matrix will be:
$$ K = (X^H X)^{-... | Analysis with complex data, anything different?
Start replacing transpose for conjugate transpose in the normal equations:
$$ {\hat\beta} = (X^H X)^{-1} (X^H y) $$
The residual vector remains simply:
$$ r = y - H {\hat\beta} $$
The covariance matri |
5,833 | What is the difference between a population and a sample? | The population is the set of entities under study. For example, the mean height of men. This is a hypothetical population because it includes all men that have lived, are alive and will live in the future. I like this example because it drives home the point that we, as analysts, choose the population that we wish to s... | What is the difference between a population and a sample? | The population is the set of entities under study. For example, the mean height of men. This is a hypothetical population because it includes all men that have lived, are alive and will live in the fu | What is the difference between a population and a sample?
The population is the set of entities under study. For example, the mean height of men. This is a hypothetical population because it includes all men that have lived, are alive and will live in the future. I like this example because it drives home the point tha... | What is the difference between a population and a sample?
The population is the set of entities under study. For example, the mean height of men. This is a hypothetical population because it includes all men that have lived, are alive and will live in the fu |
5,834 | What is the difference between a population and a sample? | The population is the whole set of values, or individuals, you are interested in. The sample is a subset of the population, and is the set of values you actually use in your estimation.
So, for example, if you want to know the average height of the residents of China, that is your population, ie, the population of Chin... | What is the difference between a population and a sample? | The population is the whole set of values, or individuals, you are interested in. The sample is a subset of the population, and is the set of values you actually use in your estimation.
So, for exampl | What is the difference between a population and a sample?
The population is the whole set of values, or individuals, you are interested in. The sample is a subset of the population, and is the set of values you actually use in your estimation.
So, for example, if you want to know the average height of the residents of ... | What is the difference between a population and a sample?
The population is the whole set of values, or individuals, you are interested in. The sample is a subset of the population, and is the set of values you actually use in your estimation.
So, for exampl |
5,835 | What is the difference between a population and a sample? | The population is everything in the group of study. For example, if you are studying the price of Apple's shares, it is the historical, current, and even all future stock prices. Or, if you run an egg factory, it is all the eggs made by the factory.
You don't always have to sample, and do statistical tests. If your pop... | What is the difference between a population and a sample? | The population is everything in the group of study. For example, if you are studying the price of Apple's shares, it is the historical, current, and even all future stock prices. Or, if you run an egg | What is the difference between a population and a sample?
The population is everything in the group of study. For example, if you are studying the price of Apple's shares, it is the historical, current, and even all future stock prices. Or, if you run an egg factory, it is all the eggs made by the factory.
You don't al... | What is the difference between a population and a sample?
The population is everything in the group of study. For example, if you are studying the price of Apple's shares, it is the historical, current, and even all future stock prices. Or, if you run an egg |
5,836 | What is the difference between a population and a sample? | When we think of the term “population,” we usually think of people in our town, region, state or country and their respective characteristics such as gender, age, marital status, ethnic membership, religion and so forth. In statistics the term “population” takes on a slightly different meaning. The “population” in stat... | What is the difference between a population and a sample? | When we think of the term “population,” we usually think of people in our town, region, state or country and their respective characteristics such as gender, age, marital status, ethnic membership, re | What is the difference between a population and a sample?
When we think of the term “population,” we usually think of people in our town, region, state or country and their respective characteristics such as gender, age, marital status, ethnic membership, religion and so forth. In statistics the term “population” takes... | What is the difference between a population and a sample?
When we think of the term “population,” we usually think of people in our town, region, state or country and their respective characteristics such as gender, age, marital status, ethnic membership, re |
5,837 | What is the difference between a population and a sample? | A population includes all of the elements from a set of data.
A sample consists of one or more observations from the population.
BOA, A.(2012, 17) | What is the difference between a population and a sample? | A population includes all of the elements from a set of data.
A sample consists of one or more observations from the population.
BOA, A.(2012, 17) | What is the difference between a population and a sample?
A population includes all of the elements from a set of data.
A sample consists of one or more observations from the population.
BOA, A.(2012, 17) | What is the difference between a population and a sample?
A population includes all of the elements from a set of data.
A sample consists of one or more observations from the population.
BOA, A.(2012, 17) |
5,838 | PCA objective function: what is the connection between maximizing variance and minimizing error? | Let $\newcommand{\X}{\mathbf X}\X$ be a centered data matrix with $n$ observations in rows. Let $\newcommand{\S}{\boldsymbol \Sigma}\S=\X^\top\X/(n-1)$ be its covariance matrix. Let $\newcommand{\w}{\mathbf w}\w$ be a unit vector specifying an axis in the variable space. We want $\w$ to be the first principal axis.
Acc... | PCA objective function: what is the connection between maximizing variance and minimizing error? | Let $\newcommand{\X}{\mathbf X}\X$ be a centered data matrix with $n$ observations in rows. Let $\newcommand{\S}{\boldsymbol \Sigma}\S=\X^\top\X/(n-1)$ be its covariance matrix. Let $\newcommand{\w}{\ | PCA objective function: what is the connection between maximizing variance and minimizing error?
Let $\newcommand{\X}{\mathbf X}\X$ be a centered data matrix with $n$ observations in rows. Let $\newcommand{\S}{\boldsymbol \Sigma}\S=\X^\top\X/(n-1)$ be its covariance matrix. Let $\newcommand{\w}{\mathbf w}\w$ be a unit ... | PCA objective function: what is the connection between maximizing variance and minimizing error?
Let $\newcommand{\X}{\mathbf X}\X$ be a centered data matrix with $n$ observations in rows. Let $\newcommand{\S}{\boldsymbol \Sigma}\S=\X^\top\X/(n-1)$ be its covariance matrix. Let $\newcommand{\w}{\ |
5,839 | How to model non-negative zero-inflated continuous data? | There are a variety of solutions to the case of zero-inflated (semi-)continuous distributions:
Tobit regression: assumes that the data come from a single underlying Normal distribution, but that negative values are censored and stacked on zero (e.g. censReg package). Here is a good book about Tobit model, see chapters... | How to model non-negative zero-inflated continuous data? | There are a variety of solutions to the case of zero-inflated (semi-)continuous distributions:
Tobit regression: assumes that the data come from a single underlying Normal distribution, but that nega | How to model non-negative zero-inflated continuous data?
There are a variety of solutions to the case of zero-inflated (semi-)continuous distributions:
Tobit regression: assumes that the data come from a single underlying Normal distribution, but that negative values are censored and stacked on zero (e.g. censReg pack... | How to model non-negative zero-inflated continuous data?
There are a variety of solutions to the case of zero-inflated (semi-)continuous distributions:
Tobit regression: assumes that the data come from a single underlying Normal distribution, but that nega |
5,840 | How to model non-negative zero-inflated continuous data? | You can also use the Poisson Pseudo-Maximum Likelihood (PPML). It was firstly developed by Santos Silva and Tenreyero (2006) for the application of international trade among countries. In 2011, the same authors extended the analysis of the PPML's performance (see in here). They also have this page with some material ab... | How to model non-negative zero-inflated continuous data? | You can also use the Poisson Pseudo-Maximum Likelihood (PPML). It was firstly developed by Santos Silva and Tenreyero (2006) for the application of international trade among countries. In 2011, the sa | How to model non-negative zero-inflated continuous data?
You can also use the Poisson Pseudo-Maximum Likelihood (PPML). It was firstly developed by Santos Silva and Tenreyero (2006) for the application of international trade among countries. In 2011, the same authors extended the analysis of the PPML's performance (see... | How to model non-negative zero-inflated continuous data?
You can also use the Poisson Pseudo-Maximum Likelihood (PPML). It was firstly developed by Santos Silva and Tenreyero (2006) for the application of international trade among countries. In 2011, the sa |
5,841 | What is meant by 'weak learner'? | A 'weak' learner (classifer, predictor, etc) is just one which performs relatively poorly--its accuracy is above chance, but just barely. There is often, but not always, the added implication that it is computationally simple. Weak learner also suggests that many instances of the algorithm are being pooled (via boostin... | What is meant by 'weak learner'? | A 'weak' learner (classifer, predictor, etc) is just one which performs relatively poorly--its accuracy is above chance, but just barely. There is often, but not always, the added implication that it | What is meant by 'weak learner'?
A 'weak' learner (classifer, predictor, etc) is just one which performs relatively poorly--its accuracy is above chance, but just barely. There is often, but not always, the added implication that it is computationally simple. Weak learner also suggests that many instances of the algori... | What is meant by 'weak learner'?
A 'weak' learner (classifer, predictor, etc) is just one which performs relatively poorly--its accuracy is above chance, but just barely. There is often, but not always, the added implication that it |
5,842 | What is meant by 'weak learner'? | Weak learner is a learner that no matter what the distribution over the training data is will always do better than chance, when it tries to label the data.
Doing better than chance means we are always going to have an error rate which is less than 1/2.
This means that the learner algorithm is always going to learn som... | What is meant by 'weak learner'? | Weak learner is a learner that no matter what the distribution over the training data is will always do better than chance, when it tries to label the data.
Doing better than chance means we are alway | What is meant by 'weak learner'?
Weak learner is a learner that no matter what the distribution over the training data is will always do better than chance, when it tries to label the data.
Doing better than chance means we are always going to have an error rate which is less than 1/2.
This means that the learner algor... | What is meant by 'weak learner'?
Weak learner is a learner that no matter what the distribution over the training data is will always do better than chance, when it tries to label the data.
Doing better than chance means we are alway |
5,843 | What is meant by 'weak learner'? | Weak learner is the same as weak classifier, or weak predictor. The idea is that you use a classifier that is, well..., not that good, but at least better than random. The benefit is that the classifier will be robust in overfitting. Of course you don't use just one but a large set of those, each one slightly better th... | What is meant by 'weak learner'? | Weak learner is the same as weak classifier, or weak predictor. The idea is that you use a classifier that is, well..., not that good, but at least better than random. The benefit is that the classifi | What is meant by 'weak learner'?
Weak learner is the same as weak classifier, or weak predictor. The idea is that you use a classifier that is, well..., not that good, but at least better than random. The benefit is that the classifier will be robust in overfitting. Of course you don't use just one but a large set of t... | What is meant by 'weak learner'?
Weak learner is the same as weak classifier, or weak predictor. The idea is that you use a classifier that is, well..., not that good, but at least better than random. The benefit is that the classifi |
5,844 | If only prediction is of interest, why use lasso over ridge? | You are right to ask this question. In general, when a proper accuracy scoring rule is used (e.g., mean squared prediction error), ridge regression will outperform lasso. Lasso spends some of the information trying to find the "right" predictors and it's not even great at doing that in many cases. Relative performan... | If only prediction is of interest, why use lasso over ridge? | You are right to ask this question. In general, when a proper accuracy scoring rule is used (e.g., mean squared prediction error), ridge regression will outperform lasso. Lasso spends some of the in | If only prediction is of interest, why use lasso over ridge?
You are right to ask this question. In general, when a proper accuracy scoring rule is used (e.g., mean squared prediction error), ridge regression will outperform lasso. Lasso spends some of the information trying to find the "right" predictors and it's no... | If only prediction is of interest, why use lasso over ridge?
You are right to ask this question. In general, when a proper accuracy scoring rule is used (e.g., mean squared prediction error), ridge regression will outperform lasso. Lasso spends some of the in |
5,845 | If only prediction is of interest, why use lasso over ridge? | I think the specific setup of the example you reference is key to understanding why lasso outperforms ridge: only 2 of 45 predictors are actually relevant.
This borders on a pathological case: lasso, specifically intended to make reductions to zero easy, performs exactly as intended, while ridge will have to deal with... | If only prediction is of interest, why use lasso over ridge? | I think the specific setup of the example you reference is key to understanding why lasso outperforms ridge: only 2 of 45 predictors are actually relevant.
This borders on a pathological case: lasso, | If only prediction is of interest, why use lasso over ridge?
I think the specific setup of the example you reference is key to understanding why lasso outperforms ridge: only 2 of 45 predictors are actually relevant.
This borders on a pathological case: lasso, specifically intended to make reductions to zero easy, per... | If only prediction is of interest, why use lasso over ridge?
I think the specific setup of the example you reference is key to understanding why lasso outperforms ridge: only 2 of 45 predictors are actually relevant.
This borders on a pathological case: lasso, |
5,846 | Why are non zero-centered activation functions a problem in backpropagation? | $$f=\sum w_ix_i+b$$ $$\frac{df}{dw_i}=x_i$$ $$\frac{dL}{dw_i}=\frac{dL}{df}\frac{df}{dw_i}=\frac{dL}{df}x_i$$
because $x_i>0$, the gradient $\dfrac{dL}{dw_i}$ always has the same sign as $\dfrac{dL}{df}$ (all positive or all negative).
Update
Say there are two parameters $w_1$ and $w_2$. If the gradients of two dimensi... | Why are non zero-centered activation functions a problem in backpropagation? | $$f=\sum w_ix_i+b$$ $$\frac{df}{dw_i}=x_i$$ $$\frac{dL}{dw_i}=\frac{dL}{df}\frac{df}{dw_i}=\frac{dL}{df}x_i$$
because $x_i>0$, the gradient $\dfrac{dL}{dw_i}$ always has the same sign as $\dfrac{dL}{d | Why are non zero-centered activation functions a problem in backpropagation?
$$f=\sum w_ix_i+b$$ $$\frac{df}{dw_i}=x_i$$ $$\frac{dL}{dw_i}=\frac{dL}{df}\frac{df}{dw_i}=\frac{dL}{df}x_i$$
because $x_i>0$, the gradient $\dfrac{dL}{dw_i}$ always has the same sign as $\dfrac{dL}{df}$ (all positive or all negative).
Update
... | Why are non zero-centered activation functions a problem in backpropagation?
$$f=\sum w_ix_i+b$$ $$\frac{df}{dw_i}=x_i$$ $$\frac{dL}{dw_i}=\frac{dL}{df}\frac{df}{dw_i}=\frac{dL}{df}x_i$$
because $x_i>0$, the gradient $\dfrac{dL}{dw_i}$ always has the same sign as $\dfrac{dL}{d |
5,847 | Why is Laplace prior producing sparse solutions? | The relation of Laplace distribution prior with median (or L1 norm) was found by Laplace himself, who found that using such prior you estimate median rather than mean as with Normal distribution (see Stingler, 1986 or Wikipedia). This means that regression with Laplace errors distribution estimates the median (like e.g... | Why is Laplace prior producing sparse solutions? | The relation of Laplace distribution prior with median (or L1 norm) was found by Laplace himself, who found that using such prior you estimate median rather than mean as with Normal distribution (see | Why is Laplace prior producing sparse solutions?
The relation of Laplace distribution prior with median (or L1 norm) was found by Laplace himself, who found that using such prior you estimate median rather than mean as with Normal distribution (see Stingler, 1986 or Wikipedia). This means that regression with Laplace e... | Why is Laplace prior producing sparse solutions?
The relation of Laplace distribution prior with median (or L1 norm) was found by Laplace himself, who found that using such prior you estimate median rather than mean as with Normal distribution (see |
5,848 | Why is Laplace prior producing sparse solutions? | Frequentist view 👀
In one sense, we can think of both regularizations as "shrinking the weights"; L2 minimizes the Euclidean norm of the weights, while L1 minimizes the Manhattan norm. Following this line of thinking, we can reason that the equipotentials of L1 and L2 are spherical and diamond-shaped respectively, so ... | Why is Laplace prior producing sparse solutions? | Frequentist view 👀
In one sense, we can think of both regularizations as "shrinking the weights"; L2 minimizes the Euclidean norm of the weights, while L1 minimizes the Manhattan norm. Following this | Why is Laplace prior producing sparse solutions?
Frequentist view 👀
In one sense, we can think of both regularizations as "shrinking the weights"; L2 minimizes the Euclidean norm of the weights, while L1 minimizes the Manhattan norm. Following this line of thinking, we can reason that the equipotentials of L1 and L2 a... | Why is Laplace prior producing sparse solutions?
Frequentist view 👀
In one sense, we can think of both regularizations as "shrinking the weights"; L2 minimizes the Euclidean norm of the weights, while L1 minimizes the Manhattan norm. Following this |
5,849 | Why does increasing the sample size lower the (sampling) variance? | Standard deviations of averages are smaller than standard deviations of individual observations. [Here I will assume independent identically distributed
observations with finite population variance; something similar can be said if you relax the first two conditions.]
It's a consequence of the simple fact that the stan... | Why does increasing the sample size lower the (sampling) variance? | Standard deviations of averages are smaller than standard deviations of individual observations. [Here I will assume independent identically distributed
observations with finite population variance; s | Why does increasing the sample size lower the (sampling) variance?
Standard deviations of averages are smaller than standard deviations of individual observations. [Here I will assume independent identically distributed
observations with finite population variance; something similar can be said if you relax the first t... | Why does increasing the sample size lower the (sampling) variance?
Standard deviations of averages are smaller than standard deviations of individual observations. [Here I will assume independent identically distributed
observations with finite population variance; s |
5,850 | Why does increasing the sample size lower the (sampling) variance? | The variability that's shrinking when N increases is the variability of the sample mean, often expressed as standard error. Or, in other terms, the certainty of the veracity of the sample mean is increasing.
Imagine you run an experiment where you collect 3 men and 3 women and measure their heights. How certain are yo... | Why does increasing the sample size lower the (sampling) variance? | The variability that's shrinking when N increases is the variability of the sample mean, often expressed as standard error. Or, in other terms, the certainty of the veracity of the sample mean is inc | Why does increasing the sample size lower the (sampling) variance?
The variability that's shrinking when N increases is the variability of the sample mean, often expressed as standard error. Or, in other terms, the certainty of the veracity of the sample mean is increasing.
Imagine you run an experiment where you coll... | Why does increasing the sample size lower the (sampling) variance?
The variability that's shrinking when N increases is the variability of the sample mean, often expressed as standard error. Or, in other terms, the certainty of the veracity of the sample mean is inc |
5,851 | Why does increasing the sample size lower the (sampling) variance? | If you wanted to know what is the average weight of american citizens, then in the ideal case you'd immediately ask every citizen to step on the scales, and collect the data. You'd get an exact answer. This is very difficult, so maybe you could get a few citizens to step on scale, compute the average and get an idea of... | Why does increasing the sample size lower the (sampling) variance? | If you wanted to know what is the average weight of american citizens, then in the ideal case you'd immediately ask every citizen to step on the scales, and collect the data. You'd get an exact answer | Why does increasing the sample size lower the (sampling) variance?
If you wanted to know what is the average weight of american citizens, then in the ideal case you'd immediately ask every citizen to step on the scales, and collect the data. You'd get an exact answer. This is very difficult, so maybe you could get a fe... | Why does increasing the sample size lower the (sampling) variance?
If you wanted to know what is the average weight of american citizens, then in the ideal case you'd immediately ask every citizen to step on the scales, and collect the data. You'd get an exact answer |
5,852 | Why does increasing the sample size lower the (sampling) variance? | I believe that the Law of Large Numbers explains why the variance (standard error) goes down when the sample size increases. Wikipedia's article on this says:
According to the law, the average of the results obtained from a large
number of trials should be close to the expected value, and will tend
to become clos... | Why does increasing the sample size lower the (sampling) variance? | I believe that the Law of Large Numbers explains why the variance (standard error) goes down when the sample size increases. Wikipedia's article on this says:
According to the law, the average of th | Why does increasing the sample size lower the (sampling) variance?
I believe that the Law of Large Numbers explains why the variance (standard error) goes down when the sample size increases. Wikipedia's article on this says:
According to the law, the average of the results obtained from a large
number of trials sh... | Why does increasing the sample size lower the (sampling) variance?
I believe that the Law of Large Numbers explains why the variance (standard error) goes down when the sample size increases. Wikipedia's article on this says:
According to the law, the average of th |
5,853 | Why does increasing the sample size lower the (sampling) variance? | As a sample size increases, sample variance (variation between observations) increases but the variance of the sample mean (standard error) decreases and hence precision increases. | Why does increasing the sample size lower the (sampling) variance? | As a sample size increases, sample variance (variation between observations) increases but the variance of the sample mean (standard error) decreases and hence precision increases. | Why does increasing the sample size lower the (sampling) variance?
As a sample size increases, sample variance (variation between observations) increases but the variance of the sample mean (standard error) decreases and hence precision increases. | Why does increasing the sample size lower the (sampling) variance?
As a sample size increases, sample variance (variation between observations) increases but the variance of the sample mean (standard error) decreases and hence precision increases. |
5,854 | Why does increasing the sample size lower the (sampling) variance? | First, I'd like to blow your mind: Increasing sample size does not decrease the variance of an estimate. What you call variance can, for example, stay essentially flat, even as $n$ goes to infinity. But let's come back to that.
We need to define terms. What you're referring to as "variance" is generally called standard... | Why does increasing the sample size lower the (sampling) variance? | First, I'd like to blow your mind: Increasing sample size does not decrease the variance of an estimate. What you call variance can, for example, stay essentially flat, even as $n$ goes to infinity. B | Why does increasing the sample size lower the (sampling) variance?
First, I'd like to blow your mind: Increasing sample size does not decrease the variance of an estimate. What you call variance can, for example, stay essentially flat, even as $n$ goes to infinity. But let's come back to that.
We need to define terms. ... | Why does increasing the sample size lower the (sampling) variance?
First, I'd like to blow your mind: Increasing sample size does not decrease the variance of an estimate. What you call variance can, for example, stay essentially flat, even as $n$ goes to infinity. B |
5,855 | How do I fit a constrained regression in R so that coefficients total = 1? | If I understand correctly, your model is
$$ Y = \pi_1 X_1 + \pi_2 X_2 + \pi_3 X_3 + \varepsilon, $$
with $\sum_k \pi_k = 1$ and $\pi_k\ge0$. You need to minimize
$$\sum_i \left(Y_i - (\pi_1 X_{i1} + \pi_2 X_{i2} + \pi_3 X_{i3}) \right)^2 $$
subject to these constraints. This kind of problem is known as quadratic progra... | How do I fit a constrained regression in R so that coefficients total = 1? | If I understand correctly, your model is
$$ Y = \pi_1 X_1 + \pi_2 X_2 + \pi_3 X_3 + \varepsilon, $$
with $\sum_k \pi_k = 1$ and $\pi_k\ge0$. You need to minimize
$$\sum_i \left(Y_i - (\pi_1 X_{i1} + \ | How do I fit a constrained regression in R so that coefficients total = 1?
If I understand correctly, your model is
$$ Y = \pi_1 X_1 + \pi_2 X_2 + \pi_3 X_3 + \varepsilon, $$
with $\sum_k \pi_k = 1$ and $\pi_k\ge0$. You need to minimize
$$\sum_i \left(Y_i - (\pi_1 X_{i1} + \pi_2 X_{i2} + \pi_3 X_{i3}) \right)^2 $$
subj... | How do I fit a constrained regression in R so that coefficients total = 1?
If I understand correctly, your model is
$$ Y = \pi_1 X_1 + \pi_2 X_2 + \pi_3 X_3 + \varepsilon, $$
with $\sum_k \pi_k = 1$ and $\pi_k\ge0$. You need to minimize
$$\sum_i \left(Y_i - (\pi_1 X_{i1} + \ |
5,856 | How do I fit a constrained regression in R so that coefficients total = 1? | As mentioned by whuber, if you are interested only in the equality constraints, you can also just use the standard lm() function by rewriting your model:
\begin{eqnarray}
Y&=&\alpha+\beta_1 X_1+\beta_2 X_2+\beta_3 X_3+\epsilon\\
&=& \alpha+\beta_1 X_1+\beta_2 X_2+(1-\beta_1-\beta_2) X_3+\epsilon\\
&=& \alpha + \beta_1(... | How do I fit a constrained regression in R so that coefficients total = 1? | As mentioned by whuber, if you are interested only in the equality constraints, you can also just use the standard lm() function by rewriting your model:
\begin{eqnarray}
Y&=&\alpha+\beta_1 X_1+\beta_ | How do I fit a constrained regression in R so that coefficients total = 1?
As mentioned by whuber, if you are interested only in the equality constraints, you can also just use the standard lm() function by rewriting your model:
\begin{eqnarray}
Y&=&\alpha+\beta_1 X_1+\beta_2 X_2+\beta_3 X_3+\epsilon\\
&=& \alpha+\beta... | How do I fit a constrained regression in R so that coefficients total = 1?
As mentioned by whuber, if you are interested only in the equality constraints, you can also just use the standard lm() function by rewriting your model:
\begin{eqnarray}
Y&=&\alpha+\beta_1 X_1+\beta_ |
5,857 | How do I fit a constrained regression in R so that coefficients total = 1? | Old question but since I'm facing the same problem I thought to post my 2p...
Use quadratic programming as suggested by @Elvis but using sqlincon from the pracma package. I think the advantage over quadrpog::solve.QP is a simpler user interface to specify the constraints. (In fact, lsqlincon is a wrapper around solve.Q... | How do I fit a constrained regression in R so that coefficients total = 1? | Old question but since I'm facing the same problem I thought to post my 2p...
Use quadratic programming as suggested by @Elvis but using sqlincon from the pracma package. I think the advantage over qu | How do I fit a constrained regression in R so that coefficients total = 1?
Old question but since I'm facing the same problem I thought to post my 2p...
Use quadratic programming as suggested by @Elvis but using sqlincon from the pracma package. I think the advantage over quadrpog::solve.QP is a simpler user interface ... | How do I fit a constrained regression in R so that coefficients total = 1?
Old question but since I'm facing the same problem I thought to post my 2p...
Use quadratic programming as suggested by @Elvis but using sqlincon from the pracma package. I think the advantage over qu |
5,858 | How do I fit a constrained regression in R so that coefficients total = 1? | As I understand your model, you're seeking to find
$$
\bar{\bar{x}} \cdot \bar{b} = \bar{y}
$$
such that
$$
\sum \left [ \begin{matrix} \bar{b} \end{matrix} \right ] =1
$$
I've found the easiest way to treat these sorts of problems is to use matrices' associative properties to treat $\bar{b}$ as a function of other ... | How do I fit a constrained regression in R so that coefficients total = 1? | As I understand your model, you're seeking to find
$$
\bar{\bar{x}} \cdot \bar{b} = \bar{y}
$$
such that
$$
\sum \left [ \begin{matrix} \bar{b} \end{matrix} \right ] =1
$$
I've found the easiest wa | How do I fit a constrained regression in R so that coefficients total = 1?
As I understand your model, you're seeking to find
$$
\bar{\bar{x}} \cdot \bar{b} = \bar{y}
$$
such that
$$
\sum \left [ \begin{matrix} \bar{b} \end{matrix} \right ] =1
$$
I've found the easiest way to treat these sorts of problems is to use ... | How do I fit a constrained regression in R so that coefficients total = 1?
As I understand your model, you're seeking to find
$$
\bar{\bar{x}} \cdot \bar{b} = \bar{y}
$$
such that
$$
\sum \left [ \begin{matrix} \bar{b} \end{matrix} \right ] =1
$$
I've found the easiest wa |
5,859 | How do I fit a constrained regression in R so that coefficients total = 1? | Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Using matrix algebra it is possible write following fo... | How do I fit a constrained regression in R so that coefficients total = 1? | Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
| How do I fit a constrained regression in R so that coefficients total = 1?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
... | How do I fit a constrained regression in R so that coefficients total = 1?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
|
5,860 | References for survival analysis | I like:
Survival Analysis: Techniques for Censored and Truncated Data (Klein & Moeschberger)
Modeling Survival Data: Extending the Cox Model (Therneau)
The first does a good job of straddling theory and model building issues. It's mostly focused on semi-parametric techniques, but there is reasonable coverage of para... | References for survival analysis | I like:
Survival Analysis: Techniques for Censored and Truncated Data (Klein & Moeschberger)
Modeling Survival Data: Extending the Cox Model (Therneau)
The first does a good job of straddling theory | References for survival analysis
I like:
Survival Analysis: Techniques for Censored and Truncated Data (Klein & Moeschberger)
Modeling Survival Data: Extending the Cox Model (Therneau)
The first does a good job of straddling theory and model building issues. It's mostly focused on semi-parametric techniques, but the... | References for survival analysis
I like:
Survival Analysis: Techniques for Censored and Truncated Data (Klein & Moeschberger)
Modeling Survival Data: Extending the Cox Model (Therneau)
The first does a good job of straddling theory |
5,861 | References for survival analysis | For a very clear, succinct and applied approach, I highly recommend Event History Modeling by Box-Steffenmeier and Jones | References for survival analysis | For a very clear, succinct and applied approach, I highly recommend Event History Modeling by Box-Steffenmeier and Jones | References for survival analysis
For a very clear, succinct and applied approach, I highly recommend Event History Modeling by Box-Steffenmeier and Jones | References for survival analysis
For a very clear, succinct and applied approach, I highly recommend Event History Modeling by Box-Steffenmeier and Jones |
5,862 | References for survival analysis | "Survival analysis using SAS: a practical guide" by Paul D. Allison provides a good guide to the connection between the math and SAS code - how to think about your information, how to code, how to interpret results. Even if you are using R, there will be parallels that could prove useful. | References for survival analysis | "Survival analysis using SAS: a practical guide" by Paul D. Allison provides a good guide to the connection between the math and SAS code - how to think about your information, how to code, how to int | References for survival analysis
"Survival analysis using SAS: a practical guide" by Paul D. Allison provides a good guide to the connection between the math and SAS code - how to think about your information, how to code, how to interpret results. Even if you are using R, there will be parallels that could prove usefu... | References for survival analysis
"Survival analysis using SAS: a practical guide" by Paul D. Allison provides a good guide to the connection between the math and SAS code - how to think about your information, how to code, how to int |
5,863 | References for survival analysis | David Collett. Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. 2003. ISBN 978-1584883258
Software section focuses on SAS not R though. | References for survival analysis | David Collett. Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. 2003. ISBN 978-1584883258
Software section focuses on SAS not R though. | References for survival analysis
David Collett. Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. 2003. ISBN 978-1584883258
Software section focuses on SAS not R though. | References for survival analysis
David Collett. Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. 2003. ISBN 978-1584883258
Software section focuses on SAS not R though. |
5,864 | References for survival analysis | Take a look at the course page for Sociology 761: Statistical Applications in Social Research. Professor John Fox at McMaster University has course notes on survival analysis as well as an example R script and several data files.
For another perspective, see Models for Quantifying Risk, 3/e, the standard textbook for ... | References for survival analysis | Take a look at the course page for Sociology 761: Statistical Applications in Social Research. Professor John Fox at McMaster University has course notes on survival analysis as well as an example R s | References for survival analysis
Take a look at the course page for Sociology 761: Statistical Applications in Social Research. Professor John Fox at McMaster University has course notes on survival analysis as well as an example R script and several data files.
For another perspective, see Models for Quantifying Risk... | References for survival analysis
Take a look at the course page for Sociology 761: Statistical Applications in Social Research. Professor John Fox at McMaster University has course notes on survival analysis as well as an example R s |
5,865 | References for survival analysis | I learned from Hosmer, Lemeshow & May "Applied Survival Analysis: Regression Modeling of Time-to-Event Data" (2nd ed., 2008), which covers the basics. It also helped that I found a really cheap copy... | References for survival analysis | I learned from Hosmer, Lemeshow & May "Applied Survival Analysis: Regression Modeling of Time-to-Event Data" (2nd ed., 2008), which covers the basics. It also helped that I found a really cheap copy.. | References for survival analysis
I learned from Hosmer, Lemeshow & May "Applied Survival Analysis: Regression Modeling of Time-to-Event Data" (2nd ed., 2008), which covers the basics. It also helped that I found a really cheap copy... | References for survival analysis
I learned from Hosmer, Lemeshow & May "Applied Survival Analysis: Regression Modeling of Time-to-Event Data" (2nd ed., 2008), which covers the basics. It also helped that I found a really cheap copy.. |
5,866 | References for survival analysis | Survival Analysis: A Self-Learning Text
by Kleinbaum and Klein
is pretty good. It depends on what you want. This is more of a non-technical introduction. It's focused on practical applications and minimizes the mathematics. Pedegocially, it's also intended for learning outside of the classroom. | References for survival analysis | Survival Analysis: A Self-Learning Text
by Kleinbaum and Klein
is pretty good. It depends on what you want. This is more of a non-technical introduction. It's focused on practical applications and | References for survival analysis
Survival Analysis: A Self-Learning Text
by Kleinbaum and Klein
is pretty good. It depends on what you want. This is more of a non-technical introduction. It's focused on practical applications and minimizes the mathematics. Pedegocially, it's also intended for learning outside of t... | References for survival analysis
Survival Analysis: A Self-Learning Text
by Kleinbaum and Klein
is pretty good. It depends on what you want. This is more of a non-technical introduction. It's focused on practical applications and |
5,867 | References for survival analysis | I found "Analysis of survival data" by Cox and Oakes (Chapman and Hall Monographs on Statistics and Applied Probability - vol. 21) to be very readable and informative. No material on survival analysis in R though. | References for survival analysis | I found "Analysis of survival data" by Cox and Oakes (Chapman and Hall Monographs on Statistics and Applied Probability - vol. 21) to be very readable and informative. No material on survival analysi | References for survival analysis
I found "Analysis of survival data" by Cox and Oakes (Chapman and Hall Monographs on Statistics and Applied Probability - vol. 21) to be very readable and informative. No material on survival analysis in R though. | References for survival analysis
I found "Analysis of survival data" by Cox and Oakes (Chapman and Hall Monographs on Statistics and Applied Probability - vol. 21) to be very readable and informative. No material on survival analysi |
5,868 | References for survival analysis | Dirk F. Moore
Applied Survival Analysis
Using R | References for survival analysis | Dirk F. Moore
Applied Survival Analysis
Using R | References for survival analysis
Dirk F. Moore
Applied Survival Analysis
Using R | References for survival analysis
Dirk F. Moore
Applied Survival Analysis
Using R |
5,869 | References for survival analysis | Sage pubs book, Introducing Survival and Event History Analysis by Melinda Mills, has been build for an R users' adience. | References for survival analysis | Sage pubs book, Introducing Survival and Event History Analysis by Melinda Mills, has been build for an R users' adience. | References for survival analysis
Sage pubs book, Introducing Survival and Event History Analysis by Melinda Mills, has been build for an R users' adience. | References for survival analysis
Sage pubs book, Introducing Survival and Event History Analysis by Melinda Mills, has been build for an R users' adience. |
5,870 | References for survival analysis | I'm surprised no one has mentioned it, but there is a book that exactly meets your specifications:
Tableman & Kim. Survival Analysis using S. Chapman & Hall/CRC. | References for survival analysis | I'm surprised no one has mentioned it, but there is a book that exactly meets your specifications:
Tableman & Kim. Survival Analysis using S. Chapman & Hall/CRC. | References for survival analysis
I'm surprised no one has mentioned it, but there is a book that exactly meets your specifications:
Tableman & Kim. Survival Analysis using S. Chapman & Hall/CRC. | References for survival analysis
I'm surprised no one has mentioned it, but there is a book that exactly meets your specifications:
Tableman & Kim. Survival Analysis using S. Chapman & Hall/CRC. |
5,871 | References for survival analysis | For survival analysis with R see Event History Analysis with R by Broström. With alot of R examples of survival analysis on historical demographic data. | References for survival analysis | For survival analysis with R see Event History Analysis with R by Broström. With alot of R examples of survival analysis on historical demographic data. | References for survival analysis
For survival analysis with R see Event History Analysis with R by Broström. With alot of R examples of survival analysis on historical demographic data. | References for survival analysis
For survival analysis with R see Event History Analysis with R by Broström. With alot of R examples of survival analysis on historical demographic data. |
5,872 | References for survival analysis | The book we used as a text book is called
Applied Survival Analysis by David W Hosmer
This book is from a biostat perspective and I found it was covered almost everything I used in my work. Also they have R/state/SAS code on their website according to their examples in the book. | References for survival analysis | The book we used as a text book is called
Applied Survival Analysis by David W Hosmer
This book is from a biostat perspective and I found it was covered almost everything I used in my work. Also they | References for survival analysis
The book we used as a text book is called
Applied Survival Analysis by David W Hosmer
This book is from a biostat perspective and I found it was covered almost everything I used in my work. Also they have R/state/SAS code on their website according to their examples in the book. | References for survival analysis
The book we used as a text book is called
Applied Survival Analysis by David W Hosmer
This book is from a biostat perspective and I found it was covered almost everything I used in my work. Also they |
5,873 | References for survival analysis | The book "Survival Analysis, Techniques for Censored and Truncated Data" written by Klein & Moeschberger (2003) is always the 1st reference I would recommend for the people who are interested in learning, practicing and studying survival analysis. This book not only provides comprehensive discussions to the problems we... | References for survival analysis | The book "Survival Analysis, Techniques for Censored and Truncated Data" written by Klein & Moeschberger (2003) is always the 1st reference I would recommend for the people who are interested in learn | References for survival analysis
The book "Survival Analysis, Techniques for Censored and Truncated Data" written by Klein & Moeschberger (2003) is always the 1st reference I would recommend for the people who are interested in learning, practicing and studying survival analysis. This book not only provides comprehensi... | References for survival analysis
The book "Survival Analysis, Techniques for Censored and Truncated Data" written by Klein & Moeschberger (2003) is always the 1st reference I would recommend for the people who are interested in learn |
5,874 | References for survival analysis | Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016). It is fairly terse, dry and technical but has only 200+ pages and contains some references to R packages and functions. The authors suggest in the preface that while most of the textbooks focus on continuous time, this one focuses on discrete time. An advanta... | References for survival analysis | Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016). It is fairly terse, dry and technical but has only 200+ pages and contains some references to R packages and functions. The authors suggest | References for survival analysis
Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016). It is fairly terse, dry and technical but has only 200+ pages and contains some references to R packages and functions. The authors suggest in the preface that while most of the textbooks focus on continuous time, this one foc... | References for survival analysis
Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016). It is fairly terse, dry and technical but has only 200+ pages and contains some references to R packages and functions. The authors suggest |
5,875 | Using LASSO from lars (or glmnet) package in R for variable selection | Using glmnet is really easy once you get the grasp of it thanks to its excellent vignette in http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html (you can also check the CRAN package page).
As for the best lambda for glmnet, the rule of thumb is to use
cvfit <- glmnet::cv.glmnet(x, y)
coef(cvfit, s = "lambda.1se")... | Using LASSO from lars (or glmnet) package in R for variable selection | Using glmnet is really easy once you get the grasp of it thanks to its excellent vignette in http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html (you can also check the CRAN package page).
As for | Using LASSO from lars (or glmnet) package in R for variable selection
Using glmnet is really easy once you get the grasp of it thanks to its excellent vignette in http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html (you can also check the CRAN package page).
As for the best lambda for glmnet, the rule of thumb is ... | Using LASSO from lars (or glmnet) package in R for variable selection
Using glmnet is really easy once you get the grasp of it thanks to its excellent vignette in http://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html (you can also check the CRAN package page).
As for |
5,876 | Using LASSO from lars (or glmnet) package in R for variable selection | I'm returning to this question from a while ago since I think I've solved the correct solution.
Here's a replica using the mtcars dataset:
library(glmnet)
`%ni%`<-Negate(`%in%')
data(mtcars)
x<-model.matrix(mpg~.,data=mtcars)
x=x[,-1]
glmnet1<-cv.glmnet(x=x,y=mtcars$mpg,type.measure='mse',nfolds=5,alpha=.5)
c<-coef(... | Using LASSO from lars (or glmnet) package in R for variable selection | I'm returning to this question from a while ago since I think I've solved the correct solution.
Here's a replica using the mtcars dataset:
library(glmnet)
`%ni%`<-Negate(`%in%')
data(mtcars)
x<-model | Using LASSO from lars (or glmnet) package in R for variable selection
I'm returning to this question from a while ago since I think I've solved the correct solution.
Here's a replica using the mtcars dataset:
library(glmnet)
`%ni%`<-Negate(`%in%')
data(mtcars)
x<-model.matrix(mpg~.,data=mtcars)
x=x[,-1]
glmnet1<-cv.g... | Using LASSO from lars (or glmnet) package in R for variable selection
I'm returning to this question from a while ago since I think I've solved the correct solution.
Here's a replica using the mtcars dataset:
library(glmnet)
`%ni%`<-Negate(`%in%')
data(mtcars)
x<-model |
5,877 | Using LASSO from lars (or glmnet) package in R for variable selection | Perhaps the comparison with forward selection stepwise regression will help (see the following link to a site by one of the authors http://www-stat.stanford.edu/~tibs/lasso/simple.html). This is the approach used in Chapter 3.4.4 of The Elements of Statistical Learning (available online for free). I thought that Chap... | Using LASSO from lars (or glmnet) package in R for variable selection | Perhaps the comparison with forward selection stepwise regression will help (see the following link to a site by one of the authors http://www-stat.stanford.edu/~tibs/lasso/simple.html). This is the | Using LASSO from lars (or glmnet) package in R for variable selection
Perhaps the comparison with forward selection stepwise regression will help (see the following link to a site by one of the authors http://www-stat.stanford.edu/~tibs/lasso/simple.html). This is the approach used in Chapter 3.4.4 of The Elements of ... | Using LASSO from lars (or glmnet) package in R for variable selection
Perhaps the comparison with forward selection stepwise regression will help (see the following link to a site by one of the authors http://www-stat.stanford.edu/~tibs/lasso/simple.html). This is the |
5,878 | Using LASSO from lars (or glmnet) package in R for variable selection | lars and glmnet operate on raw matrices. To includ interaction terms, you will have to construct the matrices yourself. That means one column per interaction (which is per level per factor if you have factors). Look into lm() to see how it does it (warning: there be dragons).
To do it right now, do something like:
To m... | Using LASSO from lars (or glmnet) package in R for variable selection | lars and glmnet operate on raw matrices. To includ interaction terms, you will have to construct the matrices yourself. That means one column per interaction (which is per level per factor if you have | Using LASSO from lars (or glmnet) package in R for variable selection
lars and glmnet operate on raw matrices. To includ interaction terms, you will have to construct the matrices yourself. That means one column per interaction (which is per level per factor if you have factors). Look into lm() to see how it does it (w... | Using LASSO from lars (or glmnet) package in R for variable selection
lars and glmnet operate on raw matrices. To includ interaction terms, you will have to construct the matrices yourself. That means one column per interaction (which is per level per factor if you have |
5,879 | Using LASSO from lars (or glmnet) package in R for variable selection | LARS solves the ENTIRE solution path. The solution path is piecewise linear -- there are a finite number of "notch" points (i.e., values of the regularization parameter) at which the solution changes.
So the matrix of solutions you're getting is all the possible solutions. In the list that it returns, it should also ... | Using LASSO from lars (or glmnet) package in R for variable selection | LARS solves the ENTIRE solution path. The solution path is piecewise linear -- there are a finite number of "notch" points (i.e., values of the regularization parameter) at which the solution changes | Using LASSO from lars (or glmnet) package in R for variable selection
LARS solves the ENTIRE solution path. The solution path is piecewise linear -- there are a finite number of "notch" points (i.e., values of the regularization parameter) at which the solution changes.
So the matrix of solutions you're getting is all... | Using LASSO from lars (or glmnet) package in R for variable selection
LARS solves the ENTIRE solution path. The solution path is piecewise linear -- there are a finite number of "notch" points (i.e., values of the regularization parameter) at which the solution changes |
5,880 | Intuition behind tensor product interactions in GAMs (MGCV package in R) | I'll (try to) answer this in three steps: first, let's identify exactly what we mean by a univariate smooth. Next, we will describe a multivariate smooth (specifically, a smooth of two variables). Finally, I'll make my best attempt at describing a tensor product smooth.
1) Univariate smooth
Let's say we have some respo... | Intuition behind tensor product interactions in GAMs (MGCV package in R) | I'll (try to) answer this in three steps: first, let's identify exactly what we mean by a univariate smooth. Next, we will describe a multivariate smooth (specifically, a smooth of two variables). Fin | Intuition behind tensor product interactions in GAMs (MGCV package in R)
I'll (try to) answer this in three steps: first, let's identify exactly what we mean by a univariate smooth. Next, we will describe a multivariate smooth (specifically, a smooth of two variables). Finally, I'll make my best attempt at describing a... | Intuition behind tensor product interactions in GAMs (MGCV package in R)
I'll (try to) answer this in three steps: first, let's identify exactly what we mean by a univariate smooth. Next, we will describe a multivariate smooth (specifically, a smooth of two variables). Fin |
5,881 | Reviewing statistics in papers [closed] | I am not sure about which area of science you are referring to (I'm sure the answer would be really different if dealing with biology vs physics for instance...)
Anyway, as a biologist, I will answer from a "biological" point of view:
How much effort should we put in to understand the application area?
I tend at leas... | Reviewing statistics in papers [closed] | I am not sure about which area of science you are referring to (I'm sure the answer would be really different if dealing with biology vs physics for instance...)
Anyway, as a biologist, I will answer | Reviewing statistics in papers [closed]
I am not sure about which area of science you are referring to (I'm sure the answer would be really different if dealing with biology vs physics for instance...)
Anyway, as a biologist, I will answer from a "biological" point of view:
How much effort should we put in to understa... | Reviewing statistics in papers [closed]
I am not sure about which area of science you are referring to (I'm sure the answer would be really different if dealing with biology vs physics for instance...)
Anyway, as a biologist, I will answer |
5,882 | Reviewing statistics in papers [closed] | This addresses the new question #6: "What's the maximum number of papers you would review in a year?" I'm responding as a member of several editorial boards. The perennial problem is finding enough reviewers. Depending on the journal, every submitted paper needs one to three peer reviewers, usually three. If the jo... | Reviewing statistics in papers [closed] | This addresses the new question #6: "What's the maximum number of papers you would review in a year?" I'm responding as a member of several editorial boards. The perennial problem is finding enough | Reviewing statistics in papers [closed]
This addresses the new question #6: "What's the maximum number of papers you would review in a year?" I'm responding as a member of several editorial boards. The perennial problem is finding enough reviewers. Depending on the journal, every submitted paper needs one to three p... | Reviewing statistics in papers [closed]
This addresses the new question #6: "What's the maximum number of papers you would review in a year?" I'm responding as a member of several editorial boards. The perennial problem is finding enough |
5,883 | Reviewing statistics in papers [closed] | My POV would be reviewing a paper in psychology or forecasting on its statistical merits. I'll mostly second Nico's very good remarks.
How much effort should we put in to
understand the application area?
Quite a lot, actually. I wouldn't trust myself to comment on more than the most basic statistical problems witho... | Reviewing statistics in papers [closed] | My POV would be reviewing a paper in psychology or forecasting on its statistical merits. I'll mostly second Nico's very good remarks.
How much effort should we put in to
understand the application | Reviewing statistics in papers [closed]
My POV would be reviewing a paper in psychology or forecasting on its statistical merits. I'll mostly second Nico's very good remarks.
How much effort should we put in to
understand the application area?
Quite a lot, actually. I wouldn't trust myself to comment on more than t... | Reviewing statistics in papers [closed]
My POV would be reviewing a paper in psychology or forecasting on its statistical merits. I'll mostly second Nico's very good remarks.
How much effort should we put in to
understand the application |
5,884 | What are the differences between hidden Markov models and neural networks? | What is hidden and what is observed
The thing that is hidden in a hidden Markov model is the same as the thing that is hidden in a discrete mixture model, so for clarity, forget about the hidden state's dynamics and stick with a finite mixture model as an example. The 'state' in this model is the identity of the compo... | What are the differences between hidden Markov models and neural networks? | What is hidden and what is observed
The thing that is hidden in a hidden Markov model is the same as the thing that is hidden in a discrete mixture model, so for clarity, forget about the hidden state | What are the differences between hidden Markov models and neural networks?
What is hidden and what is observed
The thing that is hidden in a hidden Markov model is the same as the thing that is hidden in a discrete mixture model, so for clarity, forget about the hidden state's dynamics and stick with a finite mixture m... | What are the differences between hidden Markov models and neural networks?
What is hidden and what is observed
The thing that is hidden in a hidden Markov model is the same as the thing that is hidden in a discrete mixture model, so for clarity, forget about the hidden state |
5,885 | What are the differences between hidden Markov models and neural networks? | Hidden Markov Models can be used to generate a language, that is, list elements from a family of strings. For example, if you have a HMM that models a set of sequences, you would be able to generate members of this family, by listing sequences that would be fall into the group of sequences we are modelling.
Neural Net... | What are the differences between hidden Markov models and neural networks? | Hidden Markov Models can be used to generate a language, that is, list elements from a family of strings. For example, if you have a HMM that models a set of sequences, you would be able to generate | What are the differences between hidden Markov models and neural networks?
Hidden Markov Models can be used to generate a language, that is, list elements from a family of strings. For example, if you have a HMM that models a set of sequences, you would be able to generate members of this family, by listing sequences ... | What are the differences between hidden Markov models and neural networks?
Hidden Markov Models can be used to generate a language, that is, list elements from a family of strings. For example, if you have a HMM that models a set of sequences, you would be able to generate |
5,886 | What are the differences between hidden Markov models and neural networks? | The best answer to this question from what I have found is this: Is deep learning a Markov chain in disguise. This is exactly what I understood, but since there was already a discussion elsewhere in the Internet, I am putting the link here.
Markov chains model:
$$p(x_1....x_n) = p(x_1)p(x_2 | x_1)p(x_3 | x_2) ...$$
RNN... | What are the differences between hidden Markov models and neural networks? | The best answer to this question from what I have found is this: Is deep learning a Markov chain in disguise. This is exactly what I understood, but since there was already a discussion elsewhere in t | What are the differences between hidden Markov models and neural networks?
The best answer to this question from what I have found is this: Is deep learning a Markov chain in disguise. This is exactly what I understood, but since there was already a discussion elsewhere in the Internet, I am putting the link here.
Mark... | What are the differences between hidden Markov models and neural networks?
The best answer to this question from what I have found is this: Is deep learning a Markov chain in disguise. This is exactly what I understood, but since there was already a discussion elsewhere in t |
5,887 | PCA and Correspondence analysis in their relation to Biplot | SVD
Singular-value decomposition is at the root of the three kindred techniques. Let $\bf X$ be $r \times c$ table of real values. SVD is $\bf X = U_{r\times r}S_{r\times c}V_{c\times c}'$. We may use just $m$ $[m \le\min(r,c)]$ first latent vectors and roots to obtain $\bf X_{(m)}$ as the best $m$-rank approximation o... | PCA and Correspondence analysis in their relation to Biplot | SVD
Singular-value decomposition is at the root of the three kindred techniques. Let $\bf X$ be $r \times c$ table of real values. SVD is $\bf X = U_{r\times r}S_{r\times c}V_{c\times c}'$. We may use | PCA and Correspondence analysis in their relation to Biplot
SVD
Singular-value decomposition is at the root of the three kindred techniques. Let $\bf X$ be $r \times c$ table of real values. SVD is $\bf X = U_{r\times r}S_{r\times c}V_{c\times c}'$. We may use just $m$ $[m \le\min(r,c)]$ first latent vectors and roots ... | PCA and Correspondence analysis in their relation to Biplot
SVD
Singular-value decomposition is at the root of the three kindred techniques. Let $\bf X$ be $r \times c$ table of real values. SVD is $\bf X = U_{r\times r}S_{r\times c}V_{c\times c}'$. We may use |
5,888 | Are pooling layers added before or after dropout layers? | Edit: As @Toke Faurby correctly pointed out, the default implementation in tensorflow actually uses an element-wise dropout. What I described earlier applies to a specific variant of dropout in CNNs, called spatial dropout:
In a CNN, each neuron produces one feature map. Since dropout spatial dropout works per-neuron, ... | Are pooling layers added before or after dropout layers? | Edit: As @Toke Faurby correctly pointed out, the default implementation in tensorflow actually uses an element-wise dropout. What I described earlier applies to a specific variant of dropout in CNNs, | Are pooling layers added before or after dropout layers?
Edit: As @Toke Faurby correctly pointed out, the default implementation in tensorflow actually uses an element-wise dropout. What I described earlier applies to a specific variant of dropout in CNNs, called spatial dropout:
In a CNN, each neuron produces one feat... | Are pooling layers added before or after dropout layers?
Edit: As @Toke Faurby correctly pointed out, the default implementation in tensorflow actually uses an element-wise dropout. What I described earlier applies to a specific variant of dropout in CNNs, |
5,889 | Are pooling layers added before or after dropout layers? | This tutorial uses pooling before dropout and gets good results.
That doesn't necessarily mean the other order doesn't work of course. My experience is limited, I've only used them on dense layers without pooling. | Are pooling layers added before or after dropout layers? | This tutorial uses pooling before dropout and gets good results.
That doesn't necessarily mean the other order doesn't work of course. My experience is limited, I've only used them on dense layers wit | Are pooling layers added before or after dropout layers?
This tutorial uses pooling before dropout and gets good results.
That doesn't necessarily mean the other order doesn't work of course. My experience is limited, I've only used them on dense layers without pooling. | Are pooling layers added before or after dropout layers?
This tutorial uses pooling before dropout and gets good results.
That doesn't necessarily mean the other order doesn't work of course. My experience is limited, I've only used them on dense layers wit |
5,890 | Are pooling layers added before or after dropout layers? | Example of VGG-like convnet from Keras (dropout used after pooling):
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.optimizers import SGD
# Generate dummy data
x_train = np.random.random((100,... | Are pooling layers added before or after dropout layers? | Example of VGG-like convnet from Keras (dropout used after pooling):
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.lay | Are pooling layers added before or after dropout layers?
Example of VGG-like convnet from Keras (dropout used after pooling):
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.optimizers import SG... | Are pooling layers added before or after dropout layers?
Example of VGG-like convnet from Keras (dropout used after pooling):
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.lay |
5,891 | How to set up neural network to output ordinal data? | I think the approach to only encode the ordinal labels as
class 1 is represented as [0 0 0 0 ...]
class 2 is represented as [1 0 0 0 ...]
class 3 is represented as [1 1 0 0 ...]
and use binary cross-entropy as the loss function is suboptimal. As mentioned in the comments, it might happen that the predicted vector ... | How to set up neural network to output ordinal data? | I think the approach to only encode the ordinal labels as
class 1 is represented as [0 0 0 0 ...]
class 2 is represented as [1 0 0 0 ...]
class 3 is represented as [1 1 0 0 ...]
and use binary cr | How to set up neural network to output ordinal data?
I think the approach to only encode the ordinal labels as
class 1 is represented as [0 0 0 0 ...]
class 2 is represented as [1 0 0 0 ...]
class 3 is represented as [1 1 0 0 ...]
and use binary cross-entropy as the loss function is suboptimal. As mentioned in the... | How to set up neural network to output ordinal data?
I think the approach to only encode the ordinal labels as
class 1 is represented as [0 0 0 0 ...]
class 2 is represented as [1 0 0 0 ...]
class 3 is represented as [1 1 0 0 ...]
and use binary cr |
5,892 | How to set up neural network to output ordinal data? | Update: Meanwhile, I delved more into the topic and even wrote a package implementing many ordinal losses from the literature. It includes the loss I mention here (ordinal encoding) but many others as well.
I believe what most people do is to simply treat ordinal classification as a generic multi-class classification. ... | How to set up neural network to output ordinal data? | Update: Meanwhile, I delved more into the topic and even wrote a package implementing many ordinal losses from the literature. It includes the loss I mention here (ordinal encoding) but many others as | How to set up neural network to output ordinal data?
Update: Meanwhile, I delved more into the topic and even wrote a package implementing many ordinal losses from the literature. It includes the loss I mention here (ordinal encoding) but many others as well.
I believe what most people do is to simply treat ordinal cla... | How to set up neural network to output ordinal data?
Update: Meanwhile, I delved more into the topic and even wrote a package implementing many ordinal losses from the literature. It includes the loss I mention here (ordinal encoding) but many others as |
5,893 | Are smaller p-values more convincing? | Are smaller $p$-values "more convincing"? Yes, of course they are.
In the Fisher framework, $p$-value is a quantification of the amount of evidence against the null hypothesis. The evidence can be more or less convincing; the smaller the $p$-value, the more convincing it is. Note that in any given experiment with fixed... | Are smaller p-values more convincing? | Are smaller $p$-values "more convincing"? Yes, of course they are.
In the Fisher framework, $p$-value is a quantification of the amount of evidence against the null hypothesis. The evidence can be mor | Are smaller p-values more convincing?
Are smaller $p$-values "more convincing"? Yes, of course they are.
In the Fisher framework, $p$-value is a quantification of the amount of evidence against the null hypothesis. The evidence can be more or less convincing; the smaller the $p$-value, the more convincing it is. Note t... | Are smaller p-values more convincing?
Are smaller $p$-values "more convincing"? Yes, of course they are.
In the Fisher framework, $p$-value is a quantification of the amount of evidence against the null hypothesis. The evidence can be mor |
5,894 | Are smaller p-values more convincing? | I don't know what's meant by smaller p-values being "better", or by us being "more confident in" them. But regarding p-values as a measure of how surprised we should be by the data, if we believed the null hypothesis, seems reasonable enough; the p-value is a monotonic function of the test statistic you've chosen to me... | Are smaller p-values more convincing? | I don't know what's meant by smaller p-values being "better", or by us being "more confident in" them. But regarding p-values as a measure of how surprised we should be by the data, if we believed the | Are smaller p-values more convincing?
I don't know what's meant by smaller p-values being "better", or by us being "more confident in" them. But regarding p-values as a measure of how surprised we should be by the data, if we believed the null hypothesis, seems reasonable enough; the p-value is a monotonic function of ... | Are smaller p-values more convincing?
I don't know what's meant by smaller p-values being "better", or by us being "more confident in" them. But regarding p-values as a measure of how surprised we should be by the data, if we believed the |
5,895 | Are smaller p-values more convincing? | Thank you for the comments and suggested readings. I've had some more time to ponder on this problem and I believe I've managed to isolate my main sources of confusion.
Initially I thought there was a dichotomy between viewing the p-value as a measure of surprise versus stating that it's not an absolute measure. Now I... | Are smaller p-values more convincing? | Thank you for the comments and suggested readings. I've had some more time to ponder on this problem and I believe I've managed to isolate my main sources of confusion.
Initially I thought there was | Are smaller p-values more convincing?
Thank you for the comments and suggested readings. I've had some more time to ponder on this problem and I believe I've managed to isolate my main sources of confusion.
Initially I thought there was a dichotomy between viewing the p-value as a measure of surprise versus stating th... | Are smaller p-values more convincing?
Thank you for the comments and suggested readings. I've had some more time to ponder on this problem and I believe I've managed to isolate my main sources of confusion.
Initially I thought there was |
5,896 | Are smaller p-values more convincing? | The p-value cannot be a measure of surprise because it is only a measure of probability when the null is true. If the null is true then each possible value of p is equally likely. One cannot be surprised at any p-value prior to deciding to reject the null. Once one decides there is an effect then the p-value's meaning ... | Are smaller p-values more convincing? | The p-value cannot be a measure of surprise because it is only a measure of probability when the null is true. If the null is true then each possible value of p is equally likely. One cannot be surpri | Are smaller p-values more convincing?
The p-value cannot be a measure of surprise because it is only a measure of probability when the null is true. If the null is true then each possible value of p is equally likely. One cannot be surprised at any p-value prior to deciding to reject the null. Once one decides there is... | Are smaller p-values more convincing?
The p-value cannot be a measure of surprise because it is only a measure of probability when the null is true. If the null is true then each possible value of p is equally likely. One cannot be surpri |
5,897 | Is standardisation before Lasso really necessary? | Lasso regression puts constraints on the size of the coefficients associated to each variable. However, this value will depend on the magnitude of each variable. It is therefore necessary to center and reduce, or standardize, the variables.
The result of centering the variables means that there is no longer an intercep... | Is standardisation before Lasso really necessary? | Lasso regression puts constraints on the size of the coefficients associated to each variable. However, this value will depend on the magnitude of each variable. It is therefore necessary to center an | Is standardisation before Lasso really necessary?
Lasso regression puts constraints on the size of the coefficients associated to each variable. However, this value will depend on the magnitude of each variable. It is therefore necessary to center and reduce, or standardize, the variables.
The result of centering the v... | Is standardisation before Lasso really necessary?
Lasso regression puts constraints on the size of the coefficients associated to each variable. However, this value will depend on the magnitude of each variable. It is therefore necessary to center an |
5,898 | Is standardisation before Lasso really necessary? | The L1 penalty parameter is a summation of absolute beta terms. If the variables are all of different dimensionality then this term is really not additive even though mathematically there isn't any error.
However, I don't see the dummy/ categorical variables suffering from this issue and think they need not be standard... | Is standardisation before Lasso really necessary? | The L1 penalty parameter is a summation of absolute beta terms. If the variables are all of different dimensionality then this term is really not additive even though mathematically there isn't any er | Is standardisation before Lasso really necessary?
The L1 penalty parameter is a summation of absolute beta terms. If the variables are all of different dimensionality then this term is really not additive even though mathematically there isn't any error.
However, I don't see the dummy/ categorical variables suffering f... | Is standardisation before Lasso really necessary?
The L1 penalty parameter is a summation of absolute beta terms. If the variables are all of different dimensionality then this term is really not additive even though mathematically there isn't any er |
5,899 | Is standardisation before Lasso really necessary? | If by standardize you mean transform all variables to z-scores (as is often the case), then you may want to consider that z-scoring a pre-scaled dataset may result in amplification of noise. That is--variables with low variance may have measurement noise amplified more so after applying z-scoring. | Is standardisation before Lasso really necessary? | If by standardize you mean transform all variables to z-scores (as is often the case), then you may want to consider that z-scoring a pre-scaled dataset may result in amplification of noise. That is-- | Is standardisation before Lasso really necessary?
If by standardize you mean transform all variables to z-scores (as is often the case), then you may want to consider that z-scoring a pre-scaled dataset may result in amplification of noise. That is--variables with low variance may have measurement noise amplified more ... | Is standardisation before Lasso really necessary?
If by standardize you mean transform all variables to z-scores (as is often the case), then you may want to consider that z-scoring a pre-scaled dataset may result in amplification of noise. That is-- |
5,900 | Compendium of cross-validation techniques | You can add to that list:
Repeated-cross validation
Leave-group-out cross-validation
Out-of-bag (for random forests and other bagged models)
The 632+ bootstrap
I don't really have a lot of advice as far as how to use these techniques or when to use them. You can use the caret package in R to compare CV, Boot, Boot6... | Compendium of cross-validation techniques | You can add to that list:
Repeated-cross validation
Leave-group-out cross-validation
Out-of-bag (for random forests and other bagged models)
The 632+ bootstrap
I don't really have a lot of advice a | Compendium of cross-validation techniques
You can add to that list:
Repeated-cross validation
Leave-group-out cross-validation
Out-of-bag (for random forests and other bagged models)
The 632+ bootstrap
I don't really have a lot of advice as far as how to use these techniques or when to use them. You can use the car... | Compendium of cross-validation techniques
You can add to that list:
Repeated-cross validation
Leave-group-out cross-validation
Out-of-bag (for random forests and other bagged models)
The 632+ bootstrap
I don't really have a lot of advice a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.