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
46,701
Which variable relative importance method to use?
I prefer to compute the proportion of explainable log-likelihood that is explained by each variable. For OLS models the rms package makes this easy: f <- ols(y ~ x1 + x2 + pol(x3, 2) + rcs(x4, 5) + ...) plot(anova(f), what='proportion chisq') # also try what='proportion R2' The default for plot(anova()) is to display...
Which variable relative importance method to use?
I prefer to compute the proportion of explainable log-likelihood that is explained by each variable. For OLS models the rms package makes this easy: f <- ols(y ~ x1 + x2 + pol(x3, 2) + rcs(x4, 5) + .
Which variable relative importance method to use? I prefer to compute the proportion of explainable log-likelihood that is explained by each variable. For OLS models the rms package makes this easy: f <- ols(y ~ x1 + x2 + pol(x3, 2) + rcs(x4, 5) + ...) plot(anova(f), what='proportion chisq') # also try what='proportio...
Which variable relative importance method to use? I prefer to compute the proportion of explainable log-likelihood that is explained by each variable. For OLS models the rms package makes this easy: f <- ols(y ~ x1 + x2 + pol(x3, 2) + rcs(x4, 5) + .
46,702
KS-test - how is the p-value calculated?
This is a good question because while intuitively relatively straight-forward (ie. what is the chance that the value of the Kolmogorov-Smirnov D statistic would be as large or larger than observed?) the calculation of the said probability is not. First let me point that one should differentiate between two-sided and o...
KS-test - how is the p-value calculated?
This is a good question because while intuitively relatively straight-forward (ie. what is the chance that the value of the Kolmogorov-Smirnov D statistic would be as large or larger than observed?) t
KS-test - how is the p-value calculated? This is a good question because while intuitively relatively straight-forward (ie. what is the chance that the value of the Kolmogorov-Smirnov D statistic would be as large or larger than observed?) the calculation of the said probability is not. First let me point that one sho...
KS-test - how is the p-value calculated? This is a good question because while intuitively relatively straight-forward (ie. what is the chance that the value of the Kolmogorov-Smirnov D statistic would be as large or larger than observed?) t
46,703
What is the relationship between graphical models (such as in the Koller book) and the type of analysis you can do with pyMC?
The way I understand it, PGMs is a broad class including Markov Random Fields, Conditional Random Fields and Bayesian Networks (to name a few). PyMC works on Bayesian Networks (i.e. if the network can be represented as a Directed Acyclic Graph).
What is the relationship between graphical models (such as in the Koller book) and the type of analy
The way I understand it, PGMs is a broad class including Markov Random Fields, Conditional Random Fields and Bayesian Networks (to name a few). PyMC works on Bayesian Networks (i.e. if the network can
What is the relationship between graphical models (such as in the Koller book) and the type of analysis you can do with pyMC? The way I understand it, PGMs is a broad class including Markov Random Fields, Conditional Random Fields and Bayesian Networks (to name a few). PyMC works on Bayesian Networks (i.e. if the netwo...
What is the relationship between graphical models (such as in the Koller book) and the type of analy The way I understand it, PGMs is a broad class including Markov Random Fields, Conditional Random Fields and Bayesian Networks (to name a few). PyMC works on Bayesian Networks (i.e. if the network can
46,704
syntax for nls model with breakpoint
In general this is such a nasty problem that we shouldn't apply automatic optimizers like nls in R. However, it is easily solvable upon observing that the model is linear, and meets the assumptions of ordinary least squares (OLS) estimation, conditional upon the value of Thresh. Therefore you can search for solutions...
syntax for nls model with breakpoint
In general this is such a nasty problem that we shouldn't apply automatic optimizers like nls in R. However, it is easily solvable upon observing that the model is linear, and meets the assumptions o
syntax for nls model with breakpoint In general this is such a nasty problem that we shouldn't apply automatic optimizers like nls in R. However, it is easily solvable upon observing that the model is linear, and meets the assumptions of ordinary least squares (OLS) estimation, conditional upon the value of Thresh. T...
syntax for nls model with breakpoint In general this is such a nasty problem that we shouldn't apply automatic optimizers like nls in R. However, it is easily solvable upon observing that the model is linear, and meets the assumptions o
46,705
Variance reduction technique in Monte Carlo integration
All the theory you need $Z\sim F$, and you want to estimate $\mathrm{E}[Z]$. Let $\sigma^2=\mathrm{Var}[Z]<\infty$. Simple Monte Carlo Construct $X_1,X_2,\dots$ IID with $X_1\sim F$. Define $\bar{X}_n=\frac{1}{n}\sum_{i=1}^n X_i$. Result: $\mathrm{Var}[\bar{X}_n]=\sigma^2/n$. Strong Law: $\bar{X}_n\to\mathrm{E}[Z]$ a.s...
Variance reduction technique in Monte Carlo integration
All the theory you need $Z\sim F$, and you want to estimate $\mathrm{E}[Z]$. Let $\sigma^2=\mathrm{Var}[Z]<\infty$. Simple Monte Carlo Construct $X_1,X_2,\dots$ IID with $X_1\sim F$. Define $\bar{X}_n
Variance reduction technique in Monte Carlo integration All the theory you need $Z\sim F$, and you want to estimate $\mathrm{E}[Z]$. Let $\sigma^2=\mathrm{Var}[Z]<\infty$. Simple Monte Carlo Construct $X_1,X_2,\dots$ IID with $X_1\sim F$. Define $\bar{X}_n=\frac{1}{n}\sum_{i=1}^n X_i$. Result: $\mathrm{Var}[\bar{X}_n]=...
Variance reduction technique in Monte Carlo integration All the theory you need $Z\sim F$, and you want to estimate $\mathrm{E}[Z]$. Let $\sigma^2=\mathrm{Var}[Z]<\infty$. Simple Monte Carlo Construct $X_1,X_2,\dots$ IID with $X_1\sim F$. Define $\bar{X}_n
46,706
P values of coefficients in rlm robust regression
Even if it were correct to use a t-distribution for this calculation, you don't seem to be calculating p-values correctly. You seem to be calculating this: when you want this:
P values of coefficients in rlm robust regression
Even if it were correct to use a t-distribution for this calculation, you don't seem to be calculating p-values correctly. You seem to be calculating this: when you want this:
P values of coefficients in rlm robust regression Even if it were correct to use a t-distribution for this calculation, you don't seem to be calculating p-values correctly. You seem to be calculating this: when you want this:
P values of coefficients in rlm robust regression Even if it were correct to use a t-distribution for this calculation, you don't seem to be calculating p-values correctly. You seem to be calculating this: when you want this:
46,707
How to compute the PDF of a sum of bernoulli and normal variables analytically?
Compute the CDF of $X+N$ using convolution, then differentiate the result. The CDF of $X$ is $$F_X(x) = (1-p)\theta(x) + p\theta(x-1)$$ where $\theta$ is the Heaviside theta function (the indicator function of the nonnegative reals), $$\theta(x) = 1\text{ if }x \ge 0,\ 0\text{ otherwise}.$$ By definition, the CDF of $...
How to compute the PDF of a sum of bernoulli and normal variables analytically?
Compute the CDF of $X+N$ using convolution, then differentiate the result. The CDF of $X$ is $$F_X(x) = (1-p)\theta(x) + p\theta(x-1)$$ where $\theta$ is the Heaviside theta function (the indicator f
How to compute the PDF of a sum of bernoulli and normal variables analytically? Compute the CDF of $X+N$ using convolution, then differentiate the result. The CDF of $X$ is $$F_X(x) = (1-p)\theta(x) + p\theta(x-1)$$ where $\theta$ is the Heaviside theta function (the indicator function of the nonnegative reals), $$\th...
How to compute the PDF of a sum of bernoulli and normal variables analytically? Compute the CDF of $X+N$ using convolution, then differentiate the result. The CDF of $X$ is $$F_X(x) = (1-p)\theta(x) + p\theta(x-1)$$ where $\theta$ is the Heaviside theta function (the indicator f
46,708
How to compute the PDF of a sum of bernoulli and normal variables analytically?
$X$ is Bernoulli distributed with probability $p$. $N$ has mean zero and variance $\sigma^2$. So, with probability $1-p$, $Z=X+N$ has mean zero and variance $\sigma^2$ and with probability $p$ it has unit mean and variance $\sigma^2$. That looks like a mixture of Gaussians to me.
How to compute the PDF of a sum of bernoulli and normal variables analytically?
$X$ is Bernoulli distributed with probability $p$. $N$ has mean zero and variance $\sigma^2$. So, with probability $1-p$, $Z=X+N$ has mean zero and variance $\sigma^2$ and with probability $p$ it ha
How to compute the PDF of a sum of bernoulli and normal variables analytically? $X$ is Bernoulli distributed with probability $p$. $N$ has mean zero and variance $\sigma^2$. So, with probability $1-p$, $Z=X+N$ has mean zero and variance $\sigma^2$ and with probability $p$ it has unit mean and variance $\sigma^2$. Th...
How to compute the PDF of a sum of bernoulli and normal variables analytically? $X$ is Bernoulli distributed with probability $p$. $N$ has mean zero and variance $\sigma^2$. So, with probability $1-p$, $Z=X+N$ has mean zero and variance $\sigma^2$ and with probability $p$ it ha
46,709
Distribution of the quotient of two gamma random variables with different rate parameters?
If $X \sim Gamma(a,1)$ is independent of $Y \sim Gamma(b,1)$ then the ratio $X/Y$ has the Beta prime distribution with parameters $a$ and $b$. In fact, the result holds if you replace the common value of the rate parameter ($1$ here) by any other value, because the rate parameter has this property: if $X \sim Gamma(a,...
Distribution of the quotient of two gamma random variables with different rate parameters?
If $X \sim Gamma(a,1)$ is independent of $Y \sim Gamma(b,1)$ then the ratio $X/Y$ has the Beta prime distribution with parameters $a$ and $b$. In fact, the result holds if you replace the common valu
Distribution of the quotient of two gamma random variables with different rate parameters? If $X \sim Gamma(a,1)$ is independent of $Y \sim Gamma(b,1)$ then the ratio $X/Y$ has the Beta prime distribution with parameters $a$ and $b$. In fact, the result holds if you replace the common value of the rate parameter ($1$ ...
Distribution of the quotient of two gamma random variables with different rate parameters? If $X \sim Gamma(a,1)$ is independent of $Y \sim Gamma(b,1)$ then the ratio $X/Y$ has the Beta prime distribution with parameters $a$ and $b$. In fact, the result holds if you replace the common valu
46,710
Is it possible to recover original numbers of 2x2 table from odds ratio with given 95% confidence interval?
Short answer no, different margins can produce the same odd's ratio and confidence interval. Some examples to follow. Here is a brief sketch of how to find the minimum possible N for the table. Note that as per your linked site, the standard error can be related to the cell contents by: $$\text{SE} = \sqrt{\frac{1}{a}...
Is it possible to recover original numbers of 2x2 table from odds ratio with given 95% confidence in
Short answer no, different margins can produce the same odd's ratio and confidence interval. Some examples to follow. Here is a brief sketch of how to find the minimum possible N for the table. Note
Is it possible to recover original numbers of 2x2 table from odds ratio with given 95% confidence interval? Short answer no, different margins can produce the same odd's ratio and confidence interval. Some examples to follow. Here is a brief sketch of how to find the minimum possible N for the table. Note that as per ...
Is it possible to recover original numbers of 2x2 table from odds ratio with given 95% confidence in Short answer no, different margins can produce the same odd's ratio and confidence interval. Some examples to follow. Here is a brief sketch of how to find the minimum possible N for the table. Note
46,711
How can I get slope and standard error at several levels of a continuous by continuous interaction in R?
In order to examine simple slopes at different levels of one of the continuous variables, you can simply center the other continuous variable to focus on the slope of interest. In a model with a continuous by continuous interaction, like so: $$y = \beta_0 + \beta_1x_1 + \beta_2x_2 + \beta_3x_1*x_2$$ the two single pre...
How can I get slope and standard error at several levels of a continuous by continuous interaction i
In order to examine simple slopes at different levels of one of the continuous variables, you can simply center the other continuous variable to focus on the slope of interest. In a model with a conti
How can I get slope and standard error at several levels of a continuous by continuous interaction in R? In order to examine simple slopes at different levels of one of the continuous variables, you can simply center the other continuous variable to focus on the slope of interest. In a model with a continuous by contin...
How can I get slope and standard error at several levels of a continuous by continuous interaction i In order to examine simple slopes at different levels of one of the continuous variables, you can simply center the other continuous variable to focus on the slope of interest. In a model with a conti
46,712
How can I get slope and standard error at several levels of a continuous by continuous interaction in R?
While @wools answer appears more than adequate, here is another alternative that allows the calculation of marginal effect of x1 given x2, from a single model output without centering the x variables; According to http://statistics.ats.ucla.edu/stat/r/faq/concon.htm ; where the model is y ~ β0 + β1x1 + β2x2+ β3x1∗x2 th...
How can I get slope and standard error at several levels of a continuous by continuous interaction i
While @wools answer appears more than adequate, here is another alternative that allows the calculation of marginal effect of x1 given x2, from a single model output without centering the x variables;
How can I get slope and standard error at several levels of a continuous by continuous interaction in R? While @wools answer appears more than adequate, here is another alternative that allows the calculation of marginal effect of x1 given x2, from a single model output without centering the x variables; According to h...
How can I get slope and standard error at several levels of a continuous by continuous interaction i While @wools answer appears more than adequate, here is another alternative that allows the calculation of marginal effect of x1 given x2, from a single model output without centering the x variables;
46,713
Confusion in Gibbs sampling
Since I'm not sure where are you stuck at, I'll try multiple shots: Explanation 1: The thing is that you only need the form of the unnormalized posterior, and that is why it's enough if you can get: $$ p(\theta_1 | \theta_2, D) \propto p(\theta_1, \theta_2 | D) $$ The normalizing constant is not interesting, this is v...
Confusion in Gibbs sampling
Since I'm not sure where are you stuck at, I'll try multiple shots: Explanation 1: The thing is that you only need the form of the unnormalized posterior, and that is why it's enough if you can get:
Confusion in Gibbs sampling Since I'm not sure where are you stuck at, I'll try multiple shots: Explanation 1: The thing is that you only need the form of the unnormalized posterior, and that is why it's enough if you can get: $$ p(\theta_1 | \theta_2, D) \propto p(\theta_1, \theta_2 | D) $$ The normalizing constant i...
Confusion in Gibbs sampling Since I'm not sure where are you stuck at, I'll try multiple shots: Explanation 1: The thing is that you only need the form of the unnormalized posterior, and that is why it's enough if you can get:
46,714
Can the difference between the means of two groups lie outside the confidence interval for the difference?
It is possible for a confidence interval of a mean not to include the sample mean. It is not part of the definition of a CI that it must always cover the sample mean. Thus one may, in theory, construct a CI procedure that never covers the sample mean. But most people would consider that a bad procedure. Let us theref...
Can the difference between the means of two groups lie outside the confidence interval for the diffe
It is possible for a confidence interval of a mean not to include the sample mean. It is not part of the definition of a CI that it must always cover the sample mean. Thus one may, in theory, constru
Can the difference between the means of two groups lie outside the confidence interval for the difference? It is possible for a confidence interval of a mean not to include the sample mean. It is not part of the definition of a CI that it must always cover the sample mean. Thus one may, in theory, construct a CI proce...
Can the difference between the means of two groups lie outside the confidence interval for the diffe It is possible for a confidence interval of a mean not to include the sample mean. It is not part of the definition of a CI that it must always cover the sample mean. Thus one may, in theory, constru
46,715
Can the difference between the means of two groups lie outside the confidence interval for the difference?
Presumably, the confidence interval you are looking at is of the form $\bar{X}_1 - \bar{X}_2 \pm M$ where $M$ is some margin of error measure.This of course includes $\bar{X}_1 - \bar{X}_2$.
Can the difference between the means of two groups lie outside the confidence interval for the diffe
Presumably, the confidence interval you are looking at is of the form $\bar{X}_1 - \bar{X}_2 \pm M$ where $M$ is some margin of error measure.This of course includes $\bar{X}_1 - \bar{X}_2$.
Can the difference between the means of two groups lie outside the confidence interval for the difference? Presumably, the confidence interval you are looking at is of the form $\bar{X}_1 - \bar{X}_2 \pm M$ where $M$ is some margin of error measure.This of course includes $\bar{X}_1 - \bar{X}_2$.
Can the difference between the means of two groups lie outside the confidence interval for the diffe Presumably, the confidence interval you are looking at is of the form $\bar{X}_1 - \bar{X}_2 \pm M$ where $M$ is some margin of error measure.This of course includes $\bar{X}_1 - \bar{X}_2$.
46,716
Proper variable selection: Use only training data or full data?
The distinction here is between how to produce the final model for operational use and how to estimate the generalisation performance of that model. If we are to get an unbiased performance estimate, we must use a sample of data that has not been used to tune any aspect of the model, which includes any feature selectio...
Proper variable selection: Use only training data or full data?
The distinction here is between how to produce the final model for operational use and how to estimate the generalisation performance of that model. If we are to get an unbiased performance estimate,
Proper variable selection: Use only training data or full data? The distinction here is between how to produce the final model for operational use and how to estimate the generalisation performance of that model. If we are to get an unbiased performance estimate, we must use a sample of data that has not been used to t...
Proper variable selection: Use only training data or full data? The distinction here is between how to produce the final model for operational use and how to estimate the generalisation performance of that model. If we are to get an unbiased performance estimate,
46,717
Proper variable selection: Use only training data or full data?
Do everything on the training data. (See edit.) During model development, act like the test data do not exist. Consider how machine learning is used for products like Siri's speech recognition. The goal is to make a prediction about speech that Siri hasn't heard. In fact, that bit of sound has not even occurred. Engine...
Proper variable selection: Use only training data or full data?
Do everything on the training data. (See edit.) During model development, act like the test data do not exist. Consider how machine learning is used for products like Siri's speech recognition. The go
Proper variable selection: Use only training data or full data? Do everything on the training data. (See edit.) During model development, act like the test data do not exist. Consider how machine learning is used for products like Siri's speech recognition. The goal is to make a prediction about speech that Siri hasn't...
Proper variable selection: Use only training data or full data? Do everything on the training data. (See edit.) During model development, act like the test data do not exist. Consider how machine learning is used for products like Siri's speech recognition. The go
46,718
What does it mean to say that "a topic is a distribution on words"?
Typically, in the context of Latent Dirichlet Allocation (used for Topic Modeling), we assume that the documents come from a generative process. I'll avoid math notation. Look at this figure: (1) Every topic is generated from a Dirichlet distribution of $V$ dimensions where $V$ is the size of your vocabulary. (2) For...
What does it mean to say that "a topic is a distribution on words"?
Typically, in the context of Latent Dirichlet Allocation (used for Topic Modeling), we assume that the documents come from a generative process. I'll avoid math notation. Look at this figure: (1) Ev
What does it mean to say that "a topic is a distribution on words"? Typically, in the context of Latent Dirichlet Allocation (used for Topic Modeling), we assume that the documents come from a generative process. I'll avoid math notation. Look at this figure: (1) Every topic is generated from a Dirichlet distribution...
What does it mean to say that "a topic is a distribution on words"? Typically, in the context of Latent Dirichlet Allocation (used for Topic Modeling), we assume that the documents come from a generative process. I'll avoid math notation. Look at this figure: (1) Ev
46,719
Relationship between Poisson generation and generalized Kullback-Leibler divergence
I worked it out in the end and I'll link to it here, in case someone else is interested. I wrote it up here http://building-babylon.net/2015/02/17/maximum-likelihood-estimation-for-non-negative-matrix-factorisation-and-the-generalised-kullback-leibler-divergence/
Relationship between Poisson generation and generalized Kullback-Leibler divergence
I worked it out in the end and I'll link to it here, in case someone else is interested. I wrote it up here http://building-babylon.net/2015/02/17/maximum-likelihood-estimation-for-non-negative-matri
Relationship between Poisson generation and generalized Kullback-Leibler divergence I worked it out in the end and I'll link to it here, in case someone else is interested. I wrote it up here http://building-babylon.net/2015/02/17/maximum-likelihood-estimation-for-non-negative-matrix-factorisation-and-the-generalised-...
Relationship between Poisson generation and generalized Kullback-Leibler divergence I worked it out in the end and I'll link to it here, in case someone else is interested. I wrote it up here http://building-babylon.net/2015/02/17/maximum-likelihood-estimation-for-non-negative-matri
46,720
Relationship between Poisson generation and generalized Kullback-Leibler divergence
We want to proof that \begin{align} argmin_{W,H} \qquad D_{KL}(\boldsymbol{V} | \boldsymbol {WH}) \quad = \quad argmax_{W,H} \qquad p(\boldsymbol{V} | \boldsymbol{W}\boldsymbol{H}) \end{align} under a Poisson distribution. The KL divergence (actually the I-divergence) is defined as \begin{align} D_{KL}(\boldsymbol{V} |...
Relationship between Poisson generation and generalized Kullback-Leibler divergence
We want to proof that \begin{align} argmin_{W,H} \qquad D_{KL}(\boldsymbol{V} | \boldsymbol {WH}) \quad = \quad argmax_{W,H} \qquad p(\boldsymbol{V} | \boldsymbol{W}\boldsymbol{H}) \end{align} under a
Relationship between Poisson generation and generalized Kullback-Leibler divergence We want to proof that \begin{align} argmin_{W,H} \qquad D_{KL}(\boldsymbol{V} | \boldsymbol {WH}) \quad = \quad argmax_{W,H} \qquad p(\boldsymbol{V} | \boldsymbol{W}\boldsymbol{H}) \end{align} under a Poisson distribution. The KL diverg...
Relationship between Poisson generation and generalized Kullback-Leibler divergence We want to proof that \begin{align} argmin_{W,H} \qquad D_{KL}(\boldsymbol{V} | \boldsymbol {WH}) \quad = \quad argmax_{W,H} \qquad p(\boldsymbol{V} | \boldsymbol{W}\boldsymbol{H}) \end{align} under a
46,721
What is the limiting distribution of exponential variates modulo 1?
By definition, the law of $X_n - \lfloor X_n\rfloor$ is $$F_n(x) = \Pr(X_n - \lfloor X_n\rfloor \le x)$$ for $0 \le x \lt 1$. The event $E^{(n)}: X_n - \lfloor X_n\rfloor \le x$ is a countable union of the disjoint events $E^{(n)}_i: i \le X_n \le i + x$ for $i=0, 1, 2, \ldots$. Therefore (because probability is cou...
What is the limiting distribution of exponential variates modulo 1?
By definition, the law of $X_n - \lfloor X_n\rfloor$ is $$F_n(x) = \Pr(X_n - \lfloor X_n\rfloor \le x)$$ for $0 \le x \lt 1$. The event $E^{(n)}: X_n - \lfloor X_n\rfloor \le x$ is a countable union
What is the limiting distribution of exponential variates modulo 1? By definition, the law of $X_n - \lfloor X_n\rfloor$ is $$F_n(x) = \Pr(X_n - \lfloor X_n\rfloor \le x)$$ for $0 \le x \lt 1$. The event $E^{(n)}: X_n - \lfloor X_n\rfloor \le x$ is a countable union of the disjoint events $E^{(n)}_i: i \le X_n \le i ...
What is the limiting distribution of exponential variates modulo 1? By definition, the law of $X_n - \lfloor X_n\rfloor$ is $$F_n(x) = \Pr(X_n - \lfloor X_n\rfloor \le x)$$ for $0 \le x \lt 1$. The event $E^{(n)}: X_n - \lfloor X_n\rfloor \le x$ is a countable union
46,722
Overdispersed poisson or negative binomial regression
Instead of overdispersed (or quasi-)poisson regression you can use the NB1 distribution, which has the same linear variance function as ODP and a full-fledged likelihood function instead of the quasilikelihood of ODP. NB1 is implemented in the gamlss package as family=NBII, whereas regular Negative Binomial can be call...
Overdispersed poisson or negative binomial regression
Instead of overdispersed (or quasi-)poisson regression you can use the NB1 distribution, which has the same linear variance function as ODP and a full-fledged likelihood function instead of the quasil
Overdispersed poisson or negative binomial regression Instead of overdispersed (or quasi-)poisson regression you can use the NB1 distribution, which has the same linear variance function as ODP and a full-fledged likelihood function instead of the quasilikelihood of ODP. NB1 is implemented in the gamlss package as fami...
Overdispersed poisson or negative binomial regression Instead of overdispersed (or quasi-)poisson regression you can use the NB1 distribution, which has the same linear variance function as ODP and a full-fledged likelihood function instead of the quasil
46,723
Overdispersed poisson or negative binomial regression
I am not sure exactly what is meant by "in standard R" but if you are open to downloading packages, I believe the pscl package's vuong function may do what you want. It implements a model comparison test that is designed specifically to compare non-nested models; it can compare nested ones as well, but there are more f...
Overdispersed poisson or negative binomial regression
I am not sure exactly what is meant by "in standard R" but if you are open to downloading packages, I believe the pscl package's vuong function may do what you want. It implements a model comparison t
Overdispersed poisson or negative binomial regression I am not sure exactly what is meant by "in standard R" but if you are open to downloading packages, I believe the pscl package's vuong function may do what you want. It implements a model comparison test that is designed specifically to compare non-nested models; it...
Overdispersed poisson or negative binomial regression I am not sure exactly what is meant by "in standard R" but if you are open to downloading packages, I believe the pscl package's vuong function may do what you want. It implements a model comparison t
46,724
How to measure co-adaptation occuring in a multi-layer perceptron neural network that does not use a drop out?
I would argue that non-identity covariance in the hidden layer activations is one form of "co-adaptation." To compute the hidden layer covariance, just take your trained MLP and find a stack of data. Run the data through the MLP until you compute the activations for the hidden layer of interest: $$ H = \sigma(WX + B) $...
How to measure co-adaptation occuring in a multi-layer perceptron neural network that does not use a
I would argue that non-identity covariance in the hidden layer activations is one form of "co-adaptation." To compute the hidden layer covariance, just take your trained MLP and find a stack of data.
How to measure co-adaptation occuring in a multi-layer perceptron neural network that does not use a drop out? I would argue that non-identity covariance in the hidden layer activations is one form of "co-adaptation." To compute the hidden layer covariance, just take your trained MLP and find a stack of data. Run the d...
How to measure co-adaptation occuring in a multi-layer perceptron neural network that does not use a I would argue that non-identity covariance in the hidden layer activations is one form of "co-adaptation." To compute the hidden layer covariance, just take your trained MLP and find a stack of data.
46,725
In practice, why do we convert categorical class labels to integers for classification
Scikit learn only handles real numbers I believe. So you need to do something like one hot encoding where n numerical dimensions are used to represent membership in the categories. If you just pass in strings they'll get cast to floats in unpredictable ways. There are mathematical reasons some methods (like svm) need f...
In practice, why do we convert categorical class labels to integers for classification
Scikit learn only handles real numbers I believe. So you need to do something like one hot encoding where n numerical dimensions are used to represent membership in the categories. If you just pass in
In practice, why do we convert categorical class labels to integers for classification Scikit learn only handles real numbers I believe. So you need to do something like one hot encoding where n numerical dimensions are used to represent membership in the categories. If you just pass in strings they'll get cast to floa...
In practice, why do we convert categorical class labels to integers for classification Scikit learn only handles real numbers I believe. So you need to do something like one hot encoding where n numerical dimensions are used to represent membership in the categories. If you just pass in
46,726
In practice, why do we convert categorical class labels to integers for classification
For binary classification you usually use 0/1 or -1/1. Due to symmetry it does not matter which label corresponds to which class. For multiclass classification e.g. for 3-class classification you cannot use 0, 1 and 2 because this way of labeling implies an order (I am not familiar with Iris dataset though) and canno...
In practice, why do we convert categorical class labels to integers for classification
For binary classification you usually use 0/1 or -1/1. Due to symmetry it does not matter which label corresponds to which class. For multiclass classification e.g. for 3-class classification you ca
In practice, why do we convert categorical class labels to integers for classification For binary classification you usually use 0/1 or -1/1. Due to symmetry it does not matter which label corresponds to which class. For multiclass classification e.g. for 3-class classification you cannot use 0, 1 and 2 because this ...
In practice, why do we convert categorical class labels to integers for classification For binary classification you usually use 0/1 or -1/1. Due to symmetry it does not matter which label corresponds to which class. For multiclass classification e.g. for 3-class classification you ca
46,727
In practice, why do we convert categorical class labels to integers for classification
It's just a matter of being practical. For binary classification the simplest way is using booleans, for multiclass it's integers. Most back-end libraries are written in statically typed languages (C/C++), and typically use the most basic type that gets the job done without losing information.
In practice, why do we convert categorical class labels to integers for classification
It's just a matter of being practical. For binary classification the simplest way is using booleans, for multiclass it's integers. Most back-end libraries are written in statically typed languages (C/
In practice, why do we convert categorical class labels to integers for classification It's just a matter of being practical. For binary classification the simplest way is using booleans, for multiclass it's integers. Most back-end libraries are written in statically typed languages (C/C++), and typically use the most ...
In practice, why do we convert categorical class labels to integers for classification It's just a matter of being practical. For binary classification the simplest way is using booleans, for multiclass it's integers. Most back-end libraries are written in statically typed languages (C/
46,728
In practice, why do we convert categorical class labels to integers for classification
Some algorithms can handle only numerical inputs, this might be main reason although storage is other reason. Of course some algorithms can do conversion implicitly.
In practice, why do we convert categorical class labels to integers for classification
Some algorithms can handle only numerical inputs, this might be main reason although storage is other reason. Of course some algorithms can do conversion implicitly.
In practice, why do we convert categorical class labels to integers for classification Some algorithms can handle only numerical inputs, this might be main reason although storage is other reason. Of course some algorithms can do conversion implicitly.
In practice, why do we convert categorical class labels to integers for classification Some algorithms can handle only numerical inputs, this might be main reason although storage is other reason. Of course some algorithms can do conversion implicitly.
46,729
In practice, why do we convert categorical class labels to integers for classification
There are few algorithms that by default take care of basic label encoding. But as a developer, you need to make sure that the data which is being passed to the model, is correct representation of reality present in data. For e.g. if your data has column 'Engineer's Role' then Senior > Junior > Fresher. In this case y...
In practice, why do we convert categorical class labels to integers for classification
There are few algorithms that by default take care of basic label encoding. But as a developer, you need to make sure that the data which is being passed to the model, is correct representation of re
In practice, why do we convert categorical class labels to integers for classification There are few algorithms that by default take care of basic label encoding. But as a developer, you need to make sure that the data which is being passed to the model, is correct representation of reality present in data. For e.g. i...
In practice, why do we convert categorical class labels to integers for classification There are few algorithms that by default take care of basic label encoding. But as a developer, you need to make sure that the data which is being passed to the model, is correct representation of re
46,730
Kernel density estimation vs. machine learning for forecasting in large samples
(First off, I'd consider kernel density estimation a form of a machine learning model, so that's a strange dichotomy to make. But anyway.) If you really do have enough samples to do good density estimation, then the Bayes classifier formed via KDE, or its regression analogue the Nadaraya-Watson model, converges to the ...
Kernel density estimation vs. machine learning for forecasting in large samples
(First off, I'd consider kernel density estimation a form of a machine learning model, so that's a strange dichotomy to make. But anyway.) If you really do have enough samples to do good density estim
Kernel density estimation vs. machine learning for forecasting in large samples (First off, I'd consider kernel density estimation a form of a machine learning model, so that's a strange dichotomy to make. But anyway.) If you really do have enough samples to do good density estimation, then the Bayes classifier formed ...
Kernel density estimation vs. machine learning for forecasting in large samples (First off, I'd consider kernel density estimation a form of a machine learning model, so that's a strange dichotomy to make. But anyway.) If you really do have enough samples to do good density estim
46,731
Kernel density estimation vs. machine learning for forecasting in large samples
From your statement, The ultimate goal is forecasting new realizations of $y$ given new realizations of $x$'s. , this already suggests that you want to do regression. I would go for (B). That is to estimate $\mathbb{E}[y | x]$. I am not so sure what you plan to use KDE on. I definitely will not use it to model the d...
Kernel density estimation vs. machine learning for forecasting in large samples
From your statement, The ultimate goal is forecasting new realizations of $y$ given new realizations of $x$'s. , this already suggests that you want to do regression. I would go for (B). That is to
Kernel density estimation vs. machine learning for forecasting in large samples From your statement, The ultimate goal is forecasting new realizations of $y$ given new realizations of $x$'s. , this already suggests that you want to do regression. I would go for (B). That is to estimate $\mathbb{E}[y | x]$. I am not ...
Kernel density estimation vs. machine learning for forecasting in large samples From your statement, The ultimate goal is forecasting new realizations of $y$ given new realizations of $x$'s. , this already suggests that you want to do regression. I would go for (B). That is to
46,732
Why is the Confidence Interval Changing for this Time-Series
These are irregularly spaced data, there are even more than one observations at a certain time points (e.g. 2 observations at times 8.8, 15.6, 15.8, 6 observations at time 14.6, 4 observations at time 15.4). These are the number of observations at each time: table(mcycle[,1]) # 2.4 2.6 3.2 3.6 4 6.2 6.6 6.8 ...
Why is the Confidence Interval Changing for this Time-Series
These are irregularly spaced data, there are even more than one observations at a certain time points (e.g. 2 observations at times 8.8, 15.6, 15.8, 6 observations at time 14.6, 4 observations at tim
Why is the Confidence Interval Changing for this Time-Series These are irregularly spaced data, there are even more than one observations at a certain time points (e.g. 2 observations at times 8.8, 15.6, 15.8, 6 observations at time 14.6, 4 observations at time 15.4). These are the number of observations at each time:...
Why is the Confidence Interval Changing for this Time-Series These are irregularly spaced data, there are even more than one observations at a certain time points (e.g. 2 observations at times 8.8, 15.6, 15.8, 6 observations at time 14.6, 4 observations at tim
46,733
Maximum Likelihood Estimation of Dirichlet Mean
Suppose $\mathbf p_1, \ldots, \mathbf p_n$ are iid $\operatorname{Dirichlet}(s \mathbf m)$. If I'm understanding you correctly, your question is "why use an iterative scheme when $\hat {\mathbf m} = \frac 1 N \sum_{i = 1} ^ N \mathbf p_i$ works?" You are correct that this is a reasonable estimator. But it isn't the max...
Maximum Likelihood Estimation of Dirichlet Mean
Suppose $\mathbf p_1, \ldots, \mathbf p_n$ are iid $\operatorname{Dirichlet}(s \mathbf m)$. If I'm understanding you correctly, your question is "why use an iterative scheme when $\hat {\mathbf m} = \
Maximum Likelihood Estimation of Dirichlet Mean Suppose $\mathbf p_1, \ldots, \mathbf p_n$ are iid $\operatorname{Dirichlet}(s \mathbf m)$. If I'm understanding you correctly, your question is "why use an iterative scheme when $\hat {\mathbf m} = \frac 1 N \sum_{i = 1} ^ N \mathbf p_i$ works?" You are correct that this...
Maximum Likelihood Estimation of Dirichlet Mean Suppose $\mathbf p_1, \ldots, \mathbf p_n$ are iid $\operatorname{Dirichlet}(s \mathbf m)$. If I'm understanding you correctly, your question is "why use an iterative scheme when $\hat {\mathbf m} = \
46,734
Extension of Median to big data integer distributions?
The trimmed mean is, from where you are starting, one generalisation of the median. If you trim (meaning, ignore rather than drop) 3 values in each tail of an ordered sample of 7 then you get the median; if you trim 0 values, then you get the mean. For small samples, thinking in terms of number trimmed is natural. Here...
Extension of Median to big data integer distributions?
The trimmed mean is, from where you are starting, one generalisation of the median. If you trim (meaning, ignore rather than drop) 3 values in each tail of an ordered sample of 7 then you get the medi
Extension of Median to big data integer distributions? The trimmed mean is, from where you are starting, one generalisation of the median. If you trim (meaning, ignore rather than drop) 3 values in each tail of an ordered sample of 7 then you get the median; if you trim 0 values, then you get the mean. For small sample...
Extension of Median to big data integer distributions? The trimmed mean is, from where you are starting, one generalisation of the median. If you trim (meaning, ignore rather than drop) 3 values in each tail of an ordered sample of 7 then you get the medi
46,735
Extension of Median to big data integer distributions?
I disagree with your characterization of B median as "upper 2", because its mean is 16/7=2.29. You alluded to the fact that you didn't like mean for the distribution is skewed, so characterizing the median as "upper 2" would be inconsistent with the sample mean. Mean of sample A is 1.71. Hence, the the central tendency...
Extension of Median to big data integer distributions?
I disagree with your characterization of B median as "upper 2", because its mean is 16/7=2.29. You alluded to the fact that you didn't like mean for the distribution is skewed, so characterizing the m
Extension of Median to big data integer distributions? I disagree with your characterization of B median as "upper 2", because its mean is 16/7=2.29. You alluded to the fact that you didn't like mean for the distribution is skewed, so characterizing the median as "upper 2" would be inconsistent with the sample mean. Me...
Extension of Median to big data integer distributions? I disagree with your characterization of B median as "upper 2", because its mean is 16/7=2.29. You alluded to the fact that you didn't like mean for the distribution is skewed, so characterizing the m
46,736
When to use offset() in negative binomial/poisson GLMs in R
1) What is the best way of determining when to use neg. binom. vs. poisson? A common way (not necessarily the best --- what's 'best' depends on your criteria for bestness) to decide this would be to see if there's overdispersion in a Poisson model (e.g. by looking at the residual deviance. For example, look at summar...
When to use offset() in negative binomial/poisson GLMs in R
1) What is the best way of determining when to use neg. binom. vs. poisson? A common way (not necessarily the best --- what's 'best' depends on your criteria for bestness) to decide this would be to
When to use offset() in negative binomial/poisson GLMs in R 1) What is the best way of determining when to use neg. binom. vs. poisson? A common way (not necessarily the best --- what's 'best' depends on your criteria for bestness) to decide this would be to see if there's overdispersion in a Poisson model (e.g. by l...
When to use offset() in negative binomial/poisson GLMs in R 1) What is the best way of determining when to use neg. binom. vs. poisson? A common way (not necessarily the best --- what's 'best' depends on your criteria for bestness) to decide this would be to
46,737
When to use offset() in negative binomial/poisson GLMs in R
What is the best way of determining when to use negative binomial vs. Poisson? Answer: Poisson GLMs assume the mean and variance of the response variable are approximately equal. Overdispersion can occur when this assumption is not met; variance in the data is naturally larger than the mean....
When to use offset() in negative binomial/poisson GLMs in R
What is the best way of determining when to use negative binomial vs. Poisson? Answer: Poisson GLMs assume the mean and variance of the response variable are approximately equal. Overdisp
When to use offset() in negative binomial/poisson GLMs in R What is the best way of determining when to use negative binomial vs. Poisson? Answer: Poisson GLMs assume the mean and variance of the response variable are approximately equal. Overdispersion can occur when this assumption is not met; var...
When to use offset() in negative binomial/poisson GLMs in R What is the best way of determining when to use negative binomial vs. Poisson? Answer: Poisson GLMs assume the mean and variance of the response variable are approximately equal. Overdisp
46,738
Clustering data into bins of variable sizes
A dynamic program to minimize the sum of group variances subject to these constraints is simple and reasonably fast, especially for such a narrow range of group sizes. It reproduces the posted solution. The data are plotted as point symbols. The groups are color-coded and separated by vertical lines. Group means ar...
Clustering data into bins of variable sizes
A dynamic program to minimize the sum of group variances subject to these constraints is simple and reasonably fast, especially for such a narrow range of group sizes. It reproduces the posted soluti
Clustering data into bins of variable sizes A dynamic program to minimize the sum of group variances subject to these constraints is simple and reasonably fast, especially for such a narrow range of group sizes. It reproduces the posted solution. The data are plotted as point symbols. The groups are color-coded and ...
Clustering data into bins of variable sizes A dynamic program to minimize the sum of group variances subject to these constraints is simple and reasonably fast, especially for such a narrow range of group sizes. It reproduces the posted soluti
46,739
Confusion in regression function derivation
I'm not sure all that effort by Zhanxiong was necessary. Just expand $$E_{Y|X}([Y-c]^2) = E_{Y|X}Y^2 - 2cE_{Y|X}Y + c^2$$ and note that $c = E_{Y|X}Y$ minimizes the expression (derivative, square completion)...
Confusion in regression function derivation
I'm not sure all that effort by Zhanxiong was necessary. Just expand $$E_{Y|X}([Y-c]^2) = E_{Y|X}Y^2 - 2cE_{Y|X}Y + c^2$$ and note that $c = E_{Y|X}Y$ minimizes the expression (derivative, square comp
Confusion in regression function derivation I'm not sure all that effort by Zhanxiong was necessary. Just expand $$E_{Y|X}([Y-c]^2) = E_{Y|X}Y^2 - 2cE_{Y|X}Y + c^2$$ and note that $c = E_{Y|X}Y$ minimizes the expression (derivative, square completion)...
Confusion in regression function derivation I'm not sure all that effort by Zhanxiong was necessary. Just expand $$E_{Y|X}([Y-c]^2) = E_{Y|X}Y^2 - 2cE_{Y|X}Y + c^2$$ and note that $c = E_{Y|X}Y$ minimizes the expression (derivative, square comp
46,740
Confusion in regression function derivation
This can be shown by a classical method used everywhere related to least squares estimation and conditional expectation. Let $f(x) = E(Y|X = x)$, then write: $$E_{Y|X}[(Y - c)^2|X = x] = E_{Y|X}[(Y - f(x) + f(x) - c)^2|X = x]$$ Expand the complete square and show that the cross product term is 0 as follows: $$E_{Y|X}[(...
Confusion in regression function derivation
This can be shown by a classical method used everywhere related to least squares estimation and conditional expectation. Let $f(x) = E(Y|X = x)$, then write: $$E_{Y|X}[(Y - c)^2|X = x] = E_{Y|X}[(Y -
Confusion in regression function derivation This can be shown by a classical method used everywhere related to least squares estimation and conditional expectation. Let $f(x) = E(Y|X = x)$, then write: $$E_{Y|X}[(Y - c)^2|X = x] = E_{Y|X}[(Y - f(x) + f(x) - c)^2|X = x]$$ Expand the complete square and show that the cro...
Confusion in regression function derivation This can be shown by a classical method used everywhere related to least squares estimation and conditional expectation. Let $f(x) = E(Y|X = x)$, then write: $$E_{Y|X}[(Y - c)^2|X = x] = E_{Y|X}[(Y -
46,741
How do you evaluate a generative model?
Discriminative algorithms model P(Class|variables), whereas generative algorithms model P(Class,variables) = P(Class|variables)* P(variables). Hence, by modelling the joint distribution of the variable space, generative algorithms model the underlying process that 'created' your data. My point in starting with this f...
How do you evaluate a generative model?
Discriminative algorithms model P(Class|variables), whereas generative algorithms model P(Class,variables) = P(Class|variables)* P(variables). Hence, by modelling the joint distribution of the variabl
How do you evaluate a generative model? Discriminative algorithms model P(Class|variables), whereas generative algorithms model P(Class,variables) = P(Class|variables)* P(variables). Hence, by modelling the joint distribution of the variable space, generative algorithms model the underlying process that 'created' your ...
How do you evaluate a generative model? Discriminative algorithms model P(Class|variables), whereas generative algorithms model P(Class,variables) = P(Class|variables)* P(variables). Hence, by modelling the joint distribution of the variabl
46,742
Binary classification in imbalanced data
A few general strategies: First and foremost, in imbalanced classification problems you want to do stratified cross-validation. This allows you to train your models with the same distribution in your samples. Second, you should probably use Cohen's Kappa metric when tuning your models. It is better in imbalanced s...
Binary classification in imbalanced data
A few general strategies: First and foremost, in imbalanced classification problems you want to do stratified cross-validation. This allows you to train your models with the same distribution in you
Binary classification in imbalanced data A few general strategies: First and foremost, in imbalanced classification problems you want to do stratified cross-validation. This allows you to train your models with the same distribution in your samples. Second, you should probably use Cohen's Kappa metric when tuning y...
Binary classification in imbalanced data A few general strategies: First and foremost, in imbalanced classification problems you want to do stratified cross-validation. This allows you to train your models with the same distribution in you
46,743
Binary classification in imbalanced data
I have faced the same problem trying to predict a single emotion in the RAVDESS dataset. The thing that helped me is: to provide the model with the initial bias and weights; in this way, the model takes care of the class differences through data. You can setup good initialization bias as follows $$ b_0 = \log_e\left(\t...
Binary classification in imbalanced data
I have faced the same problem trying to predict a single emotion in the RAVDESS dataset. The thing that helped me is: to provide the model with the initial bias and weights; in this way, the model tak
Binary classification in imbalanced data I have faced the same problem trying to predict a single emotion in the RAVDESS dataset. The thing that helped me is: to provide the model with the initial bias and weights; in this way, the model takes care of the class differences through data. You can setup good initializatio...
Binary classification in imbalanced data I have faced the same problem trying to predict a single emotion in the RAVDESS dataset. The thing that helped me is: to provide the model with the initial bias and weights; in this way, the model tak
46,744
Binary classification in imbalanced data
if you use SVM , you can assign param class_weight=balanced => weights will be taken into consideration by classifier when training (look sklearn docs) if you want to make threshold different than 0.5. => you can move threshold - THE WAY: if you think false positives are worse than false negatives - you can take this...
Binary classification in imbalanced data
if you use SVM , you can assign param class_weight=balanced => weights will be taken into consideration by classifier when training (look sklearn docs) if you want to make threshold different than 0.
Binary classification in imbalanced data if you use SVM , you can assign param class_weight=balanced => weights will be taken into consideration by classifier when training (look sklearn docs) if you want to make threshold different than 0.5. => you can move threshold - THE WAY: if you think false positives are worse...
Binary classification in imbalanced data if you use SVM , you can assign param class_weight=balanced => weights will be taken into consideration by classifier when training (look sklearn docs) if you want to make threshold different than 0.
46,745
Binary classification in imbalanced data
I'd like to answer the actual question ask : "does it make sense to apply specific strategies ?" 80:20 can be interpreted as not so imbalanced data. It depends on the accuracy of your model. If you final model had an accuracy of 99.9%, then please, do not do anything to balance it, your model already find everything. ...
Binary classification in imbalanced data
I'd like to answer the actual question ask : "does it make sense to apply specific strategies ?" 80:20 can be interpreted as not so imbalanced data. It depends on the accuracy of your model. If you f
Binary classification in imbalanced data I'd like to answer the actual question ask : "does it make sense to apply specific strategies ?" 80:20 can be interpreted as not so imbalanced data. It depends on the accuracy of your model. If you final model had an accuracy of 99.9%, then please, do not do anything to balance...
Binary classification in imbalanced data I'd like to answer the actual question ask : "does it make sense to apply specific strategies ?" 80:20 can be interpreted as not so imbalanced data. It depends on the accuracy of your model. If you f
46,746
What to do when rejecting a proposed point in MCMC?
The validation of the Metropolis-Hastings algorithm relies on repeating the current value in the Markov chain if the proposed value is rejected. You should not consider the list of accepted points as your sample but instead the Markov chain with transition \begin{align*} X_{t+1} &= Y_{t+1} \quad&\text{if } U_{t+1}\le \...
What to do when rejecting a proposed point in MCMC?
The validation of the Metropolis-Hastings algorithm relies on repeating the current value in the Markov chain if the proposed value is rejected. You should not consider the list of accepted points as
What to do when rejecting a proposed point in MCMC? The validation of the Metropolis-Hastings algorithm relies on repeating the current value in the Markov chain if the proposed value is rejected. You should not consider the list of accepted points as your sample but instead the Markov chain with transition \begin{alig...
What to do when rejecting a proposed point in MCMC? The validation of the Metropolis-Hastings algorithm relies on repeating the current value in the Markov chain if the proposed value is rejected. You should not consider the list of accepted points as
46,747
Standardized coefficients for linear models with numeric and factor variables in multiple linear regression using scale() function in R
I'm not sure that standardized coefficients make much sense when you have dummy variables. The idea of a standardized coefficient is that it puts the units of the predictor variable into a form that we understand. I have a sense of what a standard deviation is, whereas if I don't know what time is (or know if its meas...
Standardized coefficients for linear models with numeric and factor variables in multiple linear reg
I'm not sure that standardized coefficients make much sense when you have dummy variables. The idea of a standardized coefficient is that it puts the units of the predictor variable into a form that
Standardized coefficients for linear models with numeric and factor variables in multiple linear regression using scale() function in R I'm not sure that standardized coefficients make much sense when you have dummy variables. The idea of a standardized coefficient is that it puts the units of the predictor variable i...
Standardized coefficients for linear models with numeric and factor variables in multiple linear reg I'm not sure that standardized coefficients make much sense when you have dummy variables. The idea of a standardized coefficient is that it puts the units of the predictor variable into a form that
46,748
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"?
The usual way to investigate the power properties is via a power curve (or sometimes, power surface, if we want to investigate the response to varying two things at once). On these curves, the y-variable is the rejection rate and the x-value has the particular value of the thing we're varying. The most common type of p...
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"?
The usual way to investigate the power properties is via a power curve (or sometimes, power surface, if we want to investigate the response to varying two things at once). On these curves, the y-varia
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"? The usual way to investigate the power properties is via a power curve (or sometimes, power surface, if we want to investigate the response to varying two things at once). On these curves, the y-variable is the rejection rate and the x-...
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"? The usual way to investigate the power properties is via a power curve (or sometimes, power surface, if we want to investigate the response to varying two things at once). On these curves, the y-varia
46,749
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"?
First, a critical part of power calculation is missing from your description: the "non-zero parameter" from which you simulated your data. The power will depends on this parameter as well. There are 4 parts in power/sample size calculation. The sample size $n$, the power $\beta$, the significance level $\alpha$, the t...
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"?
First, a critical part of power calculation is missing from your description: the "non-zero parameter" from which you simulated your data. The power will depends on this parameter as well. There are
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"? First, a critical part of power calculation is missing from your description: the "non-zero parameter" from which you simulated your data. The power will depends on this parameter as well. There are 4 parts in power/sample size calcula...
Empirical rejection rate of a wrong null hypothesis -is it the "power of the test"? First, a critical part of power calculation is missing from your description: the "non-zero parameter" from which you simulated your data. The power will depends on this parameter as well. There are
46,750
Paired samples t-test using a structural equation modeling approach
Many statistical tests can be thought of as structural equation models, and one of those is the paired samples t-test. As you say, the advantage of the SEM approach is that you can use FIML estimation - which is asymptotically equivalent to multiple imputation, but can be easier. You estimate a parameter which represe...
Paired samples t-test using a structural equation modeling approach
Many statistical tests can be thought of as structural equation models, and one of those is the paired samples t-test. As you say, the advantage of the SEM approach is that you can use FIML estimatio
Paired samples t-test using a structural equation modeling approach Many statistical tests can be thought of as structural equation models, and one of those is the paired samples t-test. As you say, the advantage of the SEM approach is that you can use FIML estimation - which is asymptotically equivalent to multiple i...
Paired samples t-test using a structural equation modeling approach Many statistical tests can be thought of as structural equation models, and one of those is the paired samples t-test. As you say, the advantage of the SEM approach is that you can use FIML estimatio
46,751
log-rank test in R
The examples provided in ?survdiff are pretty clear. Using some example data included in survival, this survdiff(Surv(futime, fustat) ~ rx,data=ovarian) Is testing for a difference in survival between individuals with rx = 1 and rx = 2. For your data, this will compare survival for males versus females survdiff(Surv(t...
log-rank test in R
The examples provided in ?survdiff are pretty clear. Using some example data included in survival, this survdiff(Surv(futime, fustat) ~ rx,data=ovarian) Is testing for a difference in survival betwee
log-rank test in R The examples provided in ?survdiff are pretty clear. Using some example data included in survival, this survdiff(Surv(futime, fustat) ~ rx,data=ovarian) Is testing for a difference in survival between individuals with rx = 1 and rx = 2. For your data, this will compare survival for males versus fema...
log-rank test in R The examples provided in ?survdiff are pretty clear. Using some example data included in survival, this survdiff(Surv(futime, fustat) ~ rx,data=ovarian) Is testing for a difference in survival betwee
46,752
log-rank test in R
It doesn't look right. If you want to limit the analysis to just males or females, the sex==1 or sex==2 is a separate input, the subset clause. The new commands would be Males<-survdiff(surv(time,Status)~Patients, data = myeloma, sex==1) Females<-survdiff(surv(time,Status)~Patients, data = myeloma, sex==2) You need t...
log-rank test in R
It doesn't look right. If you want to limit the analysis to just males or females, the sex==1 or sex==2 is a separate input, the subset clause. The new commands would be Males<-survdiff(surv(time,Stat
log-rank test in R It doesn't look right. If you want to limit the analysis to just males or females, the sex==1 or sex==2 is a separate input, the subset clause. The new commands would be Males<-survdiff(surv(time,Status)~Patients, data = myeloma, sex==1) Females<-survdiff(surv(time,Status)~Patients, data = myeloma, ...
log-rank test in R It doesn't look right. If you want to limit the analysis to just males or females, the sex==1 or sex==2 is a separate input, the subset clause. The new commands would be Males<-survdiff(surv(time,Stat
46,753
Test that two normal distributions have same standard deviation
1) The approach you suggest won't have the null distribution of an actual Kolmogorov-Smirnov-statistic. You could actually do that procedure to compute a test statistic, but to find the p-value you'd have to find the distribution of the resulting test statistic (probably by simulation), or perhaps perform a permutation...
Test that two normal distributions have same standard deviation
1) The approach you suggest won't have the null distribution of an actual Kolmogorov-Smirnov-statistic. You could actually do that procedure to compute a test statistic, but to find the p-value you'd
Test that two normal distributions have same standard deviation 1) The approach you suggest won't have the null distribution of an actual Kolmogorov-Smirnov-statistic. You could actually do that procedure to compute a test statistic, but to find the p-value you'd have to find the distribution of the resulting test stat...
Test that two normal distributions have same standard deviation 1) The approach you suggest won't have the null distribution of an actual Kolmogorov-Smirnov-statistic. You could actually do that procedure to compute a test statistic, but to find the p-value you'd
46,754
Distribution function of maximum of n iid standard uniform random variables where n is poisson distributed
The calculations in the question look correct, but care is needed because the distribution of $V_\mu$ is not continuous. (I will use $\mu$ instead of $m$ throughout.) From first definitions we may find the distribution function (CDF) of $V_\mu$ is $$F_\mu(x) = \Pr(V_\mu) \le x) = \sum_{n=0}^\infty x^n \Pr(N_\mu = n) =...
Distribution function of maximum of n iid standard uniform random variables where n is poisson distr
The calculations in the question look correct, but care is needed because the distribution of $V_\mu$ is not continuous. (I will use $\mu$ instead of $m$ throughout.) From first definitions we may fi
Distribution function of maximum of n iid standard uniform random variables where n is poisson distributed The calculations in the question look correct, but care is needed because the distribution of $V_\mu$ is not continuous. (I will use $\mu$ instead of $m$ throughout.) From first definitions we may find the distri...
Distribution function of maximum of n iid standard uniform random variables where n is poisson distr The calculations in the question look correct, but care is needed because the distribution of $V_\mu$ is not continuous. (I will use $\mu$ instead of $m$ throughout.) From first definitions we may fi
46,755
Distribution function of maximum of n iid standard uniform random variables where n is poisson distributed
notice that since this continous you want to find CDF so going off what you had we have $$P(V_{m}<x)=\sum_{n=0}^{\infty}P(V_{m}<x|N_{m}=n)f_{N}(n)=\sum_{n=0}^{\infty}e^{-m}\frac{(xm)^{n}}{n!}=e^{-m}e^{xm}=e^{m(x-1)}$$
Distribution function of maximum of n iid standard uniform random variables where n is poisson distr
notice that since this continous you want to find CDF so going off what you had we have $$P(V_{m}<x)=\sum_{n=0}^{\infty}P(V_{m}<x|N_{m}=n)f_{N}(n)=\sum_{n=0}^{\infty}e^{-m}\frac{(xm)^{n}}{n!}=e^{-m}e
Distribution function of maximum of n iid standard uniform random variables where n is poisson distributed notice that since this continous you want to find CDF so going off what you had we have $$P(V_{m}<x)=\sum_{n=0}^{\infty}P(V_{m}<x|N_{m}=n)f_{N}(n)=\sum_{n=0}^{\infty}e^{-m}\frac{(xm)^{n}}{n!}=e^{-m}e^{xm}=e^{m(x-...
Distribution function of maximum of n iid standard uniform random variables where n is poisson distr notice that since this continous you want to find CDF so going off what you had we have $$P(V_{m}<x)=\sum_{n=0}^{\infty}P(V_{m}<x|N_{m}=n)f_{N}(n)=\sum_{n=0}^{\infty}e^{-m}\frac{(xm)^{n}}{n!}=e^{-m}e
46,756
Clustering binary categorical data
A simple approach is to fit a mixture of "Naive Bayes" models using EM. The structure of the mixture model is $P(x_{i1},\ldots,x_{in}) = \sum_k P(y_i=k) \prod_j P(x_{ij}|y_i=k)$. Here, $i$ indexes the data points, each of which is a vector of $n$ binary features. $y_i$ is the index of the cluster to which data point $i...
Clustering binary categorical data
A simple approach is to fit a mixture of "Naive Bayes" models using EM. The structure of the mixture model is $P(x_{i1},\ldots,x_{in}) = \sum_k P(y_i=k) \prod_j P(x_{ij}|y_i=k)$. Here, $i$ indexes the
Clustering binary categorical data A simple approach is to fit a mixture of "Naive Bayes" models using EM. The structure of the mixture model is $P(x_{i1},\ldots,x_{in}) = \sum_k P(y_i=k) \prod_j P(x_{ij}|y_i=k)$. Here, $i$ indexes the data points, each of which is a vector of $n$ binary features. $y_i$ is the index of...
Clustering binary categorical data A simple approach is to fit a mixture of "Naive Bayes" models using EM. The structure of the mixture model is $P(x_{i1},\ldots,x_{in}) = \sum_k P(y_i=k) \prod_j P(x_{ij}|y_i=k)$. Here, $i$ indexes the
46,757
Clustering binary categorical data
What is your similarity? First try to figure out what a meaningful similarity function is for your use case. This is very much use case dependant, so there is no one-size-fits-all solution. Once you have a working notion of similarity, try hierarchical clustering or DBSCAN with this similarity. Note that having a worki...
Clustering binary categorical data
What is your similarity? First try to figure out what a meaningful similarity function is for your use case. This is very much use case dependant, so there is no one-size-fits-all solution. Once you h
Clustering binary categorical data What is your similarity? First try to figure out what a meaningful similarity function is for your use case. This is very much use case dependant, so there is no one-size-fits-all solution. Once you have a working notion of similarity, try hierarchical clustering or DBSCAN with this s...
Clustering binary categorical data What is your similarity? First try to figure out what a meaningful similarity function is for your use case. This is very much use case dependant, so there is no one-size-fits-all solution. Once you h
46,758
Clustering binary categorical data
Affinity propagation clustering could be an interesting method for you to try. But it is more important to pick a binary metric that matches you requirements. If you have an appropriate similarity metric, it would also be helpful to visualize the data with MDS methods (or non-linear dimensionality reduction) in 2D or 3...
Clustering binary categorical data
Affinity propagation clustering could be an interesting method for you to try. But it is more important to pick a binary metric that matches you requirements. If you have an appropriate similarity met
Clustering binary categorical data Affinity propagation clustering could be an interesting method for you to try. But it is more important to pick a binary metric that matches you requirements. If you have an appropriate similarity metric, it would also be helpful to visualize the data with MDS methods (or non-linear d...
Clustering binary categorical data Affinity propagation clustering could be an interesting method for you to try. But it is more important to pick a binary metric that matches you requirements. If you have an appropriate similarity met
46,759
Clustering binary categorical data
I used hierarchical clustering with cosine distance for a similar problem and it worked well. If they have no services in common the distance will be 1. If they have exacltly the same services the distance will be 0.
Clustering binary categorical data
I used hierarchical clustering with cosine distance for a similar problem and it worked well. If they have no services in common the distance will be 1. If they have exacltly the same services the dis
Clustering binary categorical data I used hierarchical clustering with cosine distance for a similar problem and it worked well. If they have no services in common the distance will be 1. If they have exacltly the same services the distance will be 0.
Clustering binary categorical data I used hierarchical clustering with cosine distance for a similar problem and it worked well. If they have no services in common the distance will be 1. If they have exacltly the same services the dis
46,760
Can First Differencing Cause Negative Serial Correlation
Short answer is yes, differencing will introduce a negative autocorrelation into the differenced series in most situations. Assuming a mean centered variable to make the notation a bit simpler, the covariance between the differenced series can be represented as: $$Cov(\Delta X_t,\Delta X_{t-1}) = E[\Delta X_t \cdot \De...
Can First Differencing Cause Negative Serial Correlation
Short answer is yes, differencing will introduce a negative autocorrelation into the differenced series in most situations. Assuming a mean centered variable to make the notation a bit simpler, the co
Can First Differencing Cause Negative Serial Correlation Short answer is yes, differencing will introduce a negative autocorrelation into the differenced series in most situations. Assuming a mean centered variable to make the notation a bit simpler, the covariance between the differenced series can be represented as: ...
Can First Differencing Cause Negative Serial Correlation Short answer is yes, differencing will introduce a negative autocorrelation into the differenced series in most situations. Assuming a mean centered variable to make the notation a bit simpler, the co
46,761
Latent Dirichlet Allocation in PyMC
When defining w, the p parameter must be a list of doubles, not a list of lists of doubles. This means you have to define a w variable for each word in each document. Also it helps to 'complete' the Dirichlet variables using the CompletedDirichlet function. Here is the working code: import numpy as np import pymc as...
Latent Dirichlet Allocation in PyMC
When defining w, the p parameter must be a list of doubles, not a list of lists of doubles. This means you have to define a w variable for each word in each document. Also it helps to 'complete' the
Latent Dirichlet Allocation in PyMC When defining w, the p parameter must be a list of doubles, not a list of lists of doubles. This means you have to define a w variable for each word in each document. Also it helps to 'complete' the Dirichlet variables using the CompletedDirichlet function. Here is the working cod...
Latent Dirichlet Allocation in PyMC When defining w, the p parameter must be a list of doubles, not a list of lists of doubles. This means you have to define a w variable for each word in each document. Also it helps to 'complete' the
46,762
Best feature selection method for naive Bayes classification
There are two different routes you can take. The key word is 'relevance', and how you interpret it. 1) You can use a Chi-Squared test or Mutual information for feature relevance extraction as explained in detail on this link. In a nutshell, Mutual information measures how much information the presence or absence of ...
Best feature selection method for naive Bayes classification
There are two different routes you can take. The key word is 'relevance', and how you interpret it. 1) You can use a Chi-Squared test or Mutual information for feature relevance extraction as explain
Best feature selection method for naive Bayes classification There are two different routes you can take. The key word is 'relevance', and how you interpret it. 1) You can use a Chi-Squared test or Mutual information for feature relevance extraction as explained in detail on this link. In a nutshell, Mutual informat...
Best feature selection method for naive Bayes classification There are two different routes you can take. The key word is 'relevance', and how you interpret it. 1) You can use a Chi-Squared test or Mutual information for feature relevance extraction as explain
46,763
Best feature selection method for naive Bayes classification
The R package caret (**C**lassification **A**nd **R**Egression **T**raining) has built-in feature selection tools and supports naive Bayes. I figured I'd post this as an answer instead of a comment because I'm more confident about this one, having used it myself in the past.
Best feature selection method for naive Bayes classification
The R package caret (**C**lassification **A**nd **R**Egression **T**raining) has built-in feature selection tools and supports naive Bayes. I figured I'd post this as an answer instead of a comment be
Best feature selection method for naive Bayes classification The R package caret (**C**lassification **A**nd **R**Egression **T**raining) has built-in feature selection tools and supports naive Bayes. I figured I'd post this as an answer instead of a comment because I'm more confident about this one, having used it mys...
Best feature selection method for naive Bayes classification The R package caret (**C**lassification **A**nd **R**Egression **T**raining) has built-in feature selection tools and supports naive Bayes. I figured I'd post this as an answer instead of a comment be
46,764
Limiting expression for Power law tail index from a quantile function?
From the Chain Rule, $$1 = \frac{d}{dq}\left(q\right) = \frac{d}{dq}\left(F(Q(q))\right) = F^\prime(Q(q)) Q^\prime(q).$$ Letting $0 \lt q \lt 1$, substituting $z = Q(q)$ into the limiting expression for $\alpha$, and solving the preceding equation for $F^\prime(Q(q))$ in terms of $Q^\prime(q)$ gives $$\alpha = \lim_{z\...
Limiting expression for Power law tail index from a quantile function?
From the Chain Rule, $$1 = \frac{d}{dq}\left(q\right) = \frac{d}{dq}\left(F(Q(q))\right) = F^\prime(Q(q)) Q^\prime(q).$$ Letting $0 \lt q \lt 1$, substituting $z = Q(q)$ into the limiting expression f
Limiting expression for Power law tail index from a quantile function? From the Chain Rule, $$1 = \frac{d}{dq}\left(q\right) = \frac{d}{dq}\left(F(Q(q))\right) = F^\prime(Q(q)) Q^\prime(q).$$ Letting $0 \lt q \lt 1$, substituting $z = Q(q)$ into the limiting expression for $\alpha$, and solving the preceding equation f...
Limiting expression for Power law tail index from a quantile function? From the Chain Rule, $$1 = \frac{d}{dq}\left(q\right) = \frac{d}{dq}\left(F(Q(q))\right) = F^\prime(Q(q)) Q^\prime(q).$$ Letting $0 \lt q \lt 1$, substituting $z = Q(q)$ into the limiting expression f
46,765
Heteroscedasticity in residuals vs. fitted plot
Your response variable isn't really continuous. It is presumably discrete (you can't buy .5 ounces, and moreover, beers only come in certain ounce sizes). In addition, no one can buy less than 0 ounces (you can clearly see the floor effect in your top--untransformed--residual plot). As a result, using an OLS regress...
Heteroscedasticity in residuals vs. fitted plot
Your response variable isn't really continuous. It is presumably discrete (you can't buy .5 ounces, and moreover, beers only come in certain ounce sizes). In addition, no one can buy less than 0 oun
Heteroscedasticity in residuals vs. fitted plot Your response variable isn't really continuous. It is presumably discrete (you can't buy .5 ounces, and moreover, beers only come in certain ounce sizes). In addition, no one can buy less than 0 ounces (you can clearly see the floor effect in your top--untransformed--re...
Heteroscedasticity in residuals vs. fitted plot Your response variable isn't really continuous. It is presumably discrete (you can't buy .5 ounces, and moreover, beers only come in certain ounce sizes). In addition, no one can buy less than 0 oun
46,766
Heteroscedasticity in residuals vs. fitted plot
Not only is your variable apparently discrete it clearly shows lack of fit at the left and right ends Discreteness (red arrows) and lack of fit (green ellipses) apparent in residual plot. You can't properly assess heteroskedasticity with a test statistic that assumes that the model for the mean is correct ... when it ...
Heteroscedasticity in residuals vs. fitted plot
Not only is your variable apparently discrete it clearly shows lack of fit at the left and right ends Discreteness (red arrows) and lack of fit (green ellipses) apparent in residual plot. You can't p
Heteroscedasticity in residuals vs. fitted plot Not only is your variable apparently discrete it clearly shows lack of fit at the left and right ends Discreteness (red arrows) and lack of fit (green ellipses) apparent in residual plot. You can't properly assess heteroskedasticity with a test statistic that assumes tha...
Heteroscedasticity in residuals vs. fitted plot Not only is your variable apparently discrete it clearly shows lack of fit at the left and right ends Discreteness (red arrows) and lack of fit (green ellipses) apparent in residual plot. You can't p
46,767
ordinal regression or Spearman correlation?
Yes, CBS sounds ordinal. If you're only interested in comparing bivariate relationships, comparison of Spearman's $\rho$s seems fair enough to me. However, an ordinal regression model would allow you to estimate the independent relationships of BMI and stature while controlling the effects of each other predictor. You ...
ordinal regression or Spearman correlation?
Yes, CBS sounds ordinal. If you're only interested in comparing bivariate relationships, comparison of Spearman's $\rho$s seems fair enough to me. However, an ordinal regression model would allow you
ordinal regression or Spearman correlation? Yes, CBS sounds ordinal. If you're only interested in comparing bivariate relationships, comparison of Spearman's $\rho$s seems fair enough to me. However, an ordinal regression model would allow you to estimate the independent relationships of BMI and stature while controlli...
ordinal regression or Spearman correlation? Yes, CBS sounds ordinal. If you're only interested in comparing bivariate relationships, comparison of Spearman's $\rho$s seems fair enough to me. However, an ordinal regression model would allow you
46,768
Can ICC values be negative?
You might want to read the original paper to get a sense of what your ICC statistic is doing, how it is constructed and what it means. Apparently, the ICC can go negative, since the numerator involves a difference between two quantities. It probably means that you should use a different measure. I would estimate the be...
Can ICC values be negative?
You might want to read the original paper to get a sense of what your ICC statistic is doing, how it is constructed and what it means. Apparently, the ICC can go negative, since the numerator involves
Can ICC values be negative? You might want to read the original paper to get a sense of what your ICC statistic is doing, how it is constructed and what it means. Apparently, the ICC can go negative, since the numerator involves a difference between two quantities. It probably means that you should use a different meas...
Can ICC values be negative? You might want to read the original paper to get a sense of what your ICC statistic is doing, how it is constructed and what it means. Apparently, the ICC can go negative, since the numerator involves
46,769
How to learn the points inside a square with its boundary?
Your specification of the square as having sides parallel to the boundary makes the problem relatively straightforward - as long as you don't require it to be written as a single SVM, but can settle for something like it. One very simple estimate of the boundary of the square is for those points which have $+1$ labels ...
How to learn the points inside a square with its boundary?
Your specification of the square as having sides parallel to the boundary makes the problem relatively straightforward - as long as you don't require it to be written as a single SVM, but can settle f
How to learn the points inside a square with its boundary? Your specification of the square as having sides parallel to the boundary makes the problem relatively straightforward - as long as you don't require it to be written as a single SVM, but can settle for something like it. One very simple estimate of the boundar...
How to learn the points inside a square with its boundary? Your specification of the square as having sides parallel to the boundary makes the problem relatively straightforward - as long as you don't require it to be written as a single SVM, but can settle f
46,770
How to learn the points inside a square with its boundary?
SVM is a linear classifier which means that it can only learn to decide which side of a straight line the points should go. To make a square you obviously need four straight lines. So the short answer is no a linear SVM can not learn a square. However, you can apply a kernel function to your data to map it into a highe...
How to learn the points inside a square with its boundary?
SVM is a linear classifier which means that it can only learn to decide which side of a straight line the points should go. To make a square you obviously need four straight lines. So the short answer
How to learn the points inside a square with its boundary? SVM is a linear classifier which means that it can only learn to decide which side of a straight line the points should go. To make a square you obviously need four straight lines. So the short answer is no a linear SVM can not learn a square. However, you can ...
How to learn the points inside a square with its boundary? SVM is a linear classifier which means that it can only learn to decide which side of a straight line the points should go. To make a square you obviously need four straight lines. So the short answer
46,771
Alternatives to bag-of-words based classifiers for text classification?
I suggest two alternatives, that have been extensively used in Text Classification: Using Latent Semantic Indexing, which consists of applying Singular Value Decomposition to the DocumentXTerm matrix in order to identify relevant (concept) components, or in other words, aims to group words into classes that represent ...
Alternatives to bag-of-words based classifiers for text classification?
I suggest two alternatives, that have been extensively used in Text Classification: Using Latent Semantic Indexing, which consists of applying Singular Value Decomposition to the DocumentXTerm matrix
Alternatives to bag-of-words based classifiers for text classification? I suggest two alternatives, that have been extensively used in Text Classification: Using Latent Semantic Indexing, which consists of applying Singular Value Decomposition to the DocumentXTerm matrix in order to identify relevant (concept) compone...
Alternatives to bag-of-words based classifiers for text classification? I suggest two alternatives, that have been extensively used in Text Classification: Using Latent Semantic Indexing, which consists of applying Singular Value Decomposition to the DocumentXTerm matrix
46,772
Alternatives to bag-of-words based classifiers for text classification?
The continuous word representation using Neural Networks is widely used to represent words. Surprisingly, it has the ability to model the semantic context of words, i.e. detect similar words and put them near together in feature space. You can use the word2vect tool to process a large text corpus and create word vecto...
Alternatives to bag-of-words based classifiers for text classification?
The continuous word representation using Neural Networks is widely used to represent words. Surprisingly, it has the ability to model the semantic context of words, i.e. detect similar words and put t
Alternatives to bag-of-words based classifiers for text classification? The continuous word representation using Neural Networks is widely used to represent words. Surprisingly, it has the ability to model the semantic context of words, i.e. detect similar words and put them near together in feature space. You can use...
Alternatives to bag-of-words based classifiers for text classification? The continuous word representation using Neural Networks is widely used to represent words. Surprisingly, it has the ability to model the semantic context of words, i.e. detect similar words and put t
46,773
Alternatives to bag-of-words based classifiers for text classification?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. You should take a look at log-linear models; it's defi...
Alternatives to bag-of-words based classifiers for text classification?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Alternatives to bag-of-words based classifiers for text classification? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. ...
Alternatives to bag-of-words based classifiers for text classification? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
46,774
Alternatives to bag-of-words based classifiers for text classification?
API models exist which can achieve this. https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K It takes an array of categories or "bag of words" and a text string to analyze. It then returns a sorted percentage of relevance for this provided keywords. Input Data { "text": "this bank provides...
Alternatives to bag-of-words based classifiers for text classification?
API models exist which can achieve this. https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K It takes an array of categories or "bag of words" and a text string to analyze. It
Alternatives to bag-of-words based classifiers for text classification? API models exist which can achieve this. https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K It takes an array of categories or "bag of words" and a text string to analyze. It then returns a sorted percentage of relevance fo...
Alternatives to bag-of-words based classifiers for text classification? API models exist which can achieve this. https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K It takes an array of categories or "bag of words" and a text string to analyze. It
46,775
Feasible Generalized Least Square in R
Estimating Regression Models with Multiplicative Heteroscedasticity The model that you have described is discussed in Harvey (1976). Let me rewrite the model $$ \begin{align} \mathbb{E}(Y_i \mid \mathbf{X}_i, \mathbf{Z}_i) &= \mathbf{X}_i'\boldsymbol{\beta} \\ \mathbb{V}(Y_i \mid \mathbf{X}_i, \mathbf{Z}_i) &\equiv \si...
Feasible Generalized Least Square in R
Estimating Regression Models with Multiplicative Heteroscedasticity The model that you have described is discussed in Harvey (1976). Let me rewrite the model $$ \begin{align} \mathbb{E}(Y_i \mid \math
Feasible Generalized Least Square in R Estimating Regression Models with Multiplicative Heteroscedasticity The model that you have described is discussed in Harvey (1976). Let me rewrite the model $$ \begin{align} \mathbb{E}(Y_i \mid \mathbf{X}_i, \mathbf{Z}_i) &= \mathbf{X}_i'\boldsymbol{\beta} \\ \mathbb{V}(Y_i \mid ...
Feasible Generalized Least Square in R Estimating Regression Models with Multiplicative Heteroscedasticity The model that you have described is discussed in Harvey (1976). Let me rewrite the model $$ \begin{align} \mathbb{E}(Y_i \mid \math
46,776
Feasible Generalized Least Square in R
There should also be a minus sign before $\log(2\pi)$ in negLogLik since this term appears in the denominator of the likelihood function, see https://en.wikipedia.org/wiki/Maximum_likelihood_estimation#Non-independent_variables. However, this change is a neutral operation in a minimization problem since $\log(2\pi)$ is...
Feasible Generalized Least Square in R
There should also be a minus sign before $\log(2\pi)$ in negLogLik since this term appears in the denominator of the likelihood function, see https://en.wikipedia.org/wiki/Maximum_likelihood_estimatio
Feasible Generalized Least Square in R There should also be a minus sign before $\log(2\pi)$ in negLogLik since this term appears in the denominator of the likelihood function, see https://en.wikipedia.org/wiki/Maximum_likelihood_estimation#Non-independent_variables. However, this change is a neutral operation in a min...
Feasible Generalized Least Square in R There should also be a minus sign before $\log(2\pi)$ in negLogLik since this term appears in the denominator of the likelihood function, see https://en.wikipedia.org/wiki/Maximum_likelihood_estimatio
46,777
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods
"To produce the estimates on the test set do I simply average the weights and biases from each of the 10 different calibrated models and use this parametrization to produce outputs to compare with my test set for the target function?" No. Cross-validation is a procedure for estimating the test performance of a method ...
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods
"To produce the estimates on the test set do I simply average the weights and biases from each of the 10 different calibrated models and use this parametrization to produce outputs to compare with my
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods "To produce the estimates on the test set do I simply average the weights and biases from each of the 10 different calibrated models and use this parametrization to produce outputs to compare with my test set for the target function?" No....
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods "To produce the estimates on the test set do I simply average the weights and biases from each of the 10 different calibrated models and use this parametrization to produce outputs to compare with my
46,778
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods
I think the correct answer to this question is provided by a document of sklearn here: http://scikit-learn.org/stable/modules/cross_validation.html Basically by doing cross-validation(CV), compared with hold-out validation, we can reduce the amount of data taken by the validation set, thus increase the amount of data u...
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods
I think the correct answer to this question is provided by a document of sklearn here: http://scikit-learn.org/stable/modules/cross_validation.html Basically by doing cross-validation(CV), compared wi
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods I think the correct answer to this question is provided by a document of sklearn here: http://scikit-learn.org/stable/modules/cross_validation.html Basically by doing cross-validation(CV), compared with hold-out validation, we can reduce ...
Final Model Prediction using K-Fold Cross-Validation and Machine Learning Methods I think the correct answer to this question is provided by a document of sklearn here: http://scikit-learn.org/stable/modules/cross_validation.html Basically by doing cross-validation(CV), compared wi
46,779
F-test formula under robust standard error
In the linear regression model $$\mathbf y = \mathbf X\beta + \mathbf u$$ with $K$ regressors and a sample of size $N$, if we have $q$ linear restrictions on the parameters that we want to test, $$\mathbf R\beta = \mathbf r$$ where $\mathbf R$ is $q \times K$, then we have the Wald statistic $$W= (\mathbf R\hat \beta ...
F-test formula under robust standard error
In the linear regression model $$\mathbf y = \mathbf X\beta + \mathbf u$$ with $K$ regressors and a sample of size $N$, if we have $q$ linear restrictions on the parameters that we want to test, $$\m
F-test formula under robust standard error In the linear regression model $$\mathbf y = \mathbf X\beta + \mathbf u$$ with $K$ regressors and a sample of size $N$, if we have $q$ linear restrictions on the parameters that we want to test, $$\mathbf R\beta = \mathbf r$$ where $\mathbf R$ is $q \times K$, then we have th...
F-test formula under robust standard error In the linear regression model $$\mathbf y = \mathbf X\beta + \mathbf u$$ with $K$ regressors and a sample of size $N$, if we have $q$ linear restrictions on the parameters that we want to test, $$\m
46,780
Probability enemy territory captured in X turns
The basic rules of engagement provide the probability distribution for transitions from $a$ attacking armies and $d$ defending armies to $a^\prime$ attackers and $d^\prime$ defenders, where $0 \le a^\prime \le a$ and $0 \le d^\prime \le d$. Beginning with $A$ attacking armies and $D$ defending armies, there are theref...
Probability enemy territory captured in X turns
The basic rules of engagement provide the probability distribution for transitions from $a$ attacking armies and $d$ defending armies to $a^\prime$ attackers and $d^\prime$ defenders, where $0 \le a^\
Probability enemy territory captured in X turns The basic rules of engagement provide the probability distribution for transitions from $a$ attacking armies and $d$ defending armies to $a^\prime$ attackers and $d^\prime$ defenders, where $0 \le a^\prime \le a$ and $0 \le d^\prime \le d$. Beginning with $A$ attacking a...
Probability enemy territory captured in X turns The basic rules of engagement provide the probability distribution for transitions from $a$ attacking armies and $d$ defending armies to $a^\prime$ attackers and $d^\prime$ defenders, where $0 \le a^\
46,781
Probability enemy territory captured in X turns
I use this to simulate, perhaps it might give more insight and perhaps someone might come with an analytical solution. When defender has equal to attacker, the defender "wins" When the attacker didn't destroy defender by turn X, the attacker "loses" When defender reaches 0 troops, attacker "wins" Here, N1 is the def...
Probability enemy territory captured in X turns
I use this to simulate, perhaps it might give more insight and perhaps someone might come with an analytical solution. When defender has equal to attacker, the defender "wins" When the attacker didn
Probability enemy territory captured in X turns I use this to simulate, perhaps it might give more insight and perhaps someone might come with an analytical solution. When defender has equal to attacker, the defender "wins" When the attacker didn't destroy defender by turn X, the attacker "loses" When defender reache...
Probability enemy territory captured in X turns I use this to simulate, perhaps it might give more insight and perhaps someone might come with an analytical solution. When defender has equal to attacker, the defender "wins" When the attacker didn
46,782
Condition number of covariance matrix
Yes, the scales of your variables affect the condition number. This is a real phenomenon with practical consequences; for example, I am using linear least-squares to solve a fitting problem, and if I just drop in the appropriate columns my condition number is of order 10^18 (presumably worse, as this is the limit of my...
Condition number of covariance matrix
Yes, the scales of your variables affect the condition number. This is a real phenomenon with practical consequences; for example, I am using linear least-squares to solve a fitting problem, and if I
Condition number of covariance matrix Yes, the scales of your variables affect the condition number. This is a real phenomenon with practical consequences; for example, I am using linear least-squares to solve a fitting problem, and if I just drop in the appropriate columns my condition number is of order 10^18 (presum...
Condition number of covariance matrix Yes, the scales of your variables affect the condition number. This is a real phenomenon with practical consequences; for example, I am using linear least-squares to solve a fitting problem, and if I
46,783
Condition number of covariance matrix
In general, it is really really unlikely the covariance matrix is ill-conditioned. There are results by Tao and Vu (http://arxiv.org/pdf/math/0703307v1.pdf theorem P2). General rule I keep in mind is Marcenko-Pastur: If you have each column of a matrix X of dimension N*P being sampled independently then so long as (N/...
Condition number of covariance matrix
In general, it is really really unlikely the covariance matrix is ill-conditioned. There are results by Tao and Vu (http://arxiv.org/pdf/math/0703307v1.pdf theorem P2). General rule I keep in mind is
Condition number of covariance matrix In general, it is really really unlikely the covariance matrix is ill-conditioned. There are results by Tao and Vu (http://arxiv.org/pdf/math/0703307v1.pdf theorem P2). General rule I keep in mind is Marcenko-Pastur: If you have each column of a matrix X of dimension N*P being sam...
Condition number of covariance matrix In general, it is really really unlikely the covariance matrix is ill-conditioned. There are results by Tao and Vu (http://arxiv.org/pdf/math/0703307v1.pdf theorem P2). General rule I keep in mind is
46,784
Condition number of covariance matrix
Why don't you draw your covariance matrix from an inverse Wishart distribution? Gamma distribution is usually used as a prior for a single dimensional variance, Wishart is the multivariate case of the Gamma distribution. It is used as the conjugate prior for the covariance of a multi-variate normal. Sampling the values...
Condition number of covariance matrix
Why don't you draw your covariance matrix from an inverse Wishart distribution? Gamma distribution is usually used as a prior for a single dimensional variance, Wishart is the multivariate case of the
Condition number of covariance matrix Why don't you draw your covariance matrix from an inverse Wishart distribution? Gamma distribution is usually used as a prior for a single dimensional variance, Wishart is the multivariate case of the Gamma distribution. It is used as the conjugate prior for the covariance of a mul...
Condition number of covariance matrix Why don't you draw your covariance matrix from an inverse Wishart distribution? Gamma distribution is usually used as a prior for a single dimensional variance, Wishart is the multivariate case of the
46,785
Condition number of covariance matrix
Easiest to interpret is to generate a spectrum and the orthogonal group (rotation matrix): $V^T D V$. You can put whatever prior you want on the eigenvalues. Probably there are some good ones depending on context.
Condition number of covariance matrix
Easiest to interpret is to generate a spectrum and the orthogonal group (rotation matrix): $V^T D V$. You can put whatever prior you want on the eigenvalues. Probably there are some good ones dependin
Condition number of covariance matrix Easiest to interpret is to generate a spectrum and the orthogonal group (rotation matrix): $V^T D V$. You can put whatever prior you want on the eigenvalues. Probably there are some good ones depending on context.
Condition number of covariance matrix Easiest to interpret is to generate a spectrum and the orthogonal group (rotation matrix): $V^T D V$. You can put whatever prior you want on the eigenvalues. Probably there are some good ones dependin
46,786
How to select a number of components to retain in kernel PCA?
The reason you get 124 components even though you only had 10 original features is (probably) because you have 124 samples. In kernel PCA, the data are mapped to a space which is very high dimensional (has many more than 10 dimensions), and so the number of PCs is only limited by the number of samples. Now, your eigenv...
How to select a number of components to retain in kernel PCA?
The reason you get 124 components even though you only had 10 original features is (probably) because you have 124 samples. In kernel PCA, the data are mapped to a space which is very high dimensional
How to select a number of components to retain in kernel PCA? The reason you get 124 components even though you only had 10 original features is (probably) because you have 124 samples. In kernel PCA, the data are mapped to a space which is very high dimensional (has many more than 10 dimensions), and so the number of ...
How to select a number of components to retain in kernel PCA? The reason you get 124 components even though you only had 10 original features is (probably) because you have 124 samples. In kernel PCA, the data are mapped to a space which is very high dimensional
46,787
How to select a number of components to retain in kernel PCA?
Here's the explained variance plot $\frac{\sum_{i=1}^k\lambda_i}{\sum_{i=1}^{124}\lambda_i}$. You need 90 PCs to explain 90% of the variance. In my opinion, your kernel is not so good. Maybe you should try other kernels and see if this plot become more like in the picture below, which is from this paper: Williams, Chr...
How to select a number of components to retain in kernel PCA?
Here's the explained variance plot $\frac{\sum_{i=1}^k\lambda_i}{\sum_{i=1}^{124}\lambda_i}$. You need 90 PCs to explain 90% of the variance. In my opinion, your kernel is not so good. Maybe you shou
How to select a number of components to retain in kernel PCA? Here's the explained variance plot $\frac{\sum_{i=1}^k\lambda_i}{\sum_{i=1}^{124}\lambda_i}$. You need 90 PCs to explain 90% of the variance. In my opinion, your kernel is not so good. Maybe you should try other kernels and see if this plot become more like...
How to select a number of components to retain in kernel PCA? Here's the explained variance plot $\frac{\sum_{i=1}^k\lambda_i}{\sum_{i=1}^{124}\lambda_i}$. You need 90 PCs to explain 90% of the variance. In my opinion, your kernel is not so good. Maybe you shou
46,788
When is Likelihood Function Positive Semidefinite
The Fisher Information is defined as $${\left(\mathcal{I} \left(\theta \right) \right)}_{i, j} = \operatorname{E} \left[\left. \left(\frac{\partial}{\partial\theta_i} \log f(X;\theta)\right) \left(\frac{\partial}{\partial\theta_j} \log f(X;\theta)\right) \right|\theta\right]$$ (the question in the post you linked to ...
When is Likelihood Function Positive Semidefinite
The Fisher Information is defined as $${\left(\mathcal{I} \left(\theta \right) \right)}_{i, j} = \operatorname{E} \left[\left. \left(\frac{\partial}{\partial\theta_i} \log f(X;\theta)\right) \left(\
When is Likelihood Function Positive Semidefinite The Fisher Information is defined as $${\left(\mathcal{I} \left(\theta \right) \right)}_{i, j} = \operatorname{E} \left[\left. \left(\frac{\partial}{\partial\theta_i} \log f(X;\theta)\right) \left(\frac{\partial}{\partial\theta_j} \log f(X;\theta)\right) \right|\theta...
When is Likelihood Function Positive Semidefinite The Fisher Information is defined as $${\left(\mathcal{I} \left(\theta \right) \right)}_{i, j} = \operatorname{E} \left[\left. \left(\frac{\partial}{\partial\theta_i} \log f(X;\theta)\right) \left(\
46,789
Multivariate logistic distribution
Using copulas you can create a multivariate distribution generalized from any univariate distribution, so yes it is possible to find a multivariate distribution with all the marginal distributions equal to logistic distributions, however it will probably not be a simple function of a covariance matrix, that relationshi...
Multivariate logistic distribution
Using copulas you can create a multivariate distribution generalized from any univariate distribution, so yes it is possible to find a multivariate distribution with all the marginal distributions equ
Multivariate logistic distribution Using copulas you can create a multivariate distribution generalized from any univariate distribution, so yes it is possible to find a multivariate distribution with all the marginal distributions equal to logistic distributions, however it will probably not be a simple function of a ...
Multivariate logistic distribution Using copulas you can create a multivariate distribution generalized from any univariate distribution, so yes it is possible to find a multivariate distribution with all the marginal distributions equ
46,790
Multivariate logistic distribution
Yes. In fact, the multivariate normal and logistic distributions are members of the more general family of elliptically-contoured distributions, which can be derived from their univariate counterparts. Both the univariate and multivariate normal distributions share the same probability density generator, which is propo...
Multivariate logistic distribution
Yes. In fact, the multivariate normal and logistic distributions are members of the more general family of elliptically-contoured distributions, which can be derived from their univariate counterparts
Multivariate logistic distribution Yes. In fact, the multivariate normal and logistic distributions are members of the more general family of elliptically-contoured distributions, which can be derived from their univariate counterparts. Both the univariate and multivariate normal distributions share the same probabilit...
Multivariate logistic distribution Yes. In fact, the multivariate normal and logistic distributions are members of the more general family of elliptically-contoured distributions, which can be derived from their univariate counterparts
46,791
Multivariate logistic distribution
I don't think any such distribution is known to literature. Books on continuous multivariate distributions (such as Kotz '00) and books on the logistic distribution (such as N. Balakrishnan '92) don't mention any such generalization. Most multivariate distributions discussed there contains at most two parameters which...
Multivariate logistic distribution
I don't think any such distribution is known to literature. Books on continuous multivariate distributions (such as Kotz '00) and books on the logistic distribution (such as N. Balakrishnan '92) don'
Multivariate logistic distribution I don't think any such distribution is known to literature. Books on continuous multivariate distributions (such as Kotz '00) and books on the logistic distribution (such as N. Balakrishnan '92) don't mention any such generalization. Most multivariate distributions discussed there co...
Multivariate logistic distribution I don't think any such distribution is known to literature. Books on continuous multivariate distributions (such as Kotz '00) and books on the logistic distribution (such as N. Balakrishnan '92) don'
46,792
Using lme with a fixed beta (slope), and estimating the intercept only
Yes. If you know that the slope is, for example, 1.5, then you just subtract 1.5 * p_w from the outcome and refit the model with just the intercept term. So, in your example: x$ComboRate.adj <- x$ComboRate - 1.5 * x$p_w lme.2.combo <- lme(ComboRate.adj ~ 1, random = ~1 | Rat,data=x) This is the same as using an offset...
Using lme with a fixed beta (slope), and estimating the intercept only
Yes. If you know that the slope is, for example, 1.5, then you just subtract 1.5 * p_w from the outcome and refit the model with just the intercept term. So, in your example: x$ComboRate.adj <- x$Comb
Using lme with a fixed beta (slope), and estimating the intercept only Yes. If you know that the slope is, for example, 1.5, then you just subtract 1.5 * p_w from the outcome and refit the model with just the intercept term. So, in your example: x$ComboRate.adj <- x$ComboRate - 1.5 * x$p_w lme.2.combo <- lme(ComboRate....
Using lme with a fixed beta (slope), and estimating the intercept only Yes. If you know that the slope is, for example, 1.5, then you just subtract 1.5 * p_w from the outcome and refit the model with just the intercept term. So, in your example: x$ComboRate.adj <- x$Comb
46,793
Dropping term for correlation between random effects in lme and interpretting summary output
While in principle your approach works, this is not quite the 'standard' way of making the random intercepts and slopes uncorrelated. With lme you can use pdClasses (see help(pdClasses)) to give a particular structure to the variance-covariance matrix of the random effects. Here, you want to make that matrix diagonal. ...
Dropping term for correlation between random effects in lme and interpretting summary output
While in principle your approach works, this is not quite the 'standard' way of making the random intercepts and slopes uncorrelated. With lme you can use pdClasses (see help(pdClasses)) to give a par
Dropping term for correlation between random effects in lme and interpretting summary output While in principle your approach works, this is not quite the 'standard' way of making the random intercepts and slopes uncorrelated. With lme you can use pdClasses (see help(pdClasses)) to give a particular structure to the va...
Dropping term for correlation between random effects in lme and interpretting summary output While in principle your approach works, this is not quite the 'standard' way of making the random intercepts and slopes uncorrelated. With lme you can use pdClasses (see help(pdClasses)) to give a par
46,794
Approximation of Cauchy distribution
The ratio of two arbitrary normal random variables is not in general Cauchy. Even the ratio of two jointly normal random variables is not in general Cauchy. Let's assume you're dealing with a ratio that does have a Cauchy distribution. Then all manner of quantities converge - including quantiles and many functions of q...
Approximation of Cauchy distribution
The ratio of two arbitrary normal random variables is not in general Cauchy. Even the ratio of two jointly normal random variables is not in general Cauchy. Let's assume you're dealing with a ratio th
Approximation of Cauchy distribution The ratio of two arbitrary normal random variables is not in general Cauchy. Even the ratio of two jointly normal random variables is not in general Cauchy. Let's assume you're dealing with a ratio that does have a Cauchy distribution. Then all manner of quantities converge - includ...
Approximation of Cauchy distribution The ratio of two arbitrary normal random variables is not in general Cauchy. Even the ratio of two jointly normal random variables is not in general Cauchy. Let's assume you're dealing with a ratio th
46,795
Approximation of Cauchy distribution
First, the ratio is Cauchy only if the denominator distribution is centered at 0. In any cases, the statistics on the ratio of $y$ and $x$ can be approximated as: $$\hat{\mu}_{y:x} = \mu_y/\mu_x + \sigma^2_x * \mu_y / \mu_x^3 + cov(x,y) * \sigma^2_x * \sigma^2_y / \mu_x^2$$ $$\hat{\sigma}^2_{y:x} = \sigma^2_x\times\m...
Approximation of Cauchy distribution
First, the ratio is Cauchy only if the denominator distribution is centered at 0. In any cases, the statistics on the ratio of $y$ and $x$ can be approximated as: $$\hat{\mu}_{y:x} = \mu_y/\mu_x + \s
Approximation of Cauchy distribution First, the ratio is Cauchy only if the denominator distribution is centered at 0. In any cases, the statistics on the ratio of $y$ and $x$ can be approximated as: $$\hat{\mu}_{y:x} = \mu_y/\mu_x + \sigma^2_x * \mu_y / \mu_x^3 + cov(x,y) * \sigma^2_x * \sigma^2_y / \mu_x^2$$ $$\hat...
Approximation of Cauchy distribution First, the ratio is Cauchy only if the denominator distribution is centered at 0. In any cases, the statistics on the ratio of $y$ and $x$ can be approximated as: $$\hat{\mu}_{y:x} = \mu_y/\mu_x + \s
46,796
Approximation of Cauchy distribution
Your question assumes that the distribution of the denominator is centered at 0. If this is so, the median and the mad will converge (to 0 and 1, respectively). nn<-exp(seq(log(10),log(100000),l=20)) aa<-rep(NA,length(nn)) bb<-rep(NA,length(nn)) for(i in 1:length(nn)){ x1<-rt(nn[i],df=1) aa[i]<-median(x1) ...
Approximation of Cauchy distribution
Your question assumes that the distribution of the denominator is centered at 0. If this is so, the median and the mad will converge (to 0 and 1, respectively). nn<-exp(seq(log(10),log(100000),l=20))
Approximation of Cauchy distribution Your question assumes that the distribution of the denominator is centered at 0. If this is so, the median and the mad will converge (to 0 and 1, respectively). nn<-exp(seq(log(10),log(100000),l=20)) aa<-rep(NA,length(nn)) bb<-rep(NA,length(nn)) for(i in 1:length(nn)){ x1<-rt(n...
Approximation of Cauchy distribution Your question assumes that the distribution of the denominator is centered at 0. If this is so, the median and the mad will converge (to 0 and 1, respectively). nn<-exp(seq(log(10),log(100000),l=20))
46,797
Why does a fixed-effect OLS need unique time elements?
Your understanding of fixed effects regression seems perfectly fine. When you do the within transformation to obtain the fixed effects estimator $$y_{it} - \overline{y}_{i} = (X_{it} - \overline{X}_i)\beta + \epsilon_{it} - \overline{\epsilon}_i$$ the time-sorting order does not matter because $\overline{y}_{i} = \frac...
Why does a fixed-effect OLS need unique time elements?
Your understanding of fixed effects regression seems perfectly fine. When you do the within transformation to obtain the fixed effects estimator $$y_{it} - \overline{y}_{i} = (X_{it} - \overline{X}_i)
Why does a fixed-effect OLS need unique time elements? Your understanding of fixed effects regression seems perfectly fine. When you do the within transformation to obtain the fixed effects estimator $$y_{it} - \overline{y}_{i} = (X_{it} - \overline{X}_i)\beta + \epsilon_{it} - \overline{\epsilon}_i$$ the time-sorting ...
Why does a fixed-effect OLS need unique time elements? Your understanding of fixed effects regression seems perfectly fine. When you do the within transformation to obtain the fixed effects estimator $$y_{it} - \overline{y}_{i} = (X_{it} - \overline{X}_i)
46,798
Why does a fixed-effect OLS need unique time elements?
Indeed, plm will not allow you to run a FE model, when there is a lower-level unit (i.e. you want household instead of individual, country instead of states etc). And indeed, there's nothing wrong about doing what you want. The trick in this case is just to make the time variable unique, crossing it with the sub-level...
Why does a fixed-effect OLS need unique time elements?
Indeed, plm will not allow you to run a FE model, when there is a lower-level unit (i.e. you want household instead of individual, country instead of states etc). And indeed, there's nothing wrong abo
Why does a fixed-effect OLS need unique time elements? Indeed, plm will not allow you to run a FE model, when there is a lower-level unit (i.e. you want household instead of individual, country instead of states etc). And indeed, there's nothing wrong about doing what you want. The trick in this case is just to make t...
Why does a fixed-effect OLS need unique time elements? Indeed, plm will not allow you to run a FE model, when there is a lower-level unit (i.e. you want household instead of individual, country instead of states etc). And indeed, there's nothing wrong abo
46,799
Finding the best path through the matrix in DTW
You have presented a matrix showing the pointwise distance computed by using the squared Euclidean distance. Each element of this matrix will be referred to as cost[i,j]. You target is the accumulated distance matrix. Each element of this matrix will be referred to as DTW[i,j]. To compute the distance using this formul...
Finding the best path through the matrix in DTW
You have presented a matrix showing the pointwise distance computed by using the squared Euclidean distance. Each element of this matrix will be referred to as cost[i,j]. You target is the accumulated
Finding the best path through the matrix in DTW You have presented a matrix showing the pointwise distance computed by using the squared Euclidean distance. Each element of this matrix will be referred to as cost[i,j]. You target is the accumulated distance matrix. Each element of this matrix will be referred to as DTW...
Finding the best path through the matrix in DTW You have presented a matrix showing the pointwise distance computed by using the squared Euclidean distance. Each element of this matrix will be referred to as cost[i,j]. You target is the accumulated
46,800
Use of Wilcoxon test for non-normal data akin to Two One Sided T-test
The short answer is yes, you can do it, since the TOST methodology is not restricted to t-tests. The p-value is the larger of the two p-values. A quick Google search led me to a methodological article (Meier U. Nonparametric equivalence testing with respect to the median difference. Pharm Stat. 2010 Apr-Jun;9(2):142-50...
Use of Wilcoxon test for non-normal data akin to Two One Sided T-test
The short answer is yes, you can do it, since the TOST methodology is not restricted to t-tests. The p-value is the larger of the two p-values. A quick Google search led me to a methodological article
Use of Wilcoxon test for non-normal data akin to Two One Sided T-test The short answer is yes, you can do it, since the TOST methodology is not restricted to t-tests. The p-value is the larger of the two p-values. A quick Google search led me to a methodological article (Meier U. Nonparametric equivalence testing with ...
Use of Wilcoxon test for non-normal data akin to Two One Sided T-test The short answer is yes, you can do it, since the TOST methodology is not restricted to t-tests. The p-value is the larger of the two p-values. A quick Google search led me to a methodological article