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 |
|---|---|---|---|---|---|---|
45,301 | Correlated variables in Cox model - which one is best | The usage of correlated predictors in a model is called colinearity, and is not something that you want. You need to use a dimensionality reduction approach.
The simplest way to avoid multicolinearity is to perform a principal component analysis (PCA) from the two correlated variables. If the correlation is high, as y... | Correlated variables in Cox model - which one is best | The usage of correlated predictors in a model is called colinearity, and is not something that you want. You need to use a dimensionality reduction approach.
The simplest way to avoid multicolinearit | Correlated variables in Cox model - which one is best
The usage of correlated predictors in a model is called colinearity, and is not something that you want. You need to use a dimensionality reduction approach.
The simplest way to avoid multicolinearity is to perform a principal component analysis (PCA) from the two ... | Correlated variables in Cox model - which one is best
The usage of correlated predictors in a model is called colinearity, and is not something that you want. You need to use a dimensionality reduction approach.
The simplest way to avoid multicolinearit |
45,302 | What do the subscripts in expectations mean in loss function | $J$ is a function respect to the parameter $\theta$. It is "cost function", where our ultimate goal is trying to reduce this the value function by using appropriate $\theta$. $\theta$ is also called "weights", "coefficients", "decision variables", where machine learning is finding the right value for $\theta$.
First Le... | What do the subscripts in expectations mean in loss function | $J$ is a function respect to the parameter $\theta$. It is "cost function", where our ultimate goal is trying to reduce this the value function by using appropriate $\theta$. $\theta$ is also called " | What do the subscripts in expectations mean in loss function
$J$ is a function respect to the parameter $\theta$. It is "cost function", where our ultimate goal is trying to reduce this the value function by using appropriate $\theta$. $\theta$ is also called "weights", "coefficients", "decision variables", where machi... | What do the subscripts in expectations mean in loss function
$J$ is a function respect to the parameter $\theta$. It is "cost function", where our ultimate goal is trying to reduce this the value function by using appropriate $\theta$. $\theta$ is also called " |
45,303 | What do the subscripts in expectations mean in loss function | It means that this is the distribution under which the expectation is taken.
More formally:
$$
\mathbb{E}_{x \sim q(x)}\big[~f(x)~\big] := \int q(x) f(x) dx.
$$
If clear from the context, the argument to the distribution is often omitted, i.e.
$\mathbb{E}_{x \sim q}[f(x)]$ | What do the subscripts in expectations mean in loss function | It means that this is the distribution under which the expectation is taken.
More formally:
$$
\mathbb{E}_{x \sim q(x)}\big[~f(x)~\big] := \int q(x) f(x) dx.
$$
If clear from the context, the argumen | What do the subscripts in expectations mean in loss function
It means that this is the distribution under which the expectation is taken.
More formally:
$$
\mathbb{E}_{x \sim q(x)}\big[~f(x)~\big] := \int q(x) f(x) dx.
$$
If clear from the context, the argument to the distribution is often omitted, i.e.
$\mathbb{E}_{... | What do the subscripts in expectations mean in loss function
It means that this is the distribution under which the expectation is taken.
More formally:
$$
\mathbb{E}_{x \sim q(x)}\big[~f(x)~\big] := \int q(x) f(x) dx.
$$
If clear from the context, the argumen |
45,304 | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)? | Wald confidence intervals: these assume that the sampling distribution of the parameters is multivariate Normal (a much weaker assumption than that the conditional distribution of the residuals is Normal). They are relatively easily to compute (for the fixed-effects parameters) by extracting the parameter values (fixef... | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)? | Wald confidence intervals: these assume that the sampling distribution of the parameters is multivariate Normal (a much weaker assumption than that the conditional distribution of the residuals is Nor | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)?
Wald confidence intervals: these assume that the sampling distribution of the parameters is multivariate Normal (a much weaker assumption than that the conditional distribution of the residuals is Normal). They are relati... | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)?
Wald confidence intervals: these assume that the sampling distribution of the parameters is multivariate Normal (a much weaker assumption than that the conditional distribution of the residuals is Nor |
45,305 | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)? | It is also now possible to obtain confidence intervals of rlmerMod objects using the effects package.
Example:
library(robustlmm)
library(effects)
r <- rlmer(Reaction ~ Days + (1|Subject), sleepstudy)
as.data.frame(effect("Days",r))
### Days fit se lower upper
### 0 252.4270 8.597854 235.460... | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)? | It is also now possible to obtain confidence intervals of rlmerMod objects using the effects package.
Example:
library(robustlmm)
library(effects)
r <- rlmer(Reaction ~ Days + (1|Subject), sleepstu | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)?
It is also now possible to obtain confidence intervals of rlmerMod objects using the effects package.
Example:
library(robustlmm)
library(effects)
r <- rlmer(Reaction ~ Days + (1|Subject), sleepstudy)
as.data.frame(eff... | How can I get confidence intervals for fixed effects using the rlmer function (robustlmm package)?
It is also now possible to obtain confidence intervals of rlmerMod objects using the effects package.
Example:
library(robustlmm)
library(effects)
r <- rlmer(Reaction ~ Days + (1|Subject), sleepstu |
45,306 | Why is a GLM's residual deviance minus twice its log likelihood? | It's not just with the logistic; it's true of the deviance more generally in GLMs.
Indeed the idea of taking twice the log of a likelihood ratio arises because of Wilks' theorem relating to likelihood ratio tests, which tells us that $-2\log(\Lambda)$ for a pair of nested models has (asymptotically) a chi-square distri... | Why is a GLM's residual deviance minus twice its log likelihood? | It's not just with the logistic; it's true of the deviance more generally in GLMs.
Indeed the idea of taking twice the log of a likelihood ratio arises because of Wilks' theorem relating to likelihood | Why is a GLM's residual deviance minus twice its log likelihood?
It's not just with the logistic; it's true of the deviance more generally in GLMs.
Indeed the idea of taking twice the log of a likelihood ratio arises because of Wilks' theorem relating to likelihood ratio tests, which tells us that $-2\log(\Lambda)$ for... | Why is a GLM's residual deviance minus twice its log likelihood?
It's not just with the logistic; it's true of the deviance more generally in GLMs.
Indeed the idea of taking twice the log of a likelihood ratio arises because of Wilks' theorem relating to likelihood |
45,307 | Computing p-value in a problem about people going to a show with certain probability | This question has a unique answer: anything else will only be an approximation or will be based on an inferior hypothesis test. The p-value is $682/969 \approx 70.4\%$. Its calculation is based on sampling without replacement from a population of $20$. The rest of this post provides the reasoning, which relies only ... | Computing p-value in a problem about people going to a show with certain probability | This question has a unique answer: anything else will only be an approximation or will be based on an inferior hypothesis test. The p-value is $682/969 \approx 70.4\%$. Its calculation is based on s | Computing p-value in a problem about people going to a show with certain probability
This question has a unique answer: anything else will only be an approximation or will be based on an inferior hypothesis test. The p-value is $682/969 \approx 70.4\%$. Its calculation is based on sampling without replacement from a ... | Computing p-value in a problem about people going to a show with certain probability
This question has a unique answer: anything else will only be an approximation or will be based on an inferior hypothesis test. The p-value is $682/969 \approx 70.4\%$. Its calculation is based on s |
45,308 | Computing p-value in a problem about people going to a show with certain probability | I think this homework question is a bit unclear.
The experiment seems to be handing out the flyer to a population of $20$ people. You want to know what is the probability that $5$ to $20$ people attend as a result. Usually, experiments involve a control group that gets a placebo, but perhaps this is a new band that no... | Computing p-value in a problem about people going to a show with certain probability | I think this homework question is a bit unclear.
The experiment seems to be handing out the flyer to a population of $20$ people. You want to know what is the probability that $5$ to $20$ people atte | Computing p-value in a problem about people going to a show with certain probability
I think this homework question is a bit unclear.
The experiment seems to be handing out the flyer to a population of $20$ people. You want to know what is the probability that $5$ to $20$ people attend as a result. Usually, experiment... | Computing p-value in a problem about people going to a show with certain probability
I think this homework question is a bit unclear.
The experiment seems to be handing out the flyer to a population of $20$ people. You want to know what is the probability that $5$ to $20$ people atte |
45,309 | Random forest and LASSO regression both give different variable importances | Before going deeper into the comparison make sure that each of the two methods agrees with itself. You can find this out by bootstrapping the entire variable importance process a few times. Plot the original variable importance for each variable vs. the importance estimated from a bootstrap sample.
The bootstrap invol... | Random forest and LASSO regression both give different variable importances | Before going deeper into the comparison make sure that each of the two methods agrees with itself. You can find this out by bootstrapping the entire variable importance process a few times. Plot the | Random forest and LASSO regression both give different variable importances
Before going deeper into the comparison make sure that each of the two methods agrees with itself. You can find this out by bootstrapping the entire variable importance process a few times. Plot the original variable importance for each variab... | Random forest and LASSO regression both give different variable importances
Before going deeper into the comparison make sure that each of the two methods agrees with itself. You can find this out by bootstrapping the entire variable importance process a few times. Plot the |
45,310 | Random forest and LASSO regression both give different variable importances | No free lunch. You can't really know it beforehand. Unless you have strong reasons to favor one over the other1 you would have to test both solutions to make a proper choice.
1. Say, you really want a linear model and would feel fine with the implications of choosing that over another possible solution that could be a... | Random forest and LASSO regression both give different variable importances | No free lunch. You can't really know it beforehand. Unless you have strong reasons to favor one over the other1 you would have to test both solutions to make a proper choice.
1. Say, you really want | Random forest and LASSO regression both give different variable importances
No free lunch. You can't really know it beforehand. Unless you have strong reasons to favor one over the other1 you would have to test both solutions to make a proper choice.
1. Say, you really want a linear model and would feel fine with the ... | Random forest and LASSO regression both give different variable importances
No free lunch. You can't really know it beforehand. Unless you have strong reasons to favor one over the other1 you would have to test both solutions to make a proper choice.
1. Say, you really want |
45,311 | Probability that exactly y of n rolls of an r-sided die are unique | There is an efficient, simple, $O(n)$ solution.
In expanding the polynomial
$$f_{n,r} = \left(x_1+x_2+\cdots+x_r\right)^n = \sum_{i_1,i_2,\ldots,i_r} \binom{n}{i_1,i_2,\ldots,i_r} x_1^{i_1}x_2^{i_2}\cdots x_r^{i_r},$$
for each of the $\binom{r}{y}$ subsets of $y$ of the variables there will be a term like this one
$$\b... | Probability that exactly y of n rolls of an r-sided die are unique | There is an efficient, simple, $O(n)$ solution.
In expanding the polynomial
$$f_{n,r} = \left(x_1+x_2+\cdots+x_r\right)^n = \sum_{i_1,i_2,\ldots,i_r} \binom{n}{i_1,i_2,\ldots,i_r} x_1^{i_1}x_2^{i_2}\c | Probability that exactly y of n rolls of an r-sided die are unique
There is an efficient, simple, $O(n)$ solution.
In expanding the polynomial
$$f_{n,r} = \left(x_1+x_2+\cdots+x_r\right)^n = \sum_{i_1,i_2,\ldots,i_r} \binom{n}{i_1,i_2,\ldots,i_r} x_1^{i_1}x_2^{i_2}\cdots x_r^{i_r},$$
for each of the $\binom{r}{y}$ subs... | Probability that exactly y of n rolls of an r-sided die are unique
There is an efficient, simple, $O(n)$ solution.
In expanding the polynomial
$$f_{n,r} = \left(x_1+x_2+\cdots+x_r\right)^n = \sum_{i_1,i_2,\ldots,i_r} \binom{n}{i_1,i_2,\ldots,i_r} x_1^{i_1}x_2^{i_2}\c |
45,312 | Probability that exactly y of n rolls of an r-sided die are unique | Define $F(n, k)$ to be the number of ways to allocate $k$ options to $n$ flips such that each option appears either 0 or $\geq 2$ times. Then the probability that you see exactly $y$ unique values when you roll a $k$-sided dice $n$ times is:
$$
Pr(Y=y) = \frac{{k\choose y}{n\choose y}y!F(n-y, k-y)}{k^n}
$$
Basically, t... | Probability that exactly y of n rolls of an r-sided die are unique | Define $F(n, k)$ to be the number of ways to allocate $k$ options to $n$ flips such that each option appears either 0 or $\geq 2$ times. Then the probability that you see exactly $y$ unique values whe | Probability that exactly y of n rolls of an r-sided die are unique
Define $F(n, k)$ to be the number of ways to allocate $k$ options to $n$ flips such that each option appears either 0 or $\geq 2$ times. Then the probability that you see exactly $y$ unique values when you roll a $k$-sided dice $n$ times is:
$$
Pr(Y=y) ... | Probability that exactly y of n rolls of an r-sided die are unique
Define $F(n, k)$ to be the number of ways to allocate $k$ options to $n$ flips such that each option appears either 0 or $\geq 2$ times. Then the probability that you see exactly $y$ unique values whe |
45,313 | Probability that exactly y of n rolls of an r-sided die are unique | This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multinomial:
$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$
where $a_i$ represents the number of times $i$ is rolled, and $a_1+\cdots+a_r=n$. Then th... | Probability that exactly y of n rolls of an r-sided die are unique | This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multinomial:
$$\binom{n} | Probability that exactly y of n rolls of an r-sided die are unique
This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multinomial:
$$\binom{n}{a_1,a_2,\cdots,a_r}(1/r)^n,$$
where $a_i$ represents... | Probability that exactly y of n rolls of an r-sided die are unique
This is basically a generalized coupon-collector problem. I don't think you're going to find an easy closed form solution to it. In general, the distribution of dice throws is multinomial:
$$\binom{n} |
45,314 | Second Moment of Beta distribution | I guess you mean the right thing that the first moment does not allow you to apply the method-of-moments strategy of equating a population moment to a function of the parameter you aim to estimate, as the moment condition does not identify the parameter here.
This is intuitive in case of the mean when the parameters o... | Second Moment of Beta distribution | I guess you mean the right thing that the first moment does not allow you to apply the method-of-moments strategy of equating a population moment to a function of the parameter you aim to estimate, as | Second Moment of Beta distribution
I guess you mean the right thing that the first moment does not allow you to apply the method-of-moments strategy of equating a population moment to a function of the parameter you aim to estimate, as the moment condition does not identify the parameter here.
This is intuitive in cas... | Second Moment of Beta distribution
I guess you mean the right thing that the first moment does not allow you to apply the method-of-moments strategy of equating a population moment to a function of the parameter you aim to estimate, as |
45,315 | Second Moment of Beta distribution | Your approach (i.e. the logic by which you decided to look at the second moment) looks right.
Your algebra also looks right.
It's not necessary to calculate any further moments to estimate $\alpha$ but once you have an estimator it is generally of interest to compute its variance (and if possible, the sampling distribu... | Second Moment of Beta distribution | Your approach (i.e. the logic by which you decided to look at the second moment) looks right.
Your algebra also looks right.
It's not necessary to calculate any further moments to estimate $\alpha$ bu | Second Moment of Beta distribution
Your approach (i.e. the logic by which you decided to look at the second moment) looks right.
Your algebra also looks right.
It's not necessary to calculate any further moments to estimate $\alpha$ but once you have an estimator it is generally of interest to compute its variance (and... | Second Moment of Beta distribution
Your approach (i.e. the logic by which you decided to look at the second moment) looks right.
Your algebra also looks right.
It's not necessary to calculate any further moments to estimate $\alpha$ bu |
45,316 | How to choose appropriate bandwidth for kernel regression? | I would recommend you to read this beautiful article by Racine and Li published in the Journal of Econometrics in 2004. They develop a framework to estimate regression functions nonparametrically using kernel methods, with mixed types of covariates (categorical or continuous regressors). Among other results, they show ... | How to choose appropriate bandwidth for kernel regression? | I would recommend you to read this beautiful article by Racine and Li published in the Journal of Econometrics in 2004. They develop a framework to estimate regression functions nonparametrically usin | How to choose appropriate bandwidth for kernel regression?
I would recommend you to read this beautiful article by Racine and Li published in the Journal of Econometrics in 2004. They develop a framework to estimate regression functions nonparametrically using kernel methods, with mixed types of covariates (categorical... | How to choose appropriate bandwidth for kernel regression?
I would recommend you to read this beautiful article by Racine and Li published in the Journal of Econometrics in 2004. They develop a framework to estimate regression functions nonparametrically usin |
45,317 | How to choose appropriate bandwidth for kernel regression? | Here is what I could find in study notes from my econometrics class:
Average squared error (ASE) is given as:
$$ASE = \frac{1}{n} \sum_{j=1}^n[\widehat{m}_h(X_j)-{m}_h(X_j)]^2 w(X_j)$$
where $\widehat{m}_h(X_j)$ is the fitted value from the kernel regression, $w(x)= \sum_{i=1}^n \frac{K(\frac{x-X_i}{h})}{\sum_{j=1}^nK(... | How to choose appropriate bandwidth for kernel regression? | Here is what I could find in study notes from my econometrics class:
Average squared error (ASE) is given as:
$$ASE = \frac{1}{n} \sum_{j=1}^n[\widehat{m}_h(X_j)-{m}_h(X_j)]^2 w(X_j)$$
where $\widehat | How to choose appropriate bandwidth for kernel regression?
Here is what I could find in study notes from my econometrics class:
Average squared error (ASE) is given as:
$$ASE = \frac{1}{n} \sum_{j=1}^n[\widehat{m}_h(X_j)-{m}_h(X_j)]^2 w(X_j)$$
where $\widehat{m}_h(X_j)$ is the fitted value from the kernel regression, $... | How to choose appropriate bandwidth for kernel regression?
Here is what I could find in study notes from my econometrics class:
Average squared error (ASE) is given as:
$$ASE = \frac{1}{n} \sum_{j=1}^n[\widehat{m}_h(X_j)-{m}_h(X_j)]^2 w(X_j)$$
where $\widehat |
45,318 | Standard deviation for weighted sum of normal distributions | (I am assuming $H_1$ and $H_0$ are independent)
Let $f_H = pf_1(x) + (1-p)f_0(x)$, where $f_1$ and $f_0$ are pdfs of $H_1$ and $H_0$. Then the random variable $H$ is the mixture of two normal distributions. For the mean of $H$
$$E(H) = \int x\left(pf_1(x) + (1-p)f_0(x) \right) dx = p\mu_1 + (1-p)\mu_0. $$
Similarly for... | Standard deviation for weighted sum of normal distributions | (I am assuming $H_1$ and $H_0$ are independent)
Let $f_H = pf_1(x) + (1-p)f_0(x)$, where $f_1$ and $f_0$ are pdfs of $H_1$ and $H_0$. Then the random variable $H$ is the mixture of two normal distribu | Standard deviation for weighted sum of normal distributions
(I am assuming $H_1$ and $H_0$ are independent)
Let $f_H = pf_1(x) + (1-p)f_0(x)$, where $f_1$ and $f_0$ are pdfs of $H_1$ and $H_0$. Then the random variable $H$ is the mixture of two normal distributions. For the mean of $H$
$$E(H) = \int x\left(pf_1(x) + (1... | Standard deviation for weighted sum of normal distributions
(I am assuming $H_1$ and $H_0$ are independent)
Let $f_H = pf_1(x) + (1-p)f_0(x)$, where $f_1$ and $f_0$ are pdfs of $H_1$ and $H_0$. Then the random variable $H$ is the mixture of two normal distribu |
45,319 | Standard deviation for weighted sum of normal distributions | Let $Z$ denote a Bernoulli random variable with parameter $p$. Then, the random variable $H$ can be thought of as having conditional density
$N(\mu_i, \sigma_i^2)$ according as $Z$ equals $i$, $i=0,1$, and thus
unconditional density
$$f_H(x) = pf_{H_1}(x) + (1-p)f_{H_0}(x).$$
The unconditional mean is thus the weighted... | Standard deviation for weighted sum of normal distributions | Let $Z$ denote a Bernoulli random variable with parameter $p$. Then, the random variable $H$ can be thought of as having conditional density
$N(\mu_i, \sigma_i^2)$ according as $Z$ equals $i$, $i=0,1$ | Standard deviation for weighted sum of normal distributions
Let $Z$ denote a Bernoulli random variable with parameter $p$. Then, the random variable $H$ can be thought of as having conditional density
$N(\mu_i, \sigma_i^2)$ according as $Z$ equals $i$, $i=0,1$, and thus
unconditional density
$$f_H(x) = pf_{H_1}(x) + (1... | Standard deviation for weighted sum of normal distributions
Let $Z$ denote a Bernoulli random variable with parameter $p$. Then, the random variable $H$ can be thought of as having conditional density
$N(\mu_i, \sigma_i^2)$ according as $Z$ equals $i$, $i=0,1$ |
45,320 | Why aren't the diagonal counts used in McNemar's test? | The tag info for McNemar's test (once supplied by me, and later possibly modified):
A repeated-measures test for categorical data. Given that two
variables with the same 2 categories (McNemar test) or k categories
(McNemar-Bowker test) form a square contingency table, the test's
question is whether population pr... | Why aren't the diagonal counts used in McNemar's test? | The tag info for McNemar's test (once supplied by me, and later possibly modified):
A repeated-measures test for categorical data. Given that two
variables with the same 2 categories (McNemar test) | Why aren't the diagonal counts used in McNemar's test?
The tag info for McNemar's test (once supplied by me, and later possibly modified):
A repeated-measures test for categorical data. Given that two
variables with the same 2 categories (McNemar test) or k categories
(McNemar-Bowker test) form a square contingenc... | Why aren't the diagonal counts used in McNemar's test?
The tag info for McNemar's test (once supplied by me, and later possibly modified):
A repeated-measures test for categorical data. Given that two
variables with the same 2 categories (McNemar test) |
45,321 | Why aren't the diagonal counts used in McNemar's test? | Intuitively, since "Cell $a$" is in the first row and first column, including $a$ in your test wouldn't help to assess the difference between the row marginal and the column marginal. If your row is $a+b$ and your column is $a+c$, to test if $a+b=a+c$, you only need to test $b=c$. Including $a$ is irrelevant to the e... | Why aren't the diagonal counts used in McNemar's test? | Intuitively, since "Cell $a$" is in the first row and first column, including $a$ in your test wouldn't help to assess the difference between the row marginal and the column marginal. If your row is | Why aren't the diagonal counts used in McNemar's test?
Intuitively, since "Cell $a$" is in the first row and first column, including $a$ in your test wouldn't help to assess the difference between the row marginal and the column marginal. If your row is $a+b$ and your column is $a+c$, to test if $a+b=a+c$, you only ne... | Why aren't the diagonal counts used in McNemar's test?
Intuitively, since "Cell $a$" is in the first row and first column, including $a$ in your test wouldn't help to assess the difference between the row marginal and the column marginal. If your row is |
45,322 | Why aren't the diagonal counts used in McNemar's test? | Your intuition is reasonable, but incorrect. (As you note, that state of affairs is very common in probability and statistics.)
Statistical significance vs. effect size / practical significance
You state:
The difference in number of misclassifications between A and B seems large in table #1, but small in table #2. Th... | Why aren't the diagonal counts used in McNemar's test? | Your intuition is reasonable, but incorrect. (As you note, that state of affairs is very common in probability and statistics.)
Statistical significance vs. effect size / practical significance
You s | Why aren't the diagonal counts used in McNemar's test?
Your intuition is reasonable, but incorrect. (As you note, that state of affairs is very common in probability and statistics.)
Statistical significance vs. effect size / practical significance
You state:
The difference in number of misclassifications between A a... | Why aren't the diagonal counts used in McNemar's test?
Your intuition is reasonable, but incorrect. (As you note, that state of affairs is very common in probability and statistics.)
Statistical significance vs. effect size / practical significance
You s |
45,323 | Check for significant difference between numbers of sightings per cardinal direction | First off, methods such as ANOVA and Kruskal-Wallis pay no attention to the circular nature of data such as yours. It's not clear how you imagine applying either, but if you intend to regard direction as a categorical predictor, you would be ignoring any structure to the measurement scale other than the directions bein... | Check for significant difference between numbers of sightings per cardinal direction | First off, methods such as ANOVA and Kruskal-Wallis pay no attention to the circular nature of data such as yours. It's not clear how you imagine applying either, but if you intend to regard direction | Check for significant difference between numbers of sightings per cardinal direction
First off, methods such as ANOVA and Kruskal-Wallis pay no attention to the circular nature of data such as yours. It's not clear how you imagine applying either, but if you intend to regard direction as a categorical predictor, you wo... | Check for significant difference between numbers of sightings per cardinal direction
First off, methods such as ANOVA and Kruskal-Wallis pay no attention to the circular nature of data such as yours. It's not clear how you imagine applying either, but if you intend to regard direction |
45,324 | ARMA (1,1) Variance Calculation | It is better to write your model like this:
$$r_t=\alpha + \phi_1 r_{t-1} + \theta_1 a_{t-1} + a_{t}$$
where, {$a_t$} is white noise series.
First, multiply the model by $a_t$ and take expectation:
\begin{align}
E(r_t a_t)&=\alpha E(a_t)+ \phi_1 E(r_{t-1}a_t)+\theta_1 E(a_{t-1}a_t)+ E(a_t^2)\\
&=E(a_t^2)=\sigma^2
\en... | ARMA (1,1) Variance Calculation | It is better to write your model like this:
$$r_t=\alpha + \phi_1 r_{t-1} + \theta_1 a_{t-1} + a_{t}$$
where, {$a_t$} is white noise series.
First, multiply the model by $a_t$ and take expectation:
| ARMA (1,1) Variance Calculation
It is better to write your model like this:
$$r_t=\alpha + \phi_1 r_{t-1} + \theta_1 a_{t-1} + a_{t}$$
where, {$a_t$} is white noise series.
First, multiply the model by $a_t$ and take expectation:
\begin{align}
E(r_t a_t)&=\alpha E(a_t)+ \phi_1 E(r_{t-1}a_t)+\theta_1 E(a_{t-1}a_t)+ E(... | ARMA (1,1) Variance Calculation
It is better to write your model like this:
$$r_t=\alpha + \phi_1 r_{t-1} + \theta_1 a_{t-1} + a_{t}$$
where, {$a_t$} is white noise series.
First, multiply the model by $a_t$ and take expectation:
|
45,325 | Dimension reduction using PCA in Matlab | If you type help pca you will see loads of information about the function.
If you only output one argument, it will return the principal coefficients, sometimes called the loadings. The $27578\times151$ matrix you received contains the first loading in the first row, the second in the second row and so on.
If you ask f... | Dimension reduction using PCA in Matlab | If you type help pca you will see loads of information about the function.
If you only output one argument, it will return the principal coefficients, sometimes called the loadings. The $27578\times15 | Dimension reduction using PCA in Matlab
If you type help pca you will see loads of information about the function.
If you only output one argument, it will return the principal coefficients, sometimes called the loadings. The $27578\times151$ matrix you received contains the first loading in the first row, the second i... | Dimension reduction using PCA in Matlab
If you type help pca you will see loads of information about the function.
If you only output one argument, it will return the principal coefficients, sometimes called the loadings. The $27578\times15 |
45,326 | Dimension reduction using PCA in Matlab | The output of PCA is a matrix of your principle components. So, this matrix contains a set of new signals but now these components are ordered in terms of how much of the datasets variance they capture. The first principle component in the matrix coeff(1,:) describes the most variance to the last component coeff(27578,... | Dimension reduction using PCA in Matlab | The output of PCA is a matrix of your principle components. So, this matrix contains a set of new signals but now these components are ordered in terms of how much of the datasets variance they captur | Dimension reduction using PCA in Matlab
The output of PCA is a matrix of your principle components. So, this matrix contains a set of new signals but now these components are ordered in terms of how much of the datasets variance they capture. The first principle component in the matrix coeff(1,:) describes the most var... | Dimension reduction using PCA in Matlab
The output of PCA is a matrix of your principle components. So, this matrix contains a set of new signals but now these components are ordered in terms of how much of the datasets variance they captur |
45,327 | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem | If $\epsilon$ is a constant, then this has linear regret. Suppose that the initial estimate is perfect. Then you pull the `best' arm with probability $1-\epsilon$ and pull an imperfect arm with probability $\epsilon$, giving expected regret $\epsilon T = \Theta(T)$.
However the parameter $\epsilon$ is typically set to... | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem | If $\epsilon$ is a constant, then this has linear regret. Suppose that the initial estimate is perfect. Then you pull the `best' arm with probability $1-\epsilon$ and pull an imperfect arm with probab | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem
If $\epsilon$ is a constant, then this has linear regret. Suppose that the initial estimate is perfect. Then you pull the `best' arm with probability $1-\epsilon$ and pull an imperfect arm with probability $\epsilon$, giving expected regret $\epsi... | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem
If $\epsilon$ is a constant, then this has linear regret. Suppose that the initial estimate is perfect. Then you pull the `best' arm with probability $1-\epsilon$ and pull an imperfect arm with probab |
45,328 | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem | So this is what I think about this problem:
At each time step $T$, the $ϵ$-greedy algorithm selects between optimal arm $a_k$ with probability $1-ϵ$, and all non-optimal arms $a_i,1≤i≤K∧i≠k$ with probability $ϵ$, where $K$ is the total number of arms, and $k = arg max_{ 1 \leq i\leq K }\hat\mu_i$ , where $μ ̂_i$ is th... | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem | So this is what I think about this problem:
At each time step $T$, the $ϵ$-greedy algorithm selects between optimal arm $a_k$ with probability $1-ϵ$, and all non-optimal arms $a_i,1≤i≤K∧i≠k$ with prob | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem
So this is what I think about this problem:
At each time step $T$, the $ϵ$-greedy algorithm selects between optimal arm $a_k$ with probability $1-ϵ$, and all non-optimal arms $a_i,1≤i≤K∧i≠k$ with probability $ϵ$, where $K$ is the total number of a... | Linear Regret for epsilon-greedy algorithm in Multi-Armed Bandit problem
So this is what I think about this problem:
At each time step $T$, the $ϵ$-greedy algorithm selects between optimal arm $a_k$ with probability $1-ϵ$, and all non-optimal arms $a_i,1≤i≤K∧i≠k$ with prob |
45,329 | Ensemble classifier methods: should we use the class probabilties or the classification itself in stacking models? | What you're asking is the difference between voting (using classifications) and averaging (using probabilities), and as far as things go, it's up to preference and/or performance. Try both and see what works best, and if there is not a significant difference, pick one that you feel better about.
I'll try to explain the... | Ensemble classifier methods: should we use the class probabilties or the classification itself in st | What you're asking is the difference between voting (using classifications) and averaging (using probabilities), and as far as things go, it's up to preference and/or performance. Try both and see wha | Ensemble classifier methods: should we use the class probabilties or the classification itself in stacking models?
What you're asking is the difference between voting (using classifications) and averaging (using probabilities), and as far as things go, it's up to preference and/or performance. Try both and see what wor... | Ensemble classifier methods: should we use the class probabilties or the classification itself in st
What you're asking is the difference between voting (using classifications) and averaging (using probabilities), and as far as things go, it's up to preference and/or performance. Try both and see wha |
45,330 | Ensemble classifier methods: should we use the class probabilties or the classification itself in stacking models? | The answer by mttk is quite nice. I will just add that you could also extract the probabilities and use them as input to a meta-classifier such as a simple logistic regression. This will automatically adjust for differences in the way classifiers produce probability estimates (i.e. classifier A almost exclusively produ... | Ensemble classifier methods: should we use the class probabilties or the classification itself in st | The answer by mttk is quite nice. I will just add that you could also extract the probabilities and use them as input to a meta-classifier such as a simple logistic regression. This will automatically | Ensemble classifier methods: should we use the class probabilties or the classification itself in stacking models?
The answer by mttk is quite nice. I will just add that you could also extract the probabilities and use them as input to a meta-classifier such as a simple logistic regression. This will automatically adju... | Ensemble classifier methods: should we use the class probabilties or the classification itself in st
The answer by mttk is quite nice. I will just add that you could also extract the probabilities and use them as input to a meta-classifier such as a simple logistic regression. This will automatically |
45,331 | Seasonal adjustment a la Hyndman | First, the model involves additive seasonality. It is not complicated -- just a simple Fourier approximation to the seasonal term. Yes, the original post missed the subscripts on the coefficients; the post has been subsequently edited.
In stage 1 of your proposal, you ignore the autocorrelation in the residuals which m... | Seasonal adjustment a la Hyndman | First, the model involves additive seasonality. It is not complicated -- just a simple Fourier approximation to the seasonal term. Yes, the original post missed the subscripts on the coefficients; the | Seasonal adjustment a la Hyndman
First, the model involves additive seasonality. It is not complicated -- just a simple Fourier approximation to the seasonal term. Yes, the original post missed the subscripts on the coefficients; the post has been subsequently edited.
In stage 1 of your proposal, you ignore the autocor... | Seasonal adjustment a la Hyndman
First, the model involves additive seasonality. It is not complicated -- just a simple Fourier approximation to the seasonal term. Yes, the original post missed the subscripts on the coefficients; the |
45,332 | Confidence Interval on the Geometric Distribution Expected Value? | If one knows the population parameter of a geometric, one of course knows the population mean exactly, so a confidence interval for that would be of zero width.
Assuming we only have sample information, we can construct a confidence interval for the population mean of a geometric random variable.
Since your lowest valu... | Confidence Interval on the Geometric Distribution Expected Value? | If one knows the population parameter of a geometric, one of course knows the population mean exactly, so a confidence interval for that would be of zero width.
Assuming we only have sample informatio | Confidence Interval on the Geometric Distribution Expected Value?
If one knows the population parameter of a geometric, one of course knows the population mean exactly, so a confidence interval for that would be of zero width.
Assuming we only have sample information, we can construct a confidence interval for the popu... | Confidence Interval on the Geometric Distribution Expected Value?
If one knows the population parameter of a geometric, one of course knows the population mean exactly, so a confidence interval for that would be of zero width.
Assuming we only have sample informatio |
45,333 | Confidence Interval on the Geometric Distribution Expected Value? | Same as mtauraso, I don't have 50 rep to comment on the above excellent answer by Glen_b.
I actually had to do this for one of my models, and I ended up doing this for p, which I just realized you did for 1/p. Here's the derivations anyway.
Define $\bar x$ to be the sample mean, $n$ the sample size (the number of geom... | Confidence Interval on the Geometric Distribution Expected Value? | Same as mtauraso, I don't have 50 rep to comment on the above excellent answer by Glen_b.
I actually had to do this for one of my models, and I ended up doing this for p, which I just realized you di | Confidence Interval on the Geometric Distribution Expected Value?
Same as mtauraso, I don't have 50 rep to comment on the above excellent answer by Glen_b.
I actually had to do this for one of my models, and I ended up doing this for p, which I just realized you did for 1/p. Here's the derivations anyway.
Define $\bar... | Confidence Interval on the Geometric Distribution Expected Value?
Same as mtauraso, I don't have 50 rep to comment on the above excellent answer by Glen_b.
I actually had to do this for one of my models, and I ended up doing this for p, which I just realized you di |
45,334 | Confidence Interval on the Geometric Distribution Expected Value? | I don't have 50 rep otherwise this would be a comment on Glen_b's excellent answer above, which made confidence intervals on the geometric distribution make sense to me. I'm happy to remove this if its in violation of site norms/rules, but the result I worked out may be helpful for other folks coming upon this answer f... | Confidence Interval on the Geometric Distribution Expected Value? | I don't have 50 rep otherwise this would be a comment on Glen_b's excellent answer above, which made confidence intervals on the geometric distribution make sense to me. I'm happy to remove this if it | Confidence Interval on the Geometric Distribution Expected Value?
I don't have 50 rep otherwise this would be a comment on Glen_b's excellent answer above, which made confidence intervals on the geometric distribution make sense to me. I'm happy to remove this if its in violation of site norms/rules, but the result I w... | Confidence Interval on the Geometric Distribution Expected Value?
I don't have 50 rep otherwise this would be a comment on Glen_b's excellent answer above, which made confidence intervals on the geometric distribution make sense to me. I'm happy to remove this if it |
45,335 | Going from daily probability to annual rate: more complicated than I thought? | A randomly-chosen fish on a randomly-chosen day with discharge $Q_i$ will remain in place with probability $1-f(Q_i)$. So it'll remain in place for the whole year with probability $\prod_i \left( 1-f(Q_i) \right)^{d_i}$, and so your $P_\textrm{annual}$ is one minus that. Assuming I've understood your notation, that i... | Going from daily probability to annual rate: more complicated than I thought? | A randomly-chosen fish on a randomly-chosen day with discharge $Q_i$ will remain in place with probability $1-f(Q_i)$. So it'll remain in place for the whole year with probability $\prod_i \left( 1-f | Going from daily probability to annual rate: more complicated than I thought?
A randomly-chosen fish on a randomly-chosen day with discharge $Q_i$ will remain in place with probability $1-f(Q_i)$. So it'll remain in place for the whole year with probability $\prod_i \left( 1-f(Q_i) \right)^{d_i}$, and so your $P_\text... | Going from daily probability to annual rate: more complicated than I thought?
A randomly-chosen fish on a randomly-chosen day with discharge $Q_i$ will remain in place with probability $1-f(Q_i)$. So it'll remain in place for the whole year with probability $\prod_i \left( 1-f |
45,336 | Going from daily probability to annual rate: more complicated than I thought? | As a sanity check, consider a constant daily "escapement probability" of 0.0004 (0.04%), without replacement of escaped fish back into the lake. After 365 days, the probability that an individual hasn't escaped is $(1-0.0004)^{365}$, 0.864, or a 13.6% probability of having escaped. That's about equivalent to the annual... | Going from daily probability to annual rate: more complicated than I thought? | As a sanity check, consider a constant daily "escapement probability" of 0.0004 (0.04%), without replacement of escaped fish back into the lake. After 365 days, the probability that an individual hasn | Going from daily probability to annual rate: more complicated than I thought?
As a sanity check, consider a constant daily "escapement probability" of 0.0004 (0.04%), without replacement of escaped fish back into the lake. After 365 days, the probability that an individual hasn't escaped is $(1-0.0004)^{365}$, 0.864, o... | Going from daily probability to annual rate: more complicated than I thought?
As a sanity check, consider a constant daily "escapement probability" of 0.0004 (0.04%), without replacement of escaped fish back into the lake. After 365 days, the probability that an individual hasn |
45,337 | calculating regression sum of square in R | SS(Regression) = SS(Total) - S(Residual)
You can get SS(Total) by:
SSTotal <- var( brainIQ$PIQ ) * (nrow(brainIQ)-1)
SSE <- sum( mylm$resid^2 )
SSreg <- SSTotal - SSE
The degrees of freedom for the "Regression" row are the sum of the degrees of freedom for the corresponding components of the Regression (in ... | calculating regression sum of square in R | SS(Regression) = SS(Total) - S(Residual)
You can get SS(Total) by:
SSTotal <- var( brainIQ$PIQ ) * (nrow(brainIQ)-1)
SSE <- sum( mylm$resid^2 )
SSreg <- SSTotal - SSE
The degrees of freedo | calculating regression sum of square in R
SS(Regression) = SS(Total) - S(Residual)
You can get SS(Total) by:
SSTotal <- var( brainIQ$PIQ ) * (nrow(brainIQ)-1)
SSE <- sum( mylm$resid^2 )
SSreg <- SSTotal - SSE
The degrees of freedom for the "Regression" row are the sum of the degrees of freedom for the corre... | calculating regression sum of square in R
SS(Regression) = SS(Total) - S(Residual)
You can get SS(Total) by:
SSTotal <- var( brainIQ$PIQ ) * (nrow(brainIQ)-1)
SSE <- sum( mylm$resid^2 )
SSreg <- SSTotal - SSE
The degrees of freedo |
45,338 | calculating regression sum of square in R | If you have built a linear model already, you can compute the regression sum of squares with one line. Using your model:
sum((mylm$fitted.values - mean(mylm$fitted.values))^2)
This takes advantage of the fact that the mean of the response is equal to the mean of the fitted values.
UPDATE: As @whuber pointed out, the l... | calculating regression sum of square in R | If you have built a linear model already, you can compute the regression sum of squares with one line. Using your model:
sum((mylm$fitted.values - mean(mylm$fitted.values))^2)
This takes advantage of | calculating regression sum of square in R
If you have built a linear model already, you can compute the regression sum of squares with one line. Using your model:
sum((mylm$fitted.values - mean(mylm$fitted.values))^2)
This takes advantage of the fact that the mean of the response is equal to the mean of the fitted val... | calculating regression sum of square in R
If you have built a linear model already, you can compute the regression sum of squares with one line. Using your model:
sum((mylm$fitted.values - mean(mylm$fitted.values))^2)
This takes advantage of |
45,339 | calculating regression sum of square in R | I found matrix approach to solve this problem:
Here we can calculate SSR and Total sum of square.
# Y matrix
Y <- as.matrix(brainIQ$PIQ, ncol=1)
n= nrow(Y)
J = matrix(1, nrow=n, ncol=n)
# Total sum of Square
SSTO = t(Y) %*% Y - (1/n)*t(Y)%*%J%*%Y
X <- as.matrix(cbind(1, brainIQ[,-1]))
... | calculating regression sum of square in R | I found matrix approach to solve this problem:
Here we can calculate SSR and Total sum of square.
# Y matrix
Y <- as.matrix(brainIQ$PIQ, ncol=1)
n= nrow(Y)
J = matrix(1, nrow=n, ncol | calculating regression sum of square in R
I found matrix approach to solve this problem:
Here we can calculate SSR and Total sum of square.
# Y matrix
Y <- as.matrix(brainIQ$PIQ, ncol=1)
n= nrow(Y)
J = matrix(1, nrow=n, ncol=n)
# Total sum of Square
SSTO = t(Y) %*% Y - (1/n)*t(Y)%*%J%*%Y
... | calculating regression sum of square in R
I found matrix approach to solve this problem:
Here we can calculate SSR and Total sum of square.
# Y matrix
Y <- as.matrix(brainIQ$PIQ, ncol=1)
n= nrow(Y)
J = matrix(1, nrow=n, ncol |
45,340 | Simpson's Paradox & Random Effects | In Simpson's paradox there is a reversal of the sign of the correlation between two variables, or equivalently, a flip in the sign of regression coefficients (slopes) due to an unaccounted for confounding variable.
In the following illustration, we are looking at the relationship between a fictitious biochemical marker... | Simpson's Paradox & Random Effects | In Simpson's paradox there is a reversal of the sign of the correlation between two variables, or equivalently, a flip in the sign of regression coefficients (slopes) due to an unaccounted for confoun | Simpson's Paradox & Random Effects
In Simpson's paradox there is a reversal of the sign of the correlation between two variables, or equivalently, a flip in the sign of regression coefficients (slopes) due to an unaccounted for confounding variable.
In the following illustration, we are looking at the relationship betw... | Simpson's Paradox & Random Effects
In Simpson's paradox there is a reversal of the sign of the correlation between two variables, or equivalently, a flip in the sign of regression coefficients (slopes) due to an unaccounted for confoun |
45,341 | glmnet - compute maximal lambda value | The smallest value of lambda for which no parameters are selected may be computed by
$\max_j \frac{1}{\alpha n} \sum_{i=1}^n [Y_i - \bar Y (1- \bar Y)] X_{ij}$
See my example:
n <- 500
p <- 3
b <- c(-5,3,2,0)
X <- cbind(rep(1,n),scale(matrix(rnorm(p*n),nrow=n)))
Y <- rbinom(n,1,prob = exp(X%*%b)/(1 + exp(X%*%b)))
alp... | glmnet - compute maximal lambda value | The smallest value of lambda for which no parameters are selected may be computed by
$\max_j \frac{1}{\alpha n} \sum_{i=1}^n [Y_i - \bar Y (1- \bar Y)] X_{ij}$
See my example:
n <- 500
p <- 3
b <- c(- | glmnet - compute maximal lambda value
The smallest value of lambda for which no parameters are selected may be computed by
$\max_j \frac{1}{\alpha n} \sum_{i=1}^n [Y_i - \bar Y (1- \bar Y)] X_{ij}$
See my example:
n <- 500
p <- 3
b <- c(-5,3,2,0)
X <- cbind(rep(1,n),scale(matrix(rnorm(p*n),nrow=n)))
Y <- rbinom(n,1,pr... | glmnet - compute maximal lambda value
The smallest value of lambda for which no parameters are selected may be computed by
$\max_j \frac{1}{\alpha n} \sum_{i=1}^n [Y_i - \bar Y (1- \bar Y)] X_{ij}$
See my example:
n <- 500
p <- 3
b <- c(- |
45,342 | glmnet - compute maximal lambda value | Here is an example:
library(glmnet)
n <- 500L
x1 <- rnorm(n, 2.0, 0.5)
x2 <- rnorm(n, -1.0, 2)
y <- factor(rbinom(n, 1L, plogis(-0.6 + 1.0 * x1 - 0.8 * x2)))
X <- matrix(c(x1, x2), ncol = 2)
mod <- glmnet(X, y, "binomial")
Now you can see the degrees of freedom and corresponding lambda by simply:
> print(mod)
Cal... | glmnet - compute maximal lambda value | Here is an example:
library(glmnet)
n <- 500L
x1 <- rnorm(n, 2.0, 0.5)
x2 <- rnorm(n, -1.0, 2)
y <- factor(rbinom(n, 1L, plogis(-0.6 + 1.0 * x1 - 0.8 * x2)))
X <- matrix(c(x1, x2), ncol = 2)
mod < | glmnet - compute maximal lambda value
Here is an example:
library(glmnet)
n <- 500L
x1 <- rnorm(n, 2.0, 0.5)
x2 <- rnorm(n, -1.0, 2)
y <- factor(rbinom(n, 1L, plogis(-0.6 + 1.0 * x1 - 0.8 * x2)))
X <- matrix(c(x1, x2), ncol = 2)
mod <- glmnet(X, y, "binomial")
Now you can see the degrees of freedom and correspondi... | glmnet - compute maximal lambda value
Here is an example:
library(glmnet)
n <- 500L
x1 <- rnorm(n, 2.0, 0.5)
x2 <- rnorm(n, -1.0, 2)
y <- factor(rbinom(n, 1L, plogis(-0.6 + 1.0 * x1 - 0.8 * x2)))
X <- matrix(c(x1, x2), ncol = 2)
mod < |
45,343 | Checking quality of clustering of labeled-class data | There are many many measures that can be used on labeled data.
For example, if you run k-means wiht $k=3$ on the mouse data set:
you get the following evaluation result (using ELKI):
Clearly, it did not work very well. If you know this toy data set, k-means just doesn't work well on it, because the clusters have too ... | Checking quality of clustering of labeled-class data | There are many many measures that can be used on labeled data.
For example, if you run k-means wiht $k=3$ on the mouse data set:
you get the following evaluation result (using ELKI):
Clearly, it did | Checking quality of clustering of labeled-class data
There are many many measures that can be used on labeled data.
For example, if you run k-means wiht $k=3$ on the mouse data set:
you get the following evaluation result (using ELKI):
Clearly, it did not work very well. If you know this toy data set, k-means just do... | Checking quality of clustering of labeled-class data
There are many many measures that can be used on labeled data.
For example, if you run k-means wiht $k=3$ on the mouse data set:
you get the following evaluation result (using ELKI):
Clearly, it did |
45,344 | Checking quality of clustering of labeled-class data | If your data is labeled that is the true classification of your data set. Then you can apply any of the know clustering methods (hierarchical, kmeans or model-based clustering) and use the adjustedRandIndex. This is a function in R in the mclust
package. Adjusted Rand Index indicates how similars the clusters are, and ... | Checking quality of clustering of labeled-class data | If your data is labeled that is the true classification of your data set. Then you can apply any of the know clustering methods (hierarchical, kmeans or model-based clustering) and use the adjustedRan | Checking quality of clustering of labeled-class data
If your data is labeled that is the true classification of your data set. Then you can apply any of the know clustering methods (hierarchical, kmeans or model-based clustering) and use the adjustedRandIndex. This is a function in R in the mclust
package. Adjusted Ran... | Checking quality of clustering of labeled-class data
If your data is labeled that is the true classification of your data set. Then you can apply any of the know clustering methods (hierarchical, kmeans or model-based clustering) and use the adjustedRan |
45,345 | Checking quality of clustering of labeled-class data | Clustering is usually used for unsupervised classification - that is, when you are trying to discover groups that might exist but that you don't know about.
If you want to classify units into known groups, you could look at multinomial logistic regression or at classification trees and related methods. | Checking quality of clustering of labeled-class data | Clustering is usually used for unsupervised classification - that is, when you are trying to discover groups that might exist but that you don't know about.
If you want to classify units into known g | Checking quality of clustering of labeled-class data
Clustering is usually used for unsupervised classification - that is, when you are trying to discover groups that might exist but that you don't know about.
If you want to classify units into known groups, you could look at multinomial logistic regression or at clas... | Checking quality of clustering of labeled-class data
Clustering is usually used for unsupervised classification - that is, when you are trying to discover groups that might exist but that you don't know about.
If you want to classify units into known g |
45,346 | How to select the 'best' trim value for the mean function? | Given a sample $\pmb x=\{x_i\}_{i=1}^n$ and, for an integer $1\leq m\leq n$ denoting $x_{(m)}$ the $m$-th largest entry of $\pmb x$, and $\alpha\in(0,0.5)$ define the $\alpha$ trimmed mean as:
$$\hat{\mu}_{\alpha}=\frac{1}{(1-2\alpha)n}\sum_{i=[n\alpha]+1}^{n-[n\alpha]}x_{(i)}$$
For any symmetric continuous distributio... | How to select the 'best' trim value for the mean function? | Given a sample $\pmb x=\{x_i\}_{i=1}^n$ and, for an integer $1\leq m\leq n$ denoting $x_{(m)}$ the $m$-th largest entry of $\pmb x$, and $\alpha\in(0,0.5)$ define the $\alpha$ trimmed mean as:
$$\hat{ | How to select the 'best' trim value for the mean function?
Given a sample $\pmb x=\{x_i\}_{i=1}^n$ and, for an integer $1\leq m\leq n$ denoting $x_{(m)}$ the $m$-th largest entry of $\pmb x$, and $\alpha\in(0,0.5)$ define the $\alpha$ trimmed mean as:
$$\hat{\mu}_{\alpha}=\frac{1}{(1-2\alpha)n}\sum_{i=[n\alpha]+1}^{n-[... | How to select the 'best' trim value for the mean function?
Given a sample $\pmb x=\{x_i\}_{i=1}^n$ and, for an integer $1\leq m\leq n$ denoting $x_{(m)}$ the $m$-th largest entry of $\pmb x$, and $\alpha\in(0,0.5)$ define the $\alpha$ trimmed mean as:
$$\hat{ |
45,347 | Why are these file sizes not normally distributed? | CLT applies to the mean of samples from a distribution. If you bootstrap the mean of your data you'll find that the distribution of the mean of your data is normal. The file sizes of the images are neither generated under these conditions, nor do they have the assumptions in which the CLT apply, so it's not expected th... | Why are these file sizes not normally distributed? | CLT applies to the mean of samples from a distribution. If you bootstrap the mean of your data you'll find that the distribution of the mean of your data is normal. The file sizes of the images are ne | Why are these file sizes not normally distributed?
CLT applies to the mean of samples from a distribution. If you bootstrap the mean of your data you'll find that the distribution of the mean of your data is normal. The file sizes of the images are neither generated under these conditions, nor do they have the assumpti... | Why are these file sizes not normally distributed?
CLT applies to the mean of samples from a distribution. If you bootstrap the mean of your data you'll find that the distribution of the mean of your data is normal. The file sizes of the images are ne |
45,348 | Why are these file sizes not normally distributed? | Please take a look of the definition for Central-Limit-Theorem:
This statement tells us that you only get a normal distribution for the sample means given enough sample size. There is no assumption to the underlying distribution that it needs to be normal. | Why are these file sizes not normally distributed? | Please take a look of the definition for Central-Limit-Theorem:
This statement tells us that you only get a normal distribution for the sample means given enough sample size. There is no assumption t | Why are these file sizes not normally distributed?
Please take a look of the definition for Central-Limit-Theorem:
This statement tells us that you only get a normal distribution for the sample means given enough sample size. There is no assumption to the underlying distribution that it needs to be normal. | Why are these file sizes not normally distributed?
Please take a look of the definition for Central-Limit-Theorem:
This statement tells us that you only get a normal distribution for the sample means given enough sample size. There is no assumption t |
45,349 | Why are these file sizes not normally distributed? | The standard central limit theorem holds under some conditions, one of which is independance of observed events. Were these captured images in such a way that parameters of the images had no correlations between them ?
It's kind of reassuring to think that if you were filming a periodic phenomenon (say, the position of... | Why are these file sizes not normally distributed? | The standard central limit theorem holds under some conditions, one of which is independance of observed events. Were these captured images in such a way that parameters of the images had no correlati | Why are these file sizes not normally distributed?
The standard central limit theorem holds under some conditions, one of which is independance of observed events. Were these captured images in such a way that parameters of the images had no correlations between them ?
It's kind of reassuring to think that if you were ... | Why are these file sizes not normally distributed?
The standard central limit theorem holds under some conditions, one of which is independance of observed events. Were these captured images in such a way that parameters of the images had no correlati |
45,350 | Sparsity in Lasso and advantage over ridge (Statistical Learning) [duplicate] | The lasso penalty will force some of the coefficients quickly to zero. This means that variables are removed from the model, hence the sparsity.
Ridge regression will more or less compress the coefficients to become smaller. This does not necessarily result in 0 coefficients and removal of variables.
See the picture ... | Sparsity in Lasso and advantage over ridge (Statistical Learning) [duplicate] | The lasso penalty will force some of the coefficients quickly to zero. This means that variables are removed from the model, hence the sparsity.
Ridge regression will more or less compress the coeffi | Sparsity in Lasso and advantage over ridge (Statistical Learning) [duplicate]
The lasso penalty will force some of the coefficients quickly to zero. This means that variables are removed from the model, hence the sparsity.
Ridge regression will more or less compress the coefficients to become smaller. This does not ne... | Sparsity in Lasso and advantage over ridge (Statistical Learning) [duplicate]
The lasso penalty will force some of the coefficients quickly to zero. This means that variables are removed from the model, hence the sparsity.
Ridge regression will more or less compress the coeffi |
45,351 | How to combine weak classfiers to get a strong one? | Practically speaking bagging, boosting, and stacking all constitute reasonable ways to combine the weak predictions, as others have mentioned. Taking that one step further though, trying as many of them as possible and seeing what performs best is common the context of competitive machine learning too (e.g. You might ... | How to combine weak classfiers to get a strong one? | Practically speaking bagging, boosting, and stacking all constitute reasonable ways to combine the weak predictions, as others have mentioned. Taking that one step further though, trying as many of t | How to combine weak classfiers to get a strong one?
Practically speaking bagging, boosting, and stacking all constitute reasonable ways to combine the weak predictions, as others have mentioned. Taking that one step further though, trying as many of them as possible and seeing what performs best is common the context ... | How to combine weak classfiers to get a strong one?
Practically speaking bagging, boosting, and stacking all constitute reasonable ways to combine the weak predictions, as others have mentioned. Taking that one step further though, trying as many of t |
45,352 | How to combine weak classfiers to get a strong one? | As you might surmise from the diversity of comments, combining weak learners into strong ones isn't a task with a single, "correct" approach, but a field of approaches with varying levels of known strengths and drawbacks. For a brief introduction, the wikipedia entry for ensemble learning is a reasonable place to start... | How to combine weak classfiers to get a strong one? | As you might surmise from the diversity of comments, combining weak learners into strong ones isn't a task with a single, "correct" approach, but a field of approaches with varying levels of known str | How to combine weak classfiers to get a strong one?
As you might surmise from the diversity of comments, combining weak learners into strong ones isn't a task with a single, "correct" approach, but a field of approaches with varying levels of known strengths and drawbacks. For a brief introduction, the wikipedia entry ... | How to combine weak classfiers to get a strong one?
As you might surmise from the diversity of comments, combining weak learners into strong ones isn't a task with a single, "correct" approach, but a field of approaches with varying levels of known str |
45,353 | How to combine weak classfiers to get a strong one? | Combining weak learners into a strong one is exactly what boosting is designed for.
Boosting is a specific example of ensemble method.
"Improved Boosting Algorithms Using Confidence-rated Predictions" is a popular algorithm (over 3000 citations) that uses the confidence of the weak learner.
Note that there is a big ... | How to combine weak classfiers to get a strong one? | Combining weak learners into a strong one is exactly what boosting is designed for.
Boosting is a specific example of ensemble method.
"Improved Boosting Algorithms Using Confidence-rated Predictions | How to combine weak classfiers to get a strong one?
Combining weak learners into a strong one is exactly what boosting is designed for.
Boosting is a specific example of ensemble method.
"Improved Boosting Algorithms Using Confidence-rated Predictions" is a popular algorithm (over 3000 citations) that uses the confide... | How to combine weak classfiers to get a strong one?
Combining weak learners into a strong one is exactly what boosting is designed for.
Boosting is a specific example of ensemble method.
"Improved Boosting Algorithms Using Confidence-rated Predictions |
45,354 | How to add a third variable to a bar plot? | I'd avoid bar charts here. A dot chart like this scores more highly on most criteria for such data. The term "dot chart" (or "dot plot") is overloaded in statistical graphics. This flavour is often called a Cleveland dot chart after William S. Cleveland, who promoted its use from the mid-1980s on. See a link to Clevela... | How to add a third variable to a bar plot? | I'd avoid bar charts here. A dot chart like this scores more highly on most criteria for such data. The term "dot chart" (or "dot plot") is overloaded in statistical graphics. This flavour is often ca | How to add a third variable to a bar plot?
I'd avoid bar charts here. A dot chart like this scores more highly on most criteria for such data. The term "dot chart" (or "dot plot") is overloaded in statistical graphics. This flavour is often called a Cleveland dot chart after William S. Cleveland, who promoted its use f... | How to add a third variable to a bar plot?
I'd avoid bar charts here. A dot chart like this scores more highly on most criteria for such data. The term "dot chart" (or "dot plot") is overloaded in statistical graphics. This flavour is often ca |
45,355 | $E(X)E(1/X) \leq (a + b)^2 / 4ab$ | I know it's stated in the problem, but I figured I'd put it in the answer bank:
For some line $cx+d$ that cuts through $\frac{1}{X}$ at the points x=a and x = b, it's easy to show that $ c = - \frac{1}{ab} $ and $d = \frac{a+b}{ab} $,
So, $ \frac{1}{X} \le - \frac{1}{ab} X + \frac{a+b}{ab} $, and therefore:
$$ E(\fra... | $E(X)E(1/X) \leq (a + b)^2 / 4ab$ | I know it's stated in the problem, but I figured I'd put it in the answer bank:
For some line $cx+d$ that cuts through $\frac{1}{X}$ at the points x=a and x = b, it's easy to show that $ c = - \frac{1 | $E(X)E(1/X) \leq (a + b)^2 / 4ab$
I know it's stated in the problem, but I figured I'd put it in the answer bank:
For some line $cx+d$ that cuts through $\frac{1}{X}$ at the points x=a and x = b, it's easy to show that $ c = - \frac{1}{ab} $ and $d = \frac{a+b}{ab} $,
So, $ \frac{1}{X} \le - \frac{1}{ab} X + \frac{a+... | $E(X)E(1/X) \leq (a + b)^2 / 4ab$
I know it's stated in the problem, but I figured I'd put it in the answer bank:
For some line $cx+d$ that cuts through $\frac{1}{X}$ at the points x=a and x = b, it's easy to show that $ c = - \frac{1 |
45,356 | $E(X)E(1/X) \leq (a + b)^2 / 4ab$ | Once we observe that both sides of the inequality are scale invariant, it follows immediately by combining two simple, well-known inequalities, of which the most notable is that correlation coefficients cannot be less than $\newcommand{\e}{\mathbb{E}}-1$.
The Cauchy-Schwarz Inequality guarantees that the correlation c... | $E(X)E(1/X) \leq (a + b)^2 / 4ab$ | Once we observe that both sides of the inequality are scale invariant, it follows immediately by combining two simple, well-known inequalities, of which the most notable is that correlation coefficien | $E(X)E(1/X) \leq (a + b)^2 / 4ab$
Once we observe that both sides of the inequality are scale invariant, it follows immediately by combining two simple, well-known inequalities, of which the most notable is that correlation coefficients cannot be less than $\newcommand{\e}{\mathbb{E}}-1$.
The Cauchy-Schwarz Inequality... | $E(X)E(1/X) \leq (a + b)^2 / 4ab$
Once we observe that both sides of the inequality are scale invariant, it follows immediately by combining two simple, well-known inequalities, of which the most notable is that correlation coefficien |
45,357 | Machine learning classifiers | Rules of thumb can only get you so far, but scikit-learn's cheat sheet is quite helpful for basic guidance. Here's a blog post by the creator of said diagram. | Machine learning classifiers | Rules of thumb can only get you so far, but scikit-learn's cheat sheet is quite helpful for basic guidance. Here's a blog post by the creator of said diagram. | Machine learning classifiers
Rules of thumb can only get you so far, but scikit-learn's cheat sheet is quite helpful for basic guidance. Here's a blog post by the creator of said diagram. | Machine learning classifiers
Rules of thumb can only get you so far, but scikit-learn's cheat sheet is quite helpful for basic guidance. Here's a blog post by the creator of said diagram. |
45,358 | The meaning of scale and location in the Pearson correlation context | In this case, scale and location are more general. Given two random variables $X$ and $Y$, the correlation is scale and location invariant in the sense that $cor(X,Y) = cor(X_{T},Y_{T})$, if $X_{T} = a + bX$, and $Y_{T} = c + dY$, and $b$ and $d$ have the same sign (either both positive or both negative). Note that if... | The meaning of scale and location in the Pearson correlation context | In this case, scale and location are more general. Given two random variables $X$ and $Y$, the correlation is scale and location invariant in the sense that $cor(X,Y) = cor(X_{T},Y_{T})$, if $X_{T} = | The meaning of scale and location in the Pearson correlation context
In this case, scale and location are more general. Given two random variables $X$ and $Y$, the correlation is scale and location invariant in the sense that $cor(X,Y) = cor(X_{T},Y_{T})$, if $X_{T} = a + bX$, and $Y_{T} = c + dY$, and $b$ and $d$ hav... | The meaning of scale and location in the Pearson correlation context
In this case, scale and location are more general. Given two random variables $X$ and $Y$, the correlation is scale and location invariant in the sense that $cor(X,Y) = cor(X_{T},Y_{T})$, if $X_{T} = |
45,359 | The meaning of scale and location in the Pearson correlation context | No, scale and location are more general in this case. A scale and location transformation of a variable X is a deterministic function of X defined as Y=f (X)=aX+b. For the correlation coefficient to be scale and location invariant is the same as saying that for a and b real, the correlation coefficient of X and Y will ... | The meaning of scale and location in the Pearson correlation context | No, scale and location are more general in this case. A scale and location transformation of a variable X is a deterministic function of X defined as Y=f (X)=aX+b. For the correlation coefficient to b | The meaning of scale and location in the Pearson correlation context
No, scale and location are more general in this case. A scale and location transformation of a variable X is a deterministic function of X defined as Y=f (X)=aX+b. For the correlation coefficient to be scale and location invariant is the same as sayin... | The meaning of scale and location in the Pearson correlation context
No, scale and location are more general in this case. A scale and location transformation of a variable X is a deterministic function of X defined as Y=f (X)=aX+b. For the correlation coefficient to b |
45,360 | Maximum likelihood in the GJR-GARCH(1,1) model | A conditional volatility model such as the GARCH model is defined by the mean equation
\begin{equation}
r_t = \mu + \sigma_t z_t = \mu + \varepsilon_t
\end{equation}
and the GARCH equation (this is for the simple GARCH)
\begin{equation}
\sigma^2_t = \omega + \alpha \varepsilon_{t-1}^2 + \beta \sigma_{t-1}^2
\end{equat... | Maximum likelihood in the GJR-GARCH(1,1) model | A conditional volatility model such as the GARCH model is defined by the mean equation
\begin{equation}
r_t = \mu + \sigma_t z_t = \mu + \varepsilon_t
\end{equation}
and the GARCH equation (this is fo | Maximum likelihood in the GJR-GARCH(1,1) model
A conditional volatility model such as the GARCH model is defined by the mean equation
\begin{equation}
r_t = \mu + \sigma_t z_t = \mu + \varepsilon_t
\end{equation}
and the GARCH equation (this is for the simple GARCH)
\begin{equation}
\sigma^2_t = \omega + \alpha \vareps... | Maximum likelihood in the GJR-GARCH(1,1) model
A conditional volatility model such as the GARCH model is defined by the mean equation
\begin{equation}
r_t = \mu + \sigma_t z_t = \mu + \varepsilon_t
\end{equation}
and the GARCH equation (this is fo |
45,361 | Saturated model - why is it perfectly fitted? | One way to get some intuition for staturation is to look carefully at parameter indices. I'll use an example from contingency table analysis, because I think it's a little bit clearer than the regression context (and also because regression versions have already been pointed to).
Consider the log linear models of a tw... | Saturated model - why is it perfectly fitted? | One way to get some intuition for staturation is to look carefully at parameter indices. I'll use an example from contingency table analysis, because I think it's a little bit clearer than the regres | Saturated model - why is it perfectly fitted?
One way to get some intuition for staturation is to look carefully at parameter indices. I'll use an example from contingency table analysis, because I think it's a little bit clearer than the regression context (and also because regression versions have already been point... | Saturated model - why is it perfectly fitted?
One way to get some intuition for staturation is to look carefully at parameter indices. I'll use an example from contingency table analysis, because I think it's a little bit clearer than the regres |
45,362 | Saturated model - why is it perfectly fitted? | Saturated essentially means "perfectly fitted". In a saturated model there are as many estimated parameters as there are observations.
Take a simple case of only 2 observations. Say "height" is the DV and one person is male and one female. Now a model with just "sex" as an IV will fit perfectly. In a linear model, th... | Saturated model - why is it perfectly fitted? | Saturated essentially means "perfectly fitted". In a saturated model there are as many estimated parameters as there are observations.
Take a simple case of only 2 observations. Say "height" is the | Saturated model - why is it perfectly fitted?
Saturated essentially means "perfectly fitted". In a saturated model there are as many estimated parameters as there are observations.
Take a simple case of only 2 observations. Say "height" is the DV and one person is male and one female. Now a model with just "sex" as a... | Saturated model - why is it perfectly fitted?
Saturated essentially means "perfectly fitted". In a saturated model there are as many estimated parameters as there are observations.
Take a simple case of only 2 observations. Say "height" is the |
45,363 | Saturated model - why is it perfectly fitted? | Looking at the answers to this thread
A saturated model is one in which there are as many estimated
parameters as data points.
Consider the case of linear regression. You have a sample of size $n$ and $k$ regressors including the constant term. Then you essentially are trying to "solve" (i.e. find the $k$ unknown ... | Saturated model - why is it perfectly fitted? | Looking at the answers to this thread
A saturated model is one in which there are as many estimated
parameters as data points.
Consider the case of linear regression. You have a sample of size $n | Saturated model - why is it perfectly fitted?
Looking at the answers to this thread
A saturated model is one in which there are as many estimated
parameters as data points.
Consider the case of linear regression. You have a sample of size $n$ and $k$ regressors including the constant term. Then you essentially are... | Saturated model - why is it perfectly fitted?
Looking at the answers to this thread
A saturated model is one in which there are as many estimated
parameters as data points.
Consider the case of linear regression. You have a sample of size $n |
45,364 | Null hypothesis for linear regression | I am confused about the null hypothesis for linear regression.
The issue applies to null hypotheses more broadly than regression
What does that translate to in terms of null hypothesis?
You should get used to stating nulls before you look at p-values.
Am I rejecting the null hypothesis that the coefficient for that... | Null hypothesis for linear regression | I am confused about the null hypothesis for linear regression.
The issue applies to null hypotheses more broadly than regression
What does that translate to in terms of null hypothesis?
You should | Null hypothesis for linear regression
I am confused about the null hypothesis for linear regression.
The issue applies to null hypotheses more broadly than regression
What does that translate to in terms of null hypothesis?
You should get used to stating nulls before you look at p-values.
Am I rejecting the null hy... | Null hypothesis for linear regression
I am confused about the null hypothesis for linear regression.
The issue applies to null hypotheses more broadly than regression
What does that translate to in terms of null hypothesis?
You should |
45,365 | Null hypothesis for linear regression | The P-Value in regression output in R tests the null hypothesis that the coefficient equals 0. | Null hypothesis for linear regression | The P-Value in regression output in R tests the null hypothesis that the coefficient equals 0. | Null hypothesis for linear regression
The P-Value in regression output in R tests the null hypothesis that the coefficient equals 0. | Null hypothesis for linear regression
The P-Value in regression output in R tests the null hypothesis that the coefficient equals 0. |
45,366 | Null hypothesis for linear regression | Any regression equation is given by y = a + b*x + u, where 'a' and 'b' are the intercept and slope of the best fit line and 'u' is the disturbance term.
Imagine b=0; the equation would then be y = a + 0*x + u = a + u.
Notice that the 'x' has disappeared. It simply means that there is no relationship between y and x.
T... | Null hypothesis for linear regression | Any regression equation is given by y = a + b*x + u, where 'a' and 'b' are the intercept and slope of the best fit line and 'u' is the disturbance term.
Imagine b=0; the equation would then be y = a | Null hypothesis for linear regression
Any regression equation is given by y = a + b*x + u, where 'a' and 'b' are the intercept and slope of the best fit line and 'u' is the disturbance term.
Imagine b=0; the equation would then be y = a + 0*x + u = a + u.
Notice that the 'x' has disappeared. It simply means that there... | Null hypothesis for linear regression
Any regression equation is given by y = a + b*x + u, where 'a' and 'b' are the intercept and slope of the best fit line and 'u' is the disturbance term.
Imagine b=0; the equation would then be y = a |
45,367 | Determining number of factors in exploratory factor analysis | There are several approaches to determining the number of factors to extract for exploratory factor analysis (EFA). However, practically all of them boil down to be either visual, or analytical.
Visual approaches are mostly based on visual representation of factors' eigenvalues (so called scree plot - see this page and... | Determining number of factors in exploratory factor analysis | There are several approaches to determining the number of factors to extract for exploratory factor analysis (EFA). However, practically all of them boil down to be either visual, or analytical.
Visua | Determining number of factors in exploratory factor analysis
There are several approaches to determining the number of factors to extract for exploratory factor analysis (EFA). However, practically all of them boil down to be either visual, or analytical.
Visual approaches are mostly based on visual representation of f... | Determining number of factors in exploratory factor analysis
There are several approaches to determining the number of factors to extract for exploratory factor analysis (EFA). However, practically all of them boil down to be either visual, or analytical.
Visua |
45,368 | Determining number of factors in exploratory factor analysis | I think that I cant help you specifically with R, but a common step on verifying the number of factors is to either look at the loadings and retaining as many factors as those ones with a value of 1 or more. This is the most straight way to pick the factors. If you want, you can manage to get the "scree plot", wich giv... | Determining number of factors in exploratory factor analysis | I think that I cant help you specifically with R, but a common step on verifying the number of factors is to either look at the loadings and retaining as many factors as those ones with a value of 1 o | Determining number of factors in exploratory factor analysis
I think that I cant help you specifically with R, but a common step on verifying the number of factors is to either look at the loadings and retaining as many factors as those ones with a value of 1 or more. This is the most straight way to pick the factors. ... | Determining number of factors in exploratory factor analysis
I think that I cant help you specifically with R, but a common step on verifying the number of factors is to either look at the loadings and retaining as many factors as those ones with a value of 1 o |
45,369 | Bias/variance tradeoff tutorial | It depends exactly what you'd like to know about bias/variance, but a good theoretical description of the problem is in Andrew Ng's CS229 Lecture Notes. [EDIT: updated link]
In general, this tradeoff is about model complexity - how many parameters are you trying to estimate, and how "free/independent" are they. This ca... | Bias/variance tradeoff tutorial | It depends exactly what you'd like to know about bias/variance, but a good theoretical description of the problem is in Andrew Ng's CS229 Lecture Notes. [EDIT: updated link]
In general, this tradeoff | Bias/variance tradeoff tutorial
It depends exactly what you'd like to know about bias/variance, but a good theoretical description of the problem is in Andrew Ng's CS229 Lecture Notes. [EDIT: updated link]
In general, this tradeoff is about model complexity - how many parameters are you trying to estimate, and how "fre... | Bias/variance tradeoff tutorial
It depends exactly what you'd like to know about bias/variance, but a good theoretical description of the problem is in Andrew Ng's CS229 Lecture Notes. [EDIT: updated link]
In general, this tradeoff |
45,370 | Bias/variance tradeoff tutorial | A nice and intuitive explanation is found in this book. It accompanies the ISLR book with more code and simulations.
The author is using simulation to show the decomposition of the MSE and also shows graphically the trade off as model complexity increases | Bias/variance tradeoff tutorial | A nice and intuitive explanation is found in this book. It accompanies the ISLR book with more code and simulations.
The author is using simulation to show the decomposition of the MSE and also shows | Bias/variance tradeoff tutorial
A nice and intuitive explanation is found in this book. It accompanies the ISLR book with more code and simulations.
The author is using simulation to show the decomposition of the MSE and also shows graphically the trade off as model complexity increases | Bias/variance tradeoff tutorial
A nice and intuitive explanation is found in this book. It accompanies the ISLR book with more code and simulations.
The author is using simulation to show the decomposition of the MSE and also shows |
45,371 | Bias/variance tradeoff tutorial | I think the article Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning by Tal Yarkoni and Jacob Westfall will give you some insights into the bias-variance trade-off: http://jakewestfall.org/publications/Yarkoni_Westfall_choosing_prediction.pdf. | Bias/variance tradeoff tutorial | I think the article Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning by Tal Yarkoni and Jacob Westfall will give you some insights into the bias-variance trade-off: ht | Bias/variance tradeoff tutorial
I think the article Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning by Tal Yarkoni and Jacob Westfall will give you some insights into the bias-variance trade-off: http://jakewestfall.org/publications/Yarkoni_Westfall_choosing_prediction.pdf. | Bias/variance tradeoff tutorial
I think the article Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning by Tal Yarkoni and Jacob Westfall will give you some insights into the bias-variance trade-off: ht |
45,372 | Computing the Variance of an MLE | Combining @Xi'an comments and @wolfies' answer, we have that
$$1/T_n = \frac 1n \sum_{i=1}^n (-\ln X_i)$$
But $-\ln X_i \sim {\rm Exp}(1/\theta)$ (where $1/\theta$ is the scale parameter), which essentially is a Gamma distribution with shape parameter $1$, and so by the summation properties of the Gamma distribution,
$... | Computing the Variance of an MLE | Combining @Xi'an comments and @wolfies' answer, we have that
$$1/T_n = \frac 1n \sum_{i=1}^n (-\ln X_i)$$
But $-\ln X_i \sim {\rm Exp}(1/\theta)$ (where $1/\theta$ is the scale parameter), which essen | Computing the Variance of an MLE
Combining @Xi'an comments and @wolfies' answer, we have that
$$1/T_n = \frac 1n \sum_{i=1}^n (-\ln X_i)$$
But $-\ln X_i \sim {\rm Exp}(1/\theta)$ (where $1/\theta$ is the scale parameter), which essentially is a Gamma distribution with shape parameter $1$, and so by the summation proper... | Computing the Variance of an MLE
Combining @Xi'an comments and @wolfies' answer, we have that
$$1/T_n = \frac 1n \sum_{i=1}^n (-\ln X_i)$$
But $-\ln X_i \sim {\rm Exp}(1/\theta)$ (where $1/\theta$ is the scale parameter), which essen |
45,373 | Computing the Variance of an MLE | Did you try to compute the Fisher information? Get the second derivative of the Log Likelihood, multiply by -1, and take the reciprocal. Evaluate at the MLE . Asymptotically, this approximates the variance of the MLE. | Computing the Variance of an MLE | Did you try to compute the Fisher information? Get the second derivative of the Log Likelihood, multiply by -1, and take the reciprocal. Evaluate at the MLE . Asymptotically, this approximates the var | Computing the Variance of an MLE
Did you try to compute the Fisher information? Get the second derivative of the Log Likelihood, multiply by -1, and take the reciprocal. Evaluate at the MLE . Asymptotically, this approximates the variance of the MLE. | Computing the Variance of an MLE
Did you try to compute the Fisher information? Get the second derivative of the Log Likelihood, multiply by -1, and take the reciprocal. Evaluate at the MLE . Asymptotically, this approximates the var |
45,374 | Computing the Variance of an MLE | The Problem
Let $(X_1, \dots, X_n)$ denote a random sample of size $n$ drawn on
$$X \sim \text{PowerFunction}(\theta,1) \quad \text{ with pdf} \quad f(x) = \theta x^{\theta-1} \text{ where } \quad 0<x<1.$$
Let $Z = -\sum_{i=1}^{n}\ln(X_i). \quad$ Find: $\quad Var\big[\dfrac{n}{Z}\big]$
Solution
Let $Y = -ln(X)$. Then... | Computing the Variance of an MLE | The Problem
Let $(X_1, \dots, X_n)$ denote a random sample of size $n$ drawn on
$$X \sim \text{PowerFunction}(\theta,1) \quad \text{ with pdf} \quad f(x) = \theta x^{\theta-1} \text{ where } \quad 0< | Computing the Variance of an MLE
The Problem
Let $(X_1, \dots, X_n)$ denote a random sample of size $n$ drawn on
$$X \sim \text{PowerFunction}(\theta,1) \quad \text{ with pdf} \quad f(x) = \theta x^{\theta-1} \text{ where } \quad 0<x<1.$$
Let $Z = -\sum_{i=1}^{n}\ln(X_i). \quad$ Find: $\quad Var\big[\dfrac{n}{Z}\big]... | Computing the Variance of an MLE
The Problem
Let $(X_1, \dots, X_n)$ denote a random sample of size $n$ drawn on
$$X \sim \text{PowerFunction}(\theta,1) \quad \text{ with pdf} \quad f(x) = \theta x^{\theta-1} \text{ where } \quad 0< |
45,375 | Bonferroni correction on multiple Kruskal-Wallis tests | You would use the Bonferroni for a one-way test. But let's be clear:
You would not use the Bonferroni adjustment on the Kruskal-Wallis test itself. The Kruskal-Wallis test is an omnibus test, controlling for an overall false-positive rate.
You would use the Bonferroni for post hoc Dunn's pairwise tests. Indeed, Dunn in... | Bonferroni correction on multiple Kruskal-Wallis tests | You would use the Bonferroni for a one-way test. But let's be clear:
You would not use the Bonferroni adjustment on the Kruskal-Wallis test itself. The Kruskal-Wallis test is an omnibus test, controll | Bonferroni correction on multiple Kruskal-Wallis tests
You would use the Bonferroni for a one-way test. But let's be clear:
You would not use the Bonferroni adjustment on the Kruskal-Wallis test itself. The Kruskal-Wallis test is an omnibus test, controlling for an overall false-positive rate.
You would use the Bonferr... | Bonferroni correction on multiple Kruskal-Wallis tests
You would use the Bonferroni for a one-way test. But let's be clear:
You would not use the Bonferroni adjustment on the Kruskal-Wallis test itself. The Kruskal-Wallis test is an omnibus test, controll |
45,376 | How to tell if a mixture of Gaussians will be multimodal | I doubt you will find an explicit solution. The number of modes is the number of roots of the first derivative of the density function - which is quite messy - I am quite sure you can't find an explicit solution. | How to tell if a mixture of Gaussians will be multimodal | I doubt you will find an explicit solution. The number of modes is the number of roots of the first derivative of the density function - which is quite messy - I am quite sure you can't find an explic | How to tell if a mixture of Gaussians will be multimodal
I doubt you will find an explicit solution. The number of modes is the number of roots of the first derivative of the density function - which is quite messy - I am quite sure you can't find an explicit solution. | How to tell if a mixture of Gaussians will be multimodal
I doubt you will find an explicit solution. The number of modes is the number of roots of the first derivative of the density function - which is quite messy - I am quite sure you can't find an explic |
45,377 | How to tell if a mixture of Gaussians will be multimodal | Miguel Carrera-Perpinan has a webpage on this topic with associated software. This does not directly solve your question, but indicates that
unidimensional Gaussian mixtures with $k$ components have at most $k$ modes;
unidimensional non-Gaussian mixtures with $k$ components may have more than $k$ modes;
multidimensi... | How to tell if a mixture of Gaussians will be multimodal | Miguel Carrera-Perpinan has a webpage on this topic with associated software. This does not directly solve your question, but indicates that
unidimensional Gaussian mixtures with $k$ components have | How to tell if a mixture of Gaussians will be multimodal
Miguel Carrera-Perpinan has a webpage on this topic with associated software. This does not directly solve your question, but indicates that
unidimensional Gaussian mixtures with $k$ components have at most $k$ modes;
unidimensional non-Gaussian mixtures with ... | How to tell if a mixture of Gaussians will be multimodal
Miguel Carrera-Perpinan has a webpage on this topic with associated software. This does not directly solve your question, but indicates that
unidimensional Gaussian mixtures with $k$ components have |
45,378 | Transforming a variable when original variable does not have explantory power | This depends on if you are a purist, a pragmatist, or a data dredger.
The purist will only ever try one transformation, and that is based only on the science and previous knowledge and will be chosen before any data is collected (or looked at). This is the safest approach, but can also loose out on gaining insight f... | Transforming a variable when original variable does not have explantory power | This depends on if you are a purist, a pragmatist, or a data dredger.
The purist will only ever try one transformation, and that is based only on the science and previous knowledge and will be chose | Transforming a variable when original variable does not have explantory power
This depends on if you are a purist, a pragmatist, or a data dredger.
The purist will only ever try one transformation, and that is based only on the science and previous knowledge and will be chosen before any data is collected (or looked ... | Transforming a variable when original variable does not have explantory power
This depends on if you are a purist, a pragmatist, or a data dredger.
The purist will only ever try one transformation, and that is based only on the science and previous knowledge and will be chose |
45,379 | Transforming a variable when original variable does not have explantory power | It's a legitimate practice you are describing. As a matter of fact, having all variables linear is a simplification out of necessity. Usually, we don't know what is a true relationship between variables, so we model them linearly.
If you happen to know the relationships, often non-linear, then definitely go for it.
He... | Transforming a variable when original variable does not have explantory power | It's a legitimate practice you are describing. As a matter of fact, having all variables linear is a simplification out of necessity. Usually, we don't know what is a true relationship between variabl | Transforming a variable when original variable does not have explantory power
It's a legitimate practice you are describing. As a matter of fact, having all variables linear is a simplification out of necessity. Usually, we don't know what is a true relationship between variables, so we model them linearly.
If you happ... | Transforming a variable when original variable does not have explantory power
It's a legitimate practice you are describing. As a matter of fact, having all variables linear is a simplification out of necessity. Usually, we don't know what is a true relationship between variabl |
45,380 | Transforming a variable when original variable does not have explantory power | This is absolutely good practice! If the true relationship between your response and the explanatory variables is logarithmic then your model ought to reflect this. Of course, we never know for sure the nature of the true relationship so we do things like plot the data or fit the model in different ways (with and witho... | Transforming a variable when original variable does not have explantory power | This is absolutely good practice! If the true relationship between your response and the explanatory variables is logarithmic then your model ought to reflect this. Of course, we never know for sure t | Transforming a variable when original variable does not have explantory power
This is absolutely good practice! If the true relationship between your response and the explanatory variables is logarithmic then your model ought to reflect this. Of course, we never know for sure the nature of the true relationship so we d... | Transforming a variable when original variable does not have explantory power
This is absolutely good practice! If the true relationship between your response and the explanatory variables is logarithmic then your model ought to reflect this. Of course, we never know for sure t |
45,381 | Confidence intervals for maximum likelihood estimator with constraints | Your question is easy to answer if you are not too serious about $\theta_i\in[0,1]$. Is $\theta_i\in(0,1)$ good enough? Let's say it is. Then, instead of maximizing the likelihood function $L(\theta)$ in $\theta$, you are going to do a change of variables, and instead you maximize the likelihood function $L(\alpha)=... | Confidence intervals for maximum likelihood estimator with constraints | Your question is easy to answer if you are not too serious about $\theta_i\in[0,1]$. Is $\theta_i\in(0,1)$ good enough? Let's say it is. Then, instead of maximizing the likelihood function $L(\thet | Confidence intervals for maximum likelihood estimator with constraints
Your question is easy to answer if you are not too serious about $\theta_i\in[0,1]$. Is $\theta_i\in(0,1)$ good enough? Let's say it is. Then, instead of maximizing the likelihood function $L(\theta)$ in $\theta$, you are going to do a change of ... | Confidence intervals for maximum likelihood estimator with constraints
Your question is easy to answer if you are not too serious about $\theta_i\in[0,1]$. Is $\theta_i\in(0,1)$ good enough? Let's say it is. Then, instead of maximizing the likelihood function $L(\thet |
45,382 | Confidence intervals for maximum likelihood estimator with constraints | There are some regularity conditions on the theorem that tells us that the MLE is asymptotically normal (full details here: http://en.wikipedia.org/wiki/Maximum_likelihood#Asymptotic_normality). Notice the condition that says $f(x|θ) > 0$ and is twice continuously differentiable in $\theta$ in some neighborhood $N$ of ... | Confidence intervals for maximum likelihood estimator with constraints | There are some regularity conditions on the theorem that tells us that the MLE is asymptotically normal (full details here: http://en.wikipedia.org/wiki/Maximum_likelihood#Asymptotic_normality). Notic | Confidence intervals for maximum likelihood estimator with constraints
There are some regularity conditions on the theorem that tells us that the MLE is asymptotically normal (full details here: http://en.wikipedia.org/wiki/Maximum_likelihood#Asymptotic_normality). Notice the condition that says $f(x|θ) > 0$ and is twi... | Confidence intervals for maximum likelihood estimator with constraints
There are some regularity conditions on the theorem that tells us that the MLE is asymptotically normal (full details here: http://en.wikipedia.org/wiki/Maximum_likelihood#Asymptotic_normality). Notic |
45,383 | Diagonal elements of the inverted correlation matrix | Yes, it is true: the diagonal elements can never be less than unity.
By permuting the order of the variables, any diagonal element can be made to appear in the upper left corner, so it suffices to study that element. The statement is trivially true for $n=1$. For $n\gt 1$, any $n$ by $n$ correlation matrix can be wri... | Diagonal elements of the inverted correlation matrix | Yes, it is true: the diagonal elements can never be less than unity.
By permuting the order of the variables, any diagonal element can be made to appear in the upper left corner, so it suffices to stu | Diagonal elements of the inverted correlation matrix
Yes, it is true: the diagonal elements can never be less than unity.
By permuting the order of the variables, any diagonal element can be made to appear in the upper left corner, so it suffices to study that element. The statement is trivially true for $n=1$. For $... | Diagonal elements of the inverted correlation matrix
Yes, it is true: the diagonal elements can never be less than unity.
By permuting the order of the variables, any diagonal element can be made to appear in the upper left corner, so it suffices to stu |
45,384 | Which font to use in a plot to maximize clarity? | Contrary to your currently accepted answer, although obviously there is an artistic element to the design of quantitative graphics (as emphasized by The National Geographic), there do exist objective principles and good advice based on them. This is not wholly a "matter of personal preference."
Fine map-making is an ... | Which font to use in a plot to maximize clarity? | Contrary to your currently accepted answer, although obviously there is an artistic element to the design of quantitative graphics (as emphasized by The National Geographic), there do exist objective | Which font to use in a plot to maximize clarity?
Contrary to your currently accepted answer, although obviously there is an artistic element to the design of quantitative graphics (as emphasized by The National Geographic), there do exist objective principles and good advice based on them. This is not wholly a "matter... | Which font to use in a plot to maximize clarity?
Contrary to your currently accepted answer, although obviously there is an artistic element to the design of quantitative graphics (as emphasized by The National Geographic), there do exist objective |
45,385 | Which font to use in a plot to maximize clarity? | This thread covers the topic pretty well I think. One thing that has not been mentioned there however is Normschrift (German for "standard font"). It is a type of font that has been standardized in various DIN and ISO norms, and it completely removes any ambiguity from the letters and numbers. It's probably not the pre... | Which font to use in a plot to maximize clarity? | This thread covers the topic pretty well I think. One thing that has not been mentioned there however is Normschrift (German for "standard font"). It is a type of font that has been standardized in va | Which font to use in a plot to maximize clarity?
This thread covers the topic pretty well I think. One thing that has not been mentioned there however is Normschrift (German for "standard font"). It is a type of font that has been standardized in various DIN and ISO norms, and it completely removes any ambiguity from t... | Which font to use in a plot to maximize clarity?
This thread covers the topic pretty well I think. One thing that has not been mentioned there however is Normschrift (German for "standard font"). It is a type of font that has been standardized in va |
45,386 | Hierarchical or TwoStep cluster analysis for binary data? | 1) The tech support reply that you link to and which reads that hierarchical clustering is less appropriate for binary data than two-step clustering is, is incorrect for me.
It is true that when there is a substantial amount of distances between objects which are not of unique value ("tied" or "duplicate" distances) - ... | Hierarchical or TwoStep cluster analysis for binary data? | 1) The tech support reply that you link to and which reads that hierarchical clustering is less appropriate for binary data than two-step clustering is, is incorrect for me.
It is true that when there | Hierarchical or TwoStep cluster analysis for binary data?
1) The tech support reply that you link to and which reads that hierarchical clustering is less appropriate for binary data than two-step clustering is, is incorrect for me.
It is true that when there is a substantial amount of distances between objects which ar... | Hierarchical or TwoStep cluster analysis for binary data?
1) The tech support reply that you link to and which reads that hierarchical clustering is less appropriate for binary data than two-step clustering is, is incorrect for me.
It is true that when there |
45,387 | Numbers too large for R. How to approximate probability mass function? | Pretty much any decent stats package will provide a log-gamma or log-factorial function.
You mention R; it has:
lgamma which is the log of the gamma function
lfactorial which is the log of the factorial function
lchoose which is the log of the binomial coefficient.
using any of these, you can work out the log of the ... | Numbers too large for R. How to approximate probability mass function? | Pretty much any decent stats package will provide a log-gamma or log-factorial function.
You mention R; it has:
lgamma which is the log of the gamma function
lfactorial which is the log of the factor | Numbers too large for R. How to approximate probability mass function?
Pretty much any decent stats package will provide a log-gamma or log-factorial function.
You mention R; it has:
lgamma which is the log of the gamma function
lfactorial which is the log of the factorial function
lchoose which is the log of the bino... | Numbers too large for R. How to approximate probability mass function?
Pretty much any decent stats package will provide a log-gamma or log-factorial function.
You mention R; it has:
lgamma which is the log of the gamma function
lfactorial which is the log of the factor |
45,388 | Do mean, variance and median exist for a continuous random variable with continuous PDF over the real axis and a well defined CDF? | Since you already apparently answered your own question in respect of everything but the median, I'll address that.
[However, while the mean for the Cauchy is undefined, I'd contend that it's possible to argue that the variance of the Cauchy is infinity (while its usually given as undefined because the mean is undefin... | Do mean, variance and median exist for a continuous random variable with continuous PDF over the rea | Since you already apparently answered your own question in respect of everything but the median, I'll address that.
[However, while the mean for the Cauchy is undefined, I'd contend that it's possibl | Do mean, variance and median exist for a continuous random variable with continuous PDF over the real axis and a well defined CDF?
Since you already apparently answered your own question in respect of everything but the median, I'll address that.
[However, while the mean for the Cauchy is undefined, I'd contend that i... | Do mean, variance and median exist for a continuous random variable with continuous PDF over the rea
Since you already apparently answered your own question in respect of everything but the median, I'll address that.
[However, while the mean for the Cauchy is undefined, I'd contend that it's possibl |
45,389 | Name for combining related graphics | Stephen Few (unsuccessfully) addressed this issue in a 2007 article, Dashboard Confusion Revisited and suggested the term "faceted analytical display":
A “faceted analytical display” is a set of interactive charts
(primarily graphs and tables) that simultaneously reside on a single
screen, each of which presents... | Name for combining related graphics | Stephen Few (unsuccessfully) addressed this issue in a 2007 article, Dashboard Confusion Revisited and suggested the term "faceted analytical display":
A “faceted analytical display” is a set of inte | Name for combining related graphics
Stephen Few (unsuccessfully) addressed this issue in a 2007 article, Dashboard Confusion Revisited and suggested the term "faceted analytical display":
A “faceted analytical display” is a set of interactive charts
(primarily graphs and tables) that simultaneously reside on a sin... | Name for combining related graphics
Stephen Few (unsuccessfully) addressed this issue in a 2007 article, Dashboard Confusion Revisited and suggested the term "faceted analytical display":
A “faceted analytical display” is a set of inte |
45,390 | Name for combining related graphics | As I dug through Bertin (1983) on page 32 he describes a collection of a series of diagrams, tables, maps, etc. as a demonstrational unit.
...the graphic representation will lead to a series of diagrams, double-entry tables..., maps etc...at the moment of publication, the entire set of diagrams must be conceived as a ... | Name for combining related graphics | As I dug through Bertin (1983) on page 32 he describes a collection of a series of diagrams, tables, maps, etc. as a demonstrational unit.
...the graphic representation will lead to a series of diagr | Name for combining related graphics
As I dug through Bertin (1983) on page 32 he describes a collection of a series of diagrams, tables, maps, etc. as a demonstrational unit.
...the graphic representation will lead to a series of diagrams, double-entry tables..., maps etc...at the moment of publication, the entire set... | Name for combining related graphics
As I dug through Bertin (1983) on page 32 he describes a collection of a series of diagrams, tables, maps, etc. as a demonstrational unit.
...the graphic representation will lead to a series of diagr |
45,391 | Design of matrix of contrasts in R | Your last 2 contrasts are right, but the first 3 are wrong.
We can verify this by figuring out the linear combinations of coefficients that give each group mean, and then constructing the desired contrasts by adding and subtracting these linear combinations to form new ones that test the hypotheses you're interested in... | Design of matrix of contrasts in R | Your last 2 contrasts are right, but the first 3 are wrong.
We can verify this by figuring out the linear combinations of coefficients that give each group mean, and then constructing the desired cont | Design of matrix of contrasts in R
Your last 2 contrasts are right, but the first 3 are wrong.
We can verify this by figuring out the linear combinations of coefficients that give each group mean, and then constructing the desired contrasts by adding and subtracting these linear combinations to form new ones that test ... | Design of matrix of contrasts in R
Your last 2 contrasts are right, but the first 3 are wrong.
We can verify this by figuring out the linear combinations of coefficients that give each group mean, and then constructing the desired cont |
45,392 | What is the z-value of glm model parameters? | It is the test-statistic for the Wald-test that the parameter is 0. It is the parameter divided by the standard error. If the null-hypothesis is true (i.e. the parameter is 0 in the population) and we were to draw many samples from our population and compute the z-statistic in each of them, then those z-statistics will... | What is the z-value of glm model parameters? | It is the test-statistic for the Wald-test that the parameter is 0. It is the parameter divided by the standard error. If the null-hypothesis is true (i.e. the parameter is 0 in the population) and we | What is the z-value of glm model parameters?
It is the test-statistic for the Wald-test that the parameter is 0. It is the parameter divided by the standard error. If the null-hypothesis is true (i.e. the parameter is 0 in the population) and we were to draw many samples from our population and compute the z-statistic ... | What is the z-value of glm model parameters?
It is the test-statistic for the Wald-test that the parameter is 0. It is the parameter divided by the standard error. If the null-hypothesis is true (i.e. the parameter is 0 in the population) and we |
45,393 | High p-values for logistic regression variable that perfectly separates? | This is the well-known Hauck-Donner effect whereby standard errors of maximum likelihood estimates blow up. The basic idea is that as the separation becomes complete, the estimate of the standard error blows up faster than the estimate of the log odds ratio, rendering Wald $\chi^2$ statistics useless (and $P$-values l... | High p-values for logistic regression variable that perfectly separates? | This is the well-known Hauck-Donner effect whereby standard errors of maximum likelihood estimates blow up. The basic idea is that as the separation becomes complete, the estimate of the standard err | High p-values for logistic regression variable that perfectly separates?
This is the well-known Hauck-Donner effect whereby standard errors of maximum likelihood estimates blow up. The basic idea is that as the separation becomes complete, the estimate of the standard error blows up faster than the estimate of the log... | High p-values for logistic regression variable that perfectly separates?
This is the well-known Hauck-Donner effect whereby standard errors of maximum likelihood estimates blow up. The basic idea is that as the separation becomes complete, the estimate of the standard err |
45,394 | Imputation by regression in R [closed] | Even though this thread is a bit old, I am sure some people are still trying to find a solution in this thread. Therefore I want to add an example how you could use the mice package for regression imputation:
library("mice")
# Example data
data <- data.frame(x1 = c(1, 6, 15, 8, 5, 1, 7, 4),
x2 = c(2... | Imputation by regression in R [closed] | Even though this thread is a bit old, I am sure some people are still trying to find a solution in this thread. Therefore I want to add an example how you could use the mice package for regression imp | Imputation by regression in R [closed]
Even though this thread is a bit old, I am sure some people are still trying to find a solution in this thread. Therefore I want to add an example how you could use the mice package for regression imputation:
library("mice")
# Example data
data <- data.frame(x1 = c(1, 6, 15, 8, 5... | Imputation by regression in R [closed]
Even though this thread is a bit old, I am sure some people are still trying to find a solution in this thread. Therefore I want to add an example how you could use the mice package for regression imp |
45,395 | Entropy of Cauchy (Lorentz) Distribution | As shown at How does entropy depend on location and scale?, the integral is easily reduced (via an appropriate change of variable) to the case $\gamma=1$, for which
$$H = \int_{-\infty}^{\infty} \frac{\log(1+x^2)}{1+x^2}\,dx.$$
Letting $x=\tan(\theta)$ implies $dx = \sec^2(\theta)d\theta$ whence, since $1+\tan^2(\theta... | Entropy of Cauchy (Lorentz) Distribution | As shown at How does entropy depend on location and scale?, the integral is easily reduced (via an appropriate change of variable) to the case $\gamma=1$, for which
$$H = \int_{-\infty}^{\infty} \frac | Entropy of Cauchy (Lorentz) Distribution
As shown at How does entropy depend on location and scale?, the integral is easily reduced (via an appropriate change of variable) to the case $\gamma=1$, for which
$$H = \int_{-\infty}^{\infty} \frac{\log(1+x^2)}{1+x^2}\,dx.$$
Letting $x=\tan(\theta)$ implies $dx = \sec^2(\thet... | Entropy of Cauchy (Lorentz) Distribution
As shown at How does entropy depend on location and scale?, the integral is easily reduced (via an appropriate change of variable) to the case $\gamma=1$, for which
$$H = \int_{-\infty}^{\infty} \frac |
45,396 | Entropy of Cauchy (Lorentz) Distribution | This is not a full-scaled answer but just a modest extension of @whuber's answer.
If we take that $\gamma = 1$, so pdf of Cauchy distribution boils down to the following:
$$ p(x) = \frac {1} {\pi (1 + x^2)},$$
where $\pi$ is just a scaling factor (see the picture).
So, if we define differential entropy for valid pdf, ... | Entropy of Cauchy (Lorentz) Distribution | This is not a full-scaled answer but just a modest extension of @whuber's answer.
If we take that $\gamma = 1$, so pdf of Cauchy distribution boils down to the following:
$$ p(x) = \frac {1} {\pi (1 + | Entropy of Cauchy (Lorentz) Distribution
This is not a full-scaled answer but just a modest extension of @whuber's answer.
If we take that $\gamma = 1$, so pdf of Cauchy distribution boils down to the following:
$$ p(x) = \frac {1} {\pi (1 + x^2)},$$
where $\pi$ is just a scaling factor (see the picture).
So, if we de... | Entropy of Cauchy (Lorentz) Distribution
This is not a full-scaled answer but just a modest extension of @whuber's answer.
If we take that $\gamma = 1$, so pdf of Cauchy distribution boils down to the following:
$$ p(x) = \frac {1} {\pi (1 + |
45,397 | Multivariate regression with weighted least squares in python? | It's still not entirely clear to me what you want to do, but if your weights are 1d, you can (ab)use sm.WLS to do this.
import numpy as np
import statsmodels.api as sm
np.random.seed(12345)
N = 30
X = np.random.uniform(-20, 20, size=(N,10))
beta = np.random.randn(11)
X = sm.add_constant(X)
weights = np.random.unifor... | Multivariate regression with weighted least squares in python? | It's still not entirely clear to me what you want to do, but if your weights are 1d, you can (ab)use sm.WLS to do this.
import numpy as np
import statsmodels.api as sm
np.random.seed(12345)
N = 30
X | Multivariate regression with weighted least squares in python?
It's still not entirely clear to me what you want to do, but if your weights are 1d, you can (ab)use sm.WLS to do this.
import numpy as np
import statsmodels.api as sm
np.random.seed(12345)
N = 30
X = np.random.uniform(-20, 20, size=(N,10))
beta = np.rand... | Multivariate regression with weighted least squares in python?
It's still not entirely clear to me what you want to do, but if your weights are 1d, you can (ab)use sm.WLS to do this.
import numpy as np
import statsmodels.api as sm
np.random.seed(12345)
N = 30
X |
45,398 | Multivariate regression with weighted least squares in python? | In module sklearn, linear_model provides many regression functions, which will satisfy your demand.
For example, lasso.fit(X,y) where y has shape = (n_samples,) or (n_samples, n_targets). In your situation, n_targets = 2. | Multivariate regression with weighted least squares in python? | In module sklearn, linear_model provides many regression functions, which will satisfy your demand.
For example, lasso.fit(X,y) where y has shape = (n_samples,) or (n_samples, n_targets). In your sit | Multivariate regression with weighted least squares in python?
In module sklearn, linear_model provides many regression functions, which will satisfy your demand.
For example, lasso.fit(X,y) where y has shape = (n_samples,) or (n_samples, n_targets). In your situation, n_targets = 2. | Multivariate regression with weighted least squares in python?
In module sklearn, linear_model provides many regression functions, which will satisfy your demand.
For example, lasso.fit(X,y) where y has shape = (n_samples,) or (n_samples, n_targets). In your sit |
45,399 | Estimation issues for OLS with bounded response variable | Though I agree with Glen_b that rates like this are scaled counts, whether or not you want to use a count model depends on what the denominator in that scaled count is. If $y$ is something like the market share of Ford in the US, then the denominator is in the millions, and you should probably treat $y$ as continuous.... | Estimation issues for OLS with bounded response variable | Though I agree with Glen_b that rates like this are scaled counts, whether or not you want to use a count model depends on what the denominator in that scaled count is. If $y$ is something like the m | Estimation issues for OLS with bounded response variable
Though I agree with Glen_b that rates like this are scaled counts, whether or not you want to use a count model depends on what the denominator in that scaled count is. If $y$ is something like the market share of Ford in the US, then the denominator is in the m... | Estimation issues for OLS with bounded response variable
Though I agree with Glen_b that rates like this are scaled counts, whether or not you want to use a count model depends on what the denominator in that scaled count is. If $y$ is something like the m |
45,400 | Estimation issues for OLS with bounded response variable | Sample participation rates and pass rates are scaled counts.
You should not use OLS on bounded variables - they will be neither linear (straight lines are not even possible, except over limited ranges) nor will they have constant variance (also not even possible, except over limited ranges), and proper account should ... | Estimation issues for OLS with bounded response variable | Sample participation rates and pass rates are scaled counts.
You should not use OLS on bounded variables - they will be neither linear (straight lines are not even possible, except over limited range | Estimation issues for OLS with bounded response variable
Sample participation rates and pass rates are scaled counts.
You should not use OLS on bounded variables - they will be neither linear (straight lines are not even possible, except over limited ranges) nor will they have constant variance (also not even possible... | Estimation issues for OLS with bounded response variable
Sample participation rates and pass rates are scaled counts.
You should not use OLS on bounded variables - they will be neither linear (straight lines are not even possible, except over limited range |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.