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
40,701
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?
The results will be sensitive to the splits, so you should compare models on the same partitioning of the data. Compare these two approaches: Approach 1 will compare two models, but use the same CV partitioning. Approach 2 will compare two models, but the first model will have a different CV partitioning than second....
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms
The results will be sensitive to the splits, so you should compare models on the same partitioning of the data. Compare these two approaches: Approach 1 will compare two models, but use the same CV
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms? The results will be sensitive to the splits, so you should compare models on the same partitioning of the data. Compare these two approaches: Approach 1 will compare two models, but use the same CV partitioning. Appr...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms The results will be sensitive to the splits, so you should compare models on the same partitioning of the data. Compare these two approaches: Approach 1 will compare two models, but use the same CV
40,702
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?
It certainly helps, but isn't absolutely essential. The choice of cross-validation splits introduces a source of (uninteresting) variability. Using the same set of splits removes this source of variance, which might increase your ability to detect variability in the performance of different classifiers (if it exists)...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms
It certainly helps, but isn't absolutely essential. The choice of cross-validation splits introduces a source of (uninteresting) variability. Using the same set of splits removes this source of varia
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms? It certainly helps, but isn't absolutely essential. The choice of cross-validation splits introduces a source of (uninteresting) variability. Using the same set of splits removes this source of variance, which might i...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms It certainly helps, but isn't absolutely essential. The choice of cross-validation splits introduces a source of (uninteresting) variability. Using the same set of splits removes this source of varia
40,703
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?
In addition to @Matt Krause's answer: I'd approach the question from two different sides: One of the basic assumptions underlying cross validation is that the models built on the different splits are equal (or at least equivalent). This allows pooling the results from all those splits. If that assumption is met, then ...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms
In addition to @Matt Krause's answer: I'd approach the question from two different sides: One of the basic assumptions underlying cross validation is that the models built on the different splits are
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms? In addition to @Matt Krause's answer: I'd approach the question from two different sides: One of the basic assumptions underlying cross validation is that the models built on the different splits are equal (or at leas...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms In addition to @Matt Krause's answer: I'd approach the question from two different sides: One of the basic assumptions underlying cross validation is that the models built on the different splits are
40,704
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?
Though this has already been answered, if you want some code that will allow you to use the same CV splits in caret for multiple model trainings, you can use the following: tune_control <- trainControl( method = "repeatedcv", repeats = 2, number = 5, index = createMultiFolds(df$y, k=5, times=2) # assuming you...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms
Though this has already been answered, if you want some code that will allow you to use the same CV splits in caret for multiple model trainings, you can use the following: tune_control <- trainContr
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms? Though this has already been answered, if you want some code that will allow you to use the same CV splits in caret for multiple model trainings, you can use the following: tune_control <- trainControl( method = "re...
Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms Though this has already been answered, if you want some code that will allow you to use the same CV splits in caret for multiple model trainings, you can use the following: tune_control <- trainContr
40,705
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate]
A p-value is the probability of obtaining a result at least as extreme as the one observed. In the case of a two-tailed z-test, "more extreme" means having a z-value at least as great in magnitude (at least as far from zero) as the observed z-value. So if your sample gives a z-value of say 1.3 (just for an example), th...
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate]
A p-value is the probability of obtaining a result at least as extreme as the one observed. In the case of a two-tailed z-test, "more extreme" means having a z-value at least as great in magnitude (at
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate] A p-value is the probability of obtaining a result at least as extreme as the one observed. In the case of a two-tailed z-test, "more extreme" means having a z-value at least as great in magnitude (at least as far from zero) ...
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate] A p-value is the probability of obtaining a result at least as extreme as the one observed. In the case of a two-tailed z-test, "more extreme" means having a z-value at least as great in magnitude (at
40,706
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate]
When you do a two-tailed test you are in fact obtaining both the positive and the negative of the statistic. Remember a two-tailed test means that your are testing whether your alternative hypothesis is different from the null, which could mean either greater or less than. The "greater than" part gives you the critical...
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate]
When you do a two-tailed test you are in fact obtaining both the positive and the negative of the statistic. Remember a two-tailed test means that your are testing whether your alternative hypothesis
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate] When you do a two-tailed test you are in fact obtaining both the positive and the negative of the statistic. Remember a two-tailed test means that your are testing whether your alternative hypothesis is different from the nul...
Why does the p-value double when using two-tailed test compared to one-tailed one? [duplicate] When you do a two-tailed test you are in fact obtaining both the positive and the negative of the statistic. Remember a two-tailed test means that your are testing whether your alternative hypothesis
40,707
Is re-randomization valid approach to estimate statistical significance
The idea of a randomization test is that if a given treatment has no affect on an outcome, then the assignment of that treatment is just a kind of arbitrary labeling. (Fisher's exact test was the first method to be based on this concept.) Now if we have some statistic and we want to know its distribution under the nul...
Is re-randomization valid approach to estimate statistical significance
The idea of a randomization test is that if a given treatment has no affect on an outcome, then the assignment of that treatment is just a kind of arbitrary labeling. (Fisher's exact test was the firs
Is re-randomization valid approach to estimate statistical significance The idea of a randomization test is that if a given treatment has no affect on an outcome, then the assignment of that treatment is just a kind of arbitrary labeling. (Fisher's exact test was the first method to be based on this concept.) Now if w...
Is re-randomization valid approach to estimate statistical significance The idea of a randomization test is that if a given treatment has no affect on an outcome, then the assignment of that treatment is just a kind of arbitrary labeling. (Fisher's exact test was the firs
40,708
Is re-randomization valid approach to estimate statistical significance
Okay, I'm a bit late to this party, but while I agree with what dsaxton says in the first paragraph, I think the second paragraph gets lost. Re-randomization works very well to specify the null distribution for a large variety of statistics. However, you've managed to cause a problem by combining two pathological distr...
Is re-randomization valid approach to estimate statistical significance
Okay, I'm a bit late to this party, but while I agree with what dsaxton says in the first paragraph, I think the second paragraph gets lost. Re-randomization works very well to specify the null distri
Is re-randomization valid approach to estimate statistical significance Okay, I'm a bit late to this party, but while I agree with what dsaxton says in the first paragraph, I think the second paragraph gets lost. Re-randomization works very well to specify the null distribution for a large variety of statistics. Howeve...
Is re-randomization valid approach to estimate statistical significance Okay, I'm a bit late to this party, but while I agree with what dsaxton says in the first paragraph, I think the second paragraph gets lost. Re-randomization works very well to specify the null distri
40,709
Gradient for hinge loss multiclass
Let's use the example of the SVM loss function for a single datapoint: $L_i = \sum_{j\neq y_i} \left[ \max(0, w_j^Tx_i - w_{y_i}^Tx_i + \Delta) \right]$ Where $\Delta$ is the desired margin. We can differentiate the function with respect to the weights. For example, taking the gradient with respect to $w_{yi}$ we obtai...
Gradient for hinge loss multiclass
Let's use the example of the SVM loss function for a single datapoint: $L_i = \sum_{j\neq y_i} \left[ \max(0, w_j^Tx_i - w_{y_i}^Tx_i + \Delta) \right]$ Where $\Delta$ is the desired margin. We can di
Gradient for hinge loss multiclass Let's use the example of the SVM loss function for a single datapoint: $L_i = \sum_{j\neq y_i} \left[ \max(0, w_j^Tx_i - w_{y_i}^Tx_i + \Delta) \right]$ Where $\Delta$ is the desired margin. We can differentiate the function with respect to the weights. For example, taking the gradien...
Gradient for hinge loss multiclass Let's use the example of the SVM loss function for a single datapoint: $L_i = \sum_{j\neq y_i} \left[ \max(0, w_j^Tx_i - w_{y_i}^Tx_i + \Delta) \right]$ Where $\Delta$ is the desired margin. We can di
40,710
Gradient for hinge loss multiclass
First of all, note that multi-class hinge loss function is a function of $W_r$. \begin{equation} l(W_r) = \max( 0, 1 + \underset{r \neq y_i}{ \max } W_r \cdot x_i - W_{y_i} \cdot x_i) \end{equation} Next, max function is non-differentiable at $0$. So, we need to calculate the subgradient of it. \begin{equation} \frac{...
Gradient for hinge loss multiclass
First of all, note that multi-class hinge loss function is a function of $W_r$. \begin{equation} l(W_r) = \max( 0, 1 + \underset{r \neq y_i}{ \max } W_r \cdot x_i - W_{y_i} \cdot x_i) \end{equation}
Gradient for hinge loss multiclass First of all, note that multi-class hinge loss function is a function of $W_r$. \begin{equation} l(W_r) = \max( 0, 1 + \underset{r \neq y_i}{ \max } W_r \cdot x_i - W_{y_i} \cdot x_i) \end{equation} Next, max function is non-differentiable at $0$. So, we need to calculate the subgrad...
Gradient for hinge loss multiclass First of all, note that multi-class hinge loss function is a function of $W_r$. \begin{equation} l(W_r) = \max( 0, 1 + \underset{r \neq y_i}{ \max } W_r \cdot x_i - W_{y_i} \cdot x_i) \end{equation}
40,711
R: glm(...,family=poisson) plot confidence and prediction intervals [closed]
R's predict ought to be able to do a confidence interval for a GLM but definitely won't do a prediction interval -- there's an underlying statistical issue here, which I'll discuss in this answer. i) For some GLMs it doesn't make sense to even try to do a PI - consider a logistic regression with 0/1 responses, and imag...
R: glm(...,family=poisson) plot confidence and prediction intervals [closed]
R's predict ought to be able to do a confidence interval for a GLM but definitely won't do a prediction interval -- there's an underlying statistical issue here, which I'll discuss in this answer. i)
R: glm(...,family=poisson) plot confidence and prediction intervals [closed] R's predict ought to be able to do a confidence interval for a GLM but definitely won't do a prediction interval -- there's an underlying statistical issue here, which I'll discuss in this answer. i) For some GLMs it doesn't make sense to even...
R: glm(...,family=poisson) plot confidence and prediction intervals [closed] R's predict ought to be able to do a confidence interval for a GLM but definitely won't do a prediction interval -- there's an underlying statistical issue here, which I'll discuss in this answer. i)
40,712
GridSearchCV Regression vs Linear Regression vs Stats.model OLS
The difference between the scores can be explained as follows In your first model, you are performing cross-validation. When cv=None, or when it not passed as an argument, GridSearchCV will default to cv=3. With three folds, each model will train using 66% of the data and test using the other 33%. Since you already spl...
GridSearchCV Regression vs Linear Regression vs Stats.model OLS
The difference between the scores can be explained as follows In your first model, you are performing cross-validation. When cv=None, or when it not passed as an argument, GridSearchCV will default to
GridSearchCV Regression vs Linear Regression vs Stats.model OLS The difference between the scores can be explained as follows In your first model, you are performing cross-validation. When cv=None, or when it not passed as an argument, GridSearchCV will default to cv=3. With three folds, each model will train using 66%...
GridSearchCV Regression vs Linear Regression vs Stats.model OLS The difference between the scores can be explained as follows In your first model, you are performing cross-validation. When cv=None, or when it not passed as an argument, GridSearchCV will default to
40,713
jenks natural breaks vs k-means
The Jenks natural breaks algorithm, just like K-means, assigns data to one of K groups such that the within group distances are minimized. Also just like K-means, one must select K prior to running the algorithm. However, Jenks and K-means are different in how they minimize within group distances. Jenks takes advantag...
jenks natural breaks vs k-means
The Jenks natural breaks algorithm, just like K-means, assigns data to one of K groups such that the within group distances are minimized. Also just like K-means, one must select K prior to running th
jenks natural breaks vs k-means The Jenks natural breaks algorithm, just like K-means, assigns data to one of K groups such that the within group distances are minimized. Also just like K-means, one must select K prior to running the algorithm. However, Jenks and K-means are different in how they minimize within group...
jenks natural breaks vs k-means The Jenks natural breaks algorithm, just like K-means, assigns data to one of K groups such that the within group distances are minimized. Also just like K-means, one must select K prior to running th
40,714
jenks natural breaks vs k-means
Previous answers essentially present Jenks as a special case of K-means. However, this source makes an important distinction: K-means solely "searches for minimum distance between data points and the centers of clusters they belong to". Jenks takes this objective and adds a penalty for the proximity between the centers...
jenks natural breaks vs k-means
Previous answers essentially present Jenks as a special case of K-means. However, this source makes an important distinction: K-means solely "searches for minimum distance between data points and the
jenks natural breaks vs k-means Previous answers essentially present Jenks as a special case of K-means. However, this source makes an important distinction: K-means solely "searches for minimum distance between data points and the centers of clusters they belong to". Jenks takes this objective and adds a penalty for t...
jenks natural breaks vs k-means Previous answers essentially present Jenks as a special case of K-means. However, this source makes an important distinction: K-means solely "searches for minimum distance between data points and the
40,715
Two broad categories of dimensionality reduction: with and without an explicit mapping function
These two categories are sometimes referred to as parametric and non-parametric dimensionality reduction. Parametric dimensionality reduction yields an explicit mapping $f(x)$, and is called "parametric" because it considers only a specific restricted class of mappings. E.g. PCA can only yield a linear function $f(x)$....
Two broad categories of dimensionality reduction: with and without an explicit mapping function
These two categories are sometimes referred to as parametric and non-parametric dimensionality reduction. Parametric dimensionality reduction yields an explicit mapping $f(x)$, and is called "parametr
Two broad categories of dimensionality reduction: with and without an explicit mapping function These two categories are sometimes referred to as parametric and non-parametric dimensionality reduction. Parametric dimensionality reduction yields an explicit mapping $f(x)$, and is called "parametric" because it considers...
Two broad categories of dimensionality reduction: with and without an explicit mapping function These two categories are sometimes referred to as parametric and non-parametric dimensionality reduction. Parametric dimensionality reduction yields an explicit mapping $f(x)$, and is called "parametr
40,716
Interpretation of coefficients of glmnet - LASSO/Cox model?
The LASSO fit does not carry information on statistical significance. The coefficients should have a roughly similar interpretation as in a standard Cox model, that is, as log hazard ratios. Positive coefficients indicate that a variable is associated with higher risk of an event, and vice versa for negative coefficien...
Interpretation of coefficients of glmnet - LASSO/Cox model?
The LASSO fit does not carry information on statistical significance. The coefficients should have a roughly similar interpretation as in a standard Cox model, that is, as log hazard ratios. Positive
Interpretation of coefficients of glmnet - LASSO/Cox model? The LASSO fit does not carry information on statistical significance. The coefficients should have a roughly similar interpretation as in a standard Cox model, that is, as log hazard ratios. Positive coefficients indicate that a variable is associated with hig...
Interpretation of coefficients of glmnet - LASSO/Cox model? The LASSO fit does not carry information on statistical significance. The coefficients should have a roughly similar interpretation as in a standard Cox model, that is, as log hazard ratios. Positive
40,717
Simulate rare event data using logistic regression with correlated covariates in R
Let the variables be $X_1, \ldots, X_4$. Due to the flexibility in choosing coefficients in the regression model, we will lose no generality by assuming they all have zero means. Write the covariance matrix as $\Sigma$. Let the logistic regression coefficients be $\beta_0, \beta_1, \ldots, \beta_4$. This means the ...
Simulate rare event data using logistic regression with correlated covariates in R
Let the variables be $X_1, \ldots, X_4$. Due to the flexibility in choosing coefficients in the regression model, we will lose no generality by assuming they all have zero means. Write the covarianc
Simulate rare event data using logistic regression with correlated covariates in R Let the variables be $X_1, \ldots, X_4$. Due to the flexibility in choosing coefficients in the regression model, we will lose no generality by assuming they all have zero means. Write the covariance matrix as $\Sigma$. Let the logist...
Simulate rare event data using logistic regression with correlated covariates in R Let the variables be $X_1, \ldots, X_4$. Due to the flexibility in choosing coefficients in the regression model, we will lose no generality by assuming they all have zero means. Write the covarianc
40,718
Why logistic regression cannot be solved by OLS
I think this essentially boils down to what cost function you want to minimize in order to estimate your parameter $w$. Typically, the negative log-likelihood is minimized for parameter estimation, what you have suggested looks like minimizing the Brier score. I think they would give very similar estimates for $w$ (edi...
Why logistic regression cannot be solved by OLS
I think this essentially boils down to what cost function you want to minimize in order to estimate your parameter $w$. Typically, the negative log-likelihood is minimized for parameter estimation, wh
Why logistic regression cannot be solved by OLS I think this essentially boils down to what cost function you want to minimize in order to estimate your parameter $w$. Typically, the negative log-likelihood is minimized for parameter estimation, what you have suggested looks like minimizing the Brier score. I think the...
Why logistic regression cannot be solved by OLS I think this essentially boils down to what cost function you want to minimize in order to estimate your parameter $w$. Typically, the negative log-likelihood is minimized for parameter estimation, wh
40,719
Why logistic regression cannot be solved by OLS
What you are proposing is a linear probability model, i.e. an OLS regression for a binary dependent variable. The difference is that logit is a non-linear model whereas the linear probability model (as the name says) is linear. The difference is perhaps best understood graphically. If you calculate the marginal effect...
Why logistic regression cannot be solved by OLS
What you are proposing is a linear probability model, i.e. an OLS regression for a binary dependent variable. The difference is that logit is a non-linear model whereas the linear probability model (a
Why logistic regression cannot be solved by OLS What you are proposing is a linear probability model, i.e. an OLS regression for a binary dependent variable. The difference is that logit is a non-linear model whereas the linear probability model (as the name says) is linear. The difference is perhaps best understood gr...
Why logistic regression cannot be solved by OLS What you are proposing is a linear probability model, i.e. an OLS regression for a binary dependent variable. The difference is that logit is a non-linear model whereas the linear probability model (a
40,720
Calculate the F1 score of precision and recall in R
F1Score ranges from 0-1, you're right. Keep in mind how precision and recall is calculated precision = TP / (TP + FP) recall = TP / (TP + FN) with TP = True positives, FP = False positives and FN = false negatives. Therefore, precision is the fraction of retrieved instances that are relevant, while recall is the frac...
Calculate the F1 score of precision and recall in R
F1Score ranges from 0-1, you're right. Keep in mind how precision and recall is calculated precision = TP / (TP + FP) recall = TP / (TP + FN) with TP = True positives, FP = False positives and FN = f
Calculate the F1 score of precision and recall in R F1Score ranges from 0-1, you're right. Keep in mind how precision and recall is calculated precision = TP / (TP + FP) recall = TP / (TP + FN) with TP = True positives, FP = False positives and FN = false negatives. Therefore, precision is the fraction of retrieved i...
Calculate the F1 score of precision and recall in R F1Score ranges from 0-1, you're right. Keep in mind how precision and recall is calculated precision = TP / (TP + FP) recall = TP / (TP + FN) with TP = True positives, FP = False positives and FN = f
40,721
Calculate the F1 score of precision and recall in R
You Need to take the numbers between 0 and 1 and not the percent values. Please check the syntax, however, as I think, there is an error hidden. Precision and Recall are two vectors. You are computing sum(Precision, Recall) where I think you should compute Precision + Recall. Note, that these are not the same in R. The...
Calculate the F1 score of precision and recall in R
You Need to take the numbers between 0 and 1 and not the percent values. Please check the syntax, however, as I think, there is an error hidden. Precision and Recall are two vectors. You are computing
Calculate the F1 score of precision and recall in R You Need to take the numbers between 0 and 1 and not the percent values. Please check the syntax, however, as I think, there is an error hidden. Precision and Recall are two vectors. You are computing sum(Precision, Recall) where I think you should compute Precision +...
Calculate the F1 score of precision and recall in R You Need to take the numbers between 0 and 1 and not the percent values. Please check the syntax, however, as I think, there is an error hidden. Precision and Recall are two vectors. You are computing
40,722
Calculate the F1 score of precision and recall in R
By definition, Precision and Recall should range form 0 to 1. Use the decimal representation of Precision and Recall: Precision <- c( 0.5454 0.6000 0.9130 0.9523 ) Recall <- c( 0.0002 0.0210 0.0018 0.0530 ) numerator <- 2*Precision*Recall print(numerator) [1] 0.00021816 0.02520000 0.00328680 0.10094380 denominator <- ...
Calculate the F1 score of precision and recall in R
By definition, Precision and Recall should range form 0 to 1. Use the decimal representation of Precision and Recall: Precision <- c( 0.5454 0.6000 0.9130 0.9523 ) Recall <- c( 0.0002 0.0210 0.0018 0.
Calculate the F1 score of precision and recall in R By definition, Precision and Recall should range form 0 to 1. Use the decimal representation of Precision and Recall: Precision <- c( 0.5454 0.6000 0.9130 0.9523 ) Recall <- c( 0.0002 0.0210 0.0018 0.0530 ) numerator <- 2*Precision*Recall print(numerator) [1] 0.000218...
Calculate the F1 score of precision and recall in R By definition, Precision and Recall should range form 0 to 1. Use the decimal representation of Precision and Recall: Precision <- c( 0.5454 0.6000 0.9130 0.9523 ) Recall <- c( 0.0002 0.0210 0.0018 0.
40,723
Reporting Results of Mann-Whitney U Test - Means vs Medians
The location-difference measure that the Mann-Whitney 'sees' is neither difference in means nor difference in medians -- it's the median of cross-group pairwise differences (the between samples quantity is the relevant estimate of the corresponding measure between populations). See the end of this section of the wikip...
Reporting Results of Mann-Whitney U Test - Means vs Medians
The location-difference measure that the Mann-Whitney 'sees' is neither difference in means nor difference in medians -- it's the median of cross-group pairwise differences (the between samples quanti
Reporting Results of Mann-Whitney U Test - Means vs Medians The location-difference measure that the Mann-Whitney 'sees' is neither difference in means nor difference in medians -- it's the median of cross-group pairwise differences (the between samples quantity is the relevant estimate of the corresponding measure bet...
Reporting Results of Mann-Whitney U Test - Means vs Medians The location-difference measure that the Mann-Whitney 'sees' is neither difference in means nor difference in medians -- it's the median of cross-group pairwise differences (the between samples quanti
40,724
Reporting Results of Mann-Whitney U Test - Means vs Medians
Eric, I don't know if you solved your problem but I think the approach of the asterisk is ok. If you think the means represent better the data behavior than just use them. Check the CV%, it can also give a perspective of the dispersion which can be important.
Reporting Results of Mann-Whitney U Test - Means vs Medians
Eric, I don't know if you solved your problem but I think the approach of the asterisk is ok. If you think the means represent better the data behavior than just use them. Check the CV%, it can also g
Reporting Results of Mann-Whitney U Test - Means vs Medians Eric, I don't know if you solved your problem but I think the approach of the asterisk is ok. If you think the means represent better the data behavior than just use them. Check the CV%, it can also give a perspective of the dispersion which can be important.
Reporting Results of Mann-Whitney U Test - Means vs Medians Eric, I don't know if you solved your problem but I think the approach of the asterisk is ok. If you think the means represent better the data behavior than just use them. Check the CV%, it can also g
40,725
How to simulate effectiveness of treatment in R?
If you want to simulate one random cell (under independence) with fixed margins, that's effectively hypergeometric sampling, which we can apply recursively, so one approach is pick one cell; given the margins that cell has a hypergeometric distribution, so simulate from that hypegeometric once you have that value...
How to simulate effectiveness of treatment in R?
If you want to simulate one random cell (under independence) with fixed margins, that's effectively hypergeometric sampling, which we can apply recursively, so one approach is pick one cell; given
How to simulate effectiveness of treatment in R? If you want to simulate one random cell (under independence) with fixed margins, that's effectively hypergeometric sampling, which we can apply recursively, so one approach is pick one cell; given the margins that cell has a hypergeometric distribution, so simulate ...
How to simulate effectiveness of treatment in R? If you want to simulate one random cell (under independence) with fixed margins, that's effectively hypergeometric sampling, which we can apply recursively, so one approach is pick one cell; given
40,726
How to simulate effectiveness of treatment in R?
(It isn't clear if you want neither, only a particular one, or both marginal totals fixed. @Glen_b has provided a simulation algorithm that is based on having both marginal totals fixed; below, I provide algorithms for all three possibilities.) The assumption of independence means that the cell probabilities are equa...
How to simulate effectiveness of treatment in R?
(It isn't clear if you want neither, only a particular one, or both marginal totals fixed. @Glen_b has provided a simulation algorithm that is based on having both marginal totals fixed; below, I pro
How to simulate effectiveness of treatment in R? (It isn't clear if you want neither, only a particular one, or both marginal totals fixed. @Glen_b has provided a simulation algorithm that is based on having both marginal totals fixed; below, I provide algorithms for all three possibilities.) The assumption of indepe...
How to simulate effectiveness of treatment in R? (It isn't clear if you want neither, only a particular one, or both marginal totals fixed. @Glen_b has provided a simulation algorithm that is based on having both marginal totals fixed; below, I pro
40,727
How to simulate a system where "the failure probability per week is 3.5%"?
First consider the case we have just one machine. We will have to make some assumptions, and one common and simple one is to model the failure time as exponentially distributed. This means that the failure rate is constant (the probability of failure between time t and t+1, given survival up to time t is constant for a...
How to simulate a system where "the failure probability per week is 3.5%"?
First consider the case we have just one machine. We will have to make some assumptions, and one common and simple one is to model the failure time as exponentially distributed. This means that the fa
How to simulate a system where "the failure probability per week is 3.5%"? First consider the case we have just one machine. We will have to make some assumptions, and one common and simple one is to model the failure time as exponentially distributed. This means that the failure rate is constant (the probability of fa...
How to simulate a system where "the failure probability per week is 3.5%"? First consider the case we have just one machine. We will have to make some assumptions, and one common and simple one is to model the failure time as exponentially distributed. This means that the fa
40,728
How to simulate a system where "the failure probability per week is 3.5%"?
It seems like you don't need information more frequently than daily, so the most obvious approach would be to compute the distribution of the number of failures per day, and then simulate from that. Alternatively, you can simulate the exponential inter-event times and go from that. This gives intra-day precision if yo...
How to simulate a system where "the failure probability per week is 3.5%"?
It seems like you don't need information more frequently than daily, so the most obvious approach would be to compute the distribution of the number of failures per day, and then simulate from that.
How to simulate a system where "the failure probability per week is 3.5%"? It seems like you don't need information more frequently than daily, so the most obvious approach would be to compute the distribution of the number of failures per day, and then simulate from that. Alternatively, you can simulate the exponenti...
How to simulate a system where "the failure probability per week is 3.5%"? It seems like you don't need information more frequently than daily, so the most obvious approach would be to compute the distribution of the number of failures per day, and then simulate from that.
40,729
Understanding multiple KS tests
The Kolmogorov Smirnov statistic uses a fairly generic measure of nonuniformity - it's not particularly sensitive to every way in which a distribution may be non-uniform. In particular, it's not especially sensitive to the particular kind of nonuniformity you're looking at. The KS-test statistic looks at the maximum di...
Understanding multiple KS tests
The Kolmogorov Smirnov statistic uses a fairly generic measure of nonuniformity - it's not particularly sensitive to every way in which a distribution may be non-uniform. In particular, it's not espec
Understanding multiple KS tests The Kolmogorov Smirnov statistic uses a fairly generic measure of nonuniformity - it's not particularly sensitive to every way in which a distribution may be non-uniform. In particular, it's not especially sensitive to the particular kind of nonuniformity you're looking at. The KS-test s...
Understanding multiple KS tests The Kolmogorov Smirnov statistic uses a fairly generic measure of nonuniformity - it's not particularly sensitive to every way in which a distribution may be non-uniform. In particular, it's not espec
40,730
What is the best visualization for Cramér's V?
My default for this situation is to use a mosaic plot. I'll admit this is in part because they are convenient to make in R. One possible drawback of mosaic plots is that they are not symmetrical. It is clearly the case that one variable is the 'independent-ish' variable and the other is the 'dependent-esque' variabl...
What is the best visualization for Cramér's V?
My default for this situation is to use a mosaic plot. I'll admit this is in part because they are convenient to make in R. One possible drawback of mosaic plots is that they are not symmetrical. I
What is the best visualization for Cramér's V? My default for this situation is to use a mosaic plot. I'll admit this is in part because they are convenient to make in R. One possible drawback of mosaic plots is that they are not symmetrical. It is clearly the case that one variable is the 'independent-ish' variable...
What is the best visualization for Cramér's V? My default for this situation is to use a mosaic plot. I'll admit this is in part because they are convenient to make in R. One possible drawback of mosaic plots is that they are not symmetrical. I
40,731
Expected value of a product of two compound Poisson processes
Use the tower porperty of conditional expectations. \begin{eqnarray} \mathbb{E}\left[Y^a Y^b\right] &=& \mathbb{E}\left[\mathbb{E}\left[Y^a Y^b\ |\ N_a, N_b \right]\right] \\ &=& \mathbb{E}\left[\mathbb{E}\left[\left(\sum_{i=1}^{N_a}X_i^a\right)\left(\sum_{i=1}^{N_b}X_i^b\right) \Bigg|\ N_a, N_b \right]\right] \\ &=&...
Expected value of a product of two compound Poisson processes
Use the tower porperty of conditional expectations. \begin{eqnarray} \mathbb{E}\left[Y^a Y^b\right] &=& \mathbb{E}\left[\mathbb{E}\left[Y^a Y^b\ |\ N_a, N_b \right]\right] \\ &=& \mathbb{E}\left[\ma
Expected value of a product of two compound Poisson processes Use the tower porperty of conditional expectations. \begin{eqnarray} \mathbb{E}\left[Y^a Y^b\right] &=& \mathbb{E}\left[\mathbb{E}\left[Y^a Y^b\ |\ N_a, N_b \right]\right] \\ &=& \mathbb{E}\left[\mathbb{E}\left[\left(\sum_{i=1}^{N_a}X_i^a\right)\left(\sum_...
Expected value of a product of two compound Poisson processes Use the tower porperty of conditional expectations. \begin{eqnarray} \mathbb{E}\left[Y^a Y^b\right] &=& \mathbb{E}\left[\mathbb{E}\left[Y^a Y^b\ |\ N_a, N_b \right]\right] \\ &=& \mathbb{E}\left[\ma
40,732
Expected value of a product of two compound Poisson processes
I guess we start like this: \begin{align} Y^aY^b &= \left(\sum_{i=1}^{N^a}X^a_i\right)\left(\sum_{i=1}^{N^b}X^b_i\right)\\ &= \sum_{i=1}^{N^a}\sum_{j=1}^{N^b}X^a_iX^b_j \end{align} The expectations of the terms of the sum are all the same at $E\{X^aX^b\}$, which you say we may assume known (or estimated?). Als...
Expected value of a product of two compound Poisson processes
I guess we start like this: \begin{align} Y^aY^b &= \left(\sum_{i=1}^{N^a}X^a_i\right)\left(\sum_{i=1}^{N^b}X^b_i\right)\\ &= \sum_{i=1}^{N^a}\sum_{j=1}^{N^b}X^a_iX^b_j \end{align} The expectat
Expected value of a product of two compound Poisson processes I guess we start like this: \begin{align} Y^aY^b &= \left(\sum_{i=1}^{N^a}X^a_i\right)\left(\sum_{i=1}^{N^b}X^b_i\right)\\ &= \sum_{i=1}^{N^a}\sum_{j=1}^{N^b}X^a_iX^b_j \end{align} The expectations of the terms of the sum are all the same at $E\{X^aX^...
Expected value of a product of two compound Poisson processes I guess we start like this: \begin{align} Y^aY^b &= \left(\sum_{i=1}^{N^a}X^a_i\right)\left(\sum_{i=1}^{N^b}X^b_i\right)\\ &= \sum_{i=1}^{N^a}\sum_{j=1}^{N^b}X^a_iX^b_j \end{align} The expectat
40,733
Sampling from conditional copula
How to sample from a given univariate CDF is a huge subject, so I will assume that part of the answer is known and will address how to find the conditional CDF from the copula. By definition, any copula assigns probabilities to rectangular regions (within the unit square) delimited on the right by its first argument a...
Sampling from conditional copula
How to sample from a given univariate CDF is a huge subject, so I will assume that part of the answer is known and will address how to find the conditional CDF from the copula. By definition, any cop
Sampling from conditional copula How to sample from a given univariate CDF is a huge subject, so I will assume that part of the answer is known and will address how to find the conditional CDF from the copula. By definition, any copula assigns probabilities to rectangular regions (within the unit square) delimited on ...
Sampling from conditional copula How to sample from a given univariate CDF is a huge subject, so I will assume that part of the answer is known and will address how to find the conditional CDF from the copula. By definition, any cop
40,734
Determine where hazards starts to increase for a continuous variable
I think you are on the right track with rcs of the rms package. In fact, rms comes with its own version of Coxph, it is called cph. You might wish to try the following fit <- cph (Surv(survival, event) ~ statin + rcs(bloodpressure, 3), x=TRUE, y=TRUE, data=data) # x, y for predict, validate and calibrate; plot(Predict...
Determine where hazards starts to increase for a continuous variable
I think you are on the right track with rcs of the rms package. In fact, rms comes with its own version of Coxph, it is called cph. You might wish to try the following fit <- cph (Surv(survival, even
Determine where hazards starts to increase for a continuous variable I think you are on the right track with rcs of the rms package. In fact, rms comes with its own version of Coxph, it is called cph. You might wish to try the following fit <- cph (Surv(survival, event) ~ statin + rcs(bloodpressure, 3), x=TRUE, y=TRUE...
Determine where hazards starts to increase for a continuous variable I think you are on the right track with rcs of the rms package. In fact, rms comes with its own version of Coxph, it is called cph. You might wish to try the following fit <- cph (Surv(survival, even
40,735
Determine where hazards starts to increase for a continuous variable
Don't accept this answer, it's only for variety: In oncology, there is a different approach more closely to proportional hazards. It would work as follows: One splits the blood pressure scale in small intervals and estimates the hazard ratios "locally". You'll get a plot of blood pressure vs. hazard ratio. It is called...
Determine where hazards starts to increase for a continuous variable
Don't accept this answer, it's only for variety: In oncology, there is a different approach more closely to proportional hazards. It would work as follows: One splits the blood pressure scale in small
Determine where hazards starts to increase for a continuous variable Don't accept this answer, it's only for variety: In oncology, there is a different approach more closely to proportional hazards. It would work as follows: One splits the blood pressure scale in small intervals and estimates the hazard ratios "locally...
Determine where hazards starts to increase for a continuous variable Don't accept this answer, it's only for variety: In oncology, there is a different approach more closely to proportional hazards. It would work as follows: One splits the blood pressure scale in small
40,736
Determine where hazards starts to increase for a continuous variable
I would try the cox.ph family in the mgcv package, which is available for the generalized additive models implemented by the gam function. Generalized additive models (GAMs) are sort of the multiple linear regression analogue for spline models. If you have a large dataset, worry not, because mgcv is also quite fast. Af...
Determine where hazards starts to increase for a continuous variable
I would try the cox.ph family in the mgcv package, which is available for the generalized additive models implemented by the gam function. Generalized additive models (GAMs) are sort of the multiple l
Determine where hazards starts to increase for a continuous variable I would try the cox.ph family in the mgcv package, which is available for the generalized additive models implemented by the gam function. Generalized additive models (GAMs) are sort of the multiple linear regression analogue for spline models. If you...
Determine where hazards starts to increase for a continuous variable I would try the cox.ph family in the mgcv package, which is available for the generalized additive models implemented by the gam function. Generalized additive models (GAMs) are sort of the multiple l
40,737
Determine where hazards starts to increase for a continuous variable
For a graphic display of relation between BP and events, you could following using ggplot2 and R. Here is an example using your own sample data: library(ggplot2) ggplot(data, aes(x=bloodpressure, y=event))+stat_smooth() The shaded zones indicate 95% confidence intervals. Two curves can be obtained based on statin us...
Determine where hazards starts to increase for a continuous variable
For a graphic display of relation between BP and events, you could following using ggplot2 and R. Here is an example using your own sample data: library(ggplot2) ggplot(data, aes(x=bloodpressure, y=ev
Determine where hazards starts to increase for a continuous variable For a graphic display of relation between BP and events, you could following using ggplot2 and R. Here is an example using your own sample data: library(ggplot2) ggplot(data, aes(x=bloodpressure, y=event))+stat_smooth() The shaded zones indicate 95%...
Determine where hazards starts to increase for a continuous variable For a graphic display of relation between BP and events, you could following using ggplot2 and R. Here is an example using your own sample data: library(ggplot2) ggplot(data, aes(x=bloodpressure, y=ev
40,738
Is it correct to use Precision-Recall AUC in a balanced dataset situation?
You can't compare PR-AUC values based on differently balanced data. You can use ROC-AUC for that, though, since that does not depend on class balance. The larger the fraction of positives in the data set, the larger the area under the PR curve will be for a given model. By increasing the fraction of positives in the d...
Is it correct to use Precision-Recall AUC in a balanced dataset situation?
You can't compare PR-AUC values based on differently balanced data. You can use ROC-AUC for that, though, since that does not depend on class balance. The larger the fraction of positives in the data
Is it correct to use Precision-Recall AUC in a balanced dataset situation? You can't compare PR-AUC values based on differently balanced data. You can use ROC-AUC for that, though, since that does not depend on class balance. The larger the fraction of positives in the data set, the larger the area under the PR curve ...
Is it correct to use Precision-Recall AUC in a balanced dataset situation? You can't compare PR-AUC values based on differently balanced data. You can use ROC-AUC for that, though, since that does not depend on class balance. The larger the fraction of positives in the data
40,739
Using the same variable as a fixed and random effect in Mixed Effect Models
Note that your model rm1 includes a factor that is used both a fixed and a random effect -- namely the intercept. So yes, it is OK to do what you propose. The only issue is that there are a whole lot more random effects to estimate. There is always a trade off between parsimony and fit, so look at the AIC and BIC stati...
Using the same variable as a fixed and random effect in Mixed Effect Models
Note that your model rm1 includes a factor that is used both a fixed and a random effect -- namely the intercept. So yes, it is OK to do what you propose. The only issue is that there are a whole lot
Using the same variable as a fixed and random effect in Mixed Effect Models Note that your model rm1 includes a factor that is used both a fixed and a random effect -- namely the intercept. So yes, it is OK to do what you propose. The only issue is that there are a whole lot more random effects to estimate. There is al...
Using the same variable as a fixed and random effect in Mixed Effect Models Note that your model rm1 includes a factor that is used both a fixed and a random effect -- namely the intercept. So yes, it is OK to do what you propose. The only issue is that there are a whole lot
40,740
How does the 45 degree banking rule apply when plotting multiple data series in one chart?
The Visweek 2012 paper, An Empirical Model of Slope Ratio Comparisons [PDF] by Justin Talbot, John Gerth, and Pat Hanrahan, attempts to generalize the question of optimal banking. Excerpt from introduction: Despite the practical success of this guideline, its perceptual underpinnings remain unclear. Cleveland et al....
How does the 45 degree banking rule apply when plotting multiple data series in one chart?
The Visweek 2012 paper, An Empirical Model of Slope Ratio Comparisons [PDF] by Justin Talbot, John Gerth, and Pat Hanrahan, attempts to generalize the question of optimal banking. Excerpt from introdu
How does the 45 degree banking rule apply when plotting multiple data series in one chart? The Visweek 2012 paper, An Empirical Model of Slope Ratio Comparisons [PDF] by Justin Talbot, John Gerth, and Pat Hanrahan, attempts to generalize the question of optimal banking. Excerpt from introduction: Despite the practical...
How does the 45 degree banking rule apply when plotting multiple data series in one chart? The Visweek 2012 paper, An Empirical Model of Slope Ratio Comparisons [PDF] by Justin Talbot, John Gerth, and Pat Hanrahan, attempts to generalize the question of optimal banking. Excerpt from introdu
40,741
Why don't we use the unbiased sample variance to calculate the standard error?
The $n$ in $\sigma/\sqrt{n}$ has nothing to do with how you estimate $\sigma$. It has to do with the fact that the average of $n$ iid random variables $X_i$ has variance $\sigma^2/n$ when $\mbox{Var}(X_i) = \sigma^2$. If $\sigma$ is unknown, you estimate it using $s = \sqrt{\frac1{n-1}\sum (X_i-\bar X)^2}$, so that yo...
Why don't we use the unbiased sample variance to calculate the standard error?
The $n$ in $\sigma/\sqrt{n}$ has nothing to do with how you estimate $\sigma$. It has to do with the fact that the average of $n$ iid random variables $X_i$ has variance $\sigma^2/n$ when $\mbox{Var}(
Why don't we use the unbiased sample variance to calculate the standard error? The $n$ in $\sigma/\sqrt{n}$ has nothing to do with how you estimate $\sigma$. It has to do with the fact that the average of $n$ iid random variables $X_i$ has variance $\sigma^2/n$ when $\mbox{Var}(X_i) = \sigma^2$. If $\sigma$ is unknown...
Why don't we use the unbiased sample variance to calculate the standard error? The $n$ in $\sigma/\sqrt{n}$ has nothing to do with how you estimate $\sigma$. It has to do with the fact that the average of $n$ iid random variables $X_i$ has variance $\sigma^2/n$ when $\mbox{Var}(
40,742
lm weights and the standard error
I think you are looking for: fit2 = lm(y ~ x, data = d.f, weights = 1/u^2) parameter.covariance.matrix = vcov(fit2)/summary(fit2)$sigma^2 there is probably a better way to get this information from the fit2 object. This works even if it isn't elegant.
lm weights and the standard error
I think you are looking for: fit2 = lm(y ~ x, data = d.f, weights = 1/u^2) parameter.covariance.matrix = vcov(fit2)/summary(fit2)$sigma^2 there is probably a better way to get this information from t
lm weights and the standard error I think you are looking for: fit2 = lm(y ~ x, data = d.f, weights = 1/u^2) parameter.covariance.matrix = vcov(fit2)/summary(fit2)$sigma^2 there is probably a better way to get this information from the fit2 object. This works even if it isn't elegant.
lm weights and the standard error I think you are looking for: fit2 = lm(y ~ x, data = d.f, weights = 1/u^2) parameter.covariance.matrix = vcov(fit2)/summary(fit2)$sigma^2 there is probably a better way to get this information from t
40,743
lm weights and the standard error
It seems that the u values represent known standard errors of the y values. However, as pointed out by Glen_b, with lm(y ~ x, data = d.f, weights = 1/u^2), the variances (u^2) are treated as if they are known only up to a proportionality constant. If you want to fit a model with known standard errors, you can approach ...
lm weights and the standard error
It seems that the u values represent known standard errors of the y values. However, as pointed out by Glen_b, with lm(y ~ x, data = d.f, weights = 1/u^2), the variances (u^2) are treated as if they a
lm weights and the standard error It seems that the u values represent known standard errors of the y values. However, as pointed out by Glen_b, with lm(y ~ x, data = d.f, weights = 1/u^2), the variances (u^2) are treated as if they are known only up to a proportionality constant. If you want to fit a model with known ...
lm weights and the standard error It seems that the u values represent known standard errors of the y values. However, as pointed out by Glen_b, with lm(y ~ x, data = d.f, weights = 1/u^2), the variances (u^2) are treated as if they a
40,744
lm weights and the standard error
The reported standard error for fit2 is not correct, indeed. The reason for this is that the residual standard error for the inverse-variance weighted regression should be 1. Hence, to obtain the correct value of the uncertainty in the slope for fit2 you have to divide the reported standard error by the reported residu...
lm weights and the standard error
The reported standard error for fit2 is not correct, indeed. The reason for this is that the residual standard error for the inverse-variance weighted regression should be 1. Hence, to obtain the corr
lm weights and the standard error The reported standard error for fit2 is not correct, indeed. The reason for this is that the residual standard error for the inverse-variance weighted regression should be 1. Hence, to obtain the correct value of the uncertainty in the slope for fit2 you have to divide the reported sta...
lm weights and the standard error The reported standard error for fit2 is not correct, indeed. The reason for this is that the residual standard error for the inverse-variance weighted regression should be 1. Hence, to obtain the corr
40,745
Derivative of order statistics
It seems to me that $\phi$ and $\Phi$ are the PDF and CDF of the standard Gaussian; that is, \begin{equation} \phi(x) = \Phi^\prime (x). \end{equation} To obtain $g_{\Phi}(x) \equiv {\rm med}_{Y} |x-Y|$ (the CDF of $Y$ is $\Phi$), one should find a distance $a$ such that for exactly half of the members of the Gaussian ...
Derivative of order statistics
It seems to me that $\phi$ and $\Phi$ are the PDF and CDF of the standard Gaussian; that is, \begin{equation} \phi(x) = \Phi^\prime (x). \end{equation} To obtain $g_{\Phi}(x) \equiv {\rm med}_{Y} |x-Y
Derivative of order statistics It seems to me that $\phi$ and $\Phi$ are the PDF and CDF of the standard Gaussian; that is, \begin{equation} \phi(x) = \Phi^\prime (x). \end{equation} To obtain $g_{\Phi}(x) \equiv {\rm med}_{Y} |x-Y|$ (the CDF of $Y$ is $\Phi$), one should find a distance $a$ such that for exactly half ...
Derivative of order statistics It seems to me that $\phi$ and $\Phi$ are the PDF and CDF of the standard Gaussian; that is, \begin{equation} \phi(x) = \Phi^\prime (x). \end{equation} To obtain $g_{\Phi}(x) \equiv {\rm med}_{Y} |x-Y
40,746
Is there a difference between semipartial correlation and regression coefficient in multiple regression?
While thorough and ultimately correct, the comment of @ttnphns given to the question is slightly misleading in the sense that it focuses on the similarities between the standardized regression coefficient and the partial correlation, while the more obvious comparison would be between standardized regression coefficient...
Is there a difference between semipartial correlation and regression coefficient in multiple regress
While thorough and ultimately correct, the comment of @ttnphns given to the question is slightly misleading in the sense that it focuses on the similarities between the standardized regression coeffic
Is there a difference between semipartial correlation and regression coefficient in multiple regression? While thorough and ultimately correct, the comment of @ttnphns given to the question is slightly misleading in the sense that it focuses on the similarities between the standardized regression coefficient and the pa...
Is there a difference between semipartial correlation and regression coefficient in multiple regress While thorough and ultimately correct, the comment of @ttnphns given to the question is slightly misleading in the sense that it focuses on the similarities between the standardized regression coeffic
40,747
Is there a difference between semipartial correlation and regression coefficient in multiple regression?
In their answer @Soporiferous correctly says of the relation between the semipartial correlation and the standardized beta coefficient, and hastes to label my old comment to the question (about the sooner existence of a relation between the beta and partial correlation) "slightly misleading". But in my comment, I impli...
Is there a difference between semipartial correlation and regression coefficient in multiple regress
In their answer @Soporiferous correctly says of the relation between the semipartial correlation and the standardized beta coefficient, and hastes to label my old comment to the question (about the so
Is there a difference between semipartial correlation and regression coefficient in multiple regression? In their answer @Soporiferous correctly says of the relation between the semipartial correlation and the standardized beta coefficient, and hastes to label my old comment to the question (about the sooner existence ...
Is there a difference between semipartial correlation and regression coefficient in multiple regress In their answer @Soporiferous correctly says of the relation between the semipartial correlation and the standardized beta coefficient, and hastes to label my old comment to the question (about the so
40,748
How many answers to memorize for a test?
Let $N = 15$ be the total population of questions, $n = 7$ the number that will appear on the test, and $m = 5$ the number of questions you need to answer. There are $\binom{N}{n}$ possible tests; I'll assume the test is selected uniformly at random without replacement. Say you memorize $K$ of the questions. Then, the ...
How many answers to memorize for a test?
Let $N = 15$ be the total population of questions, $n = 7$ the number that will appear on the test, and $m = 5$ the number of questions you need to answer. There are $\binom{N}{n}$ possible tests; I'l
How many answers to memorize for a test? Let $N = 15$ be the total population of questions, $n = 7$ the number that will appear on the test, and $m = 5$ the number of questions you need to answer. There are $\binom{N}{n}$ possible tests; I'll assume the test is selected uniformly at random without replacement. Say you ...
How many answers to memorize for a test? Let $N = 15$ be the total population of questions, $n = 7$ the number that will appear on the test, and $m = 5$ the number of questions you need to answer. There are $\binom{N}{n}$ possible tests; I'l
40,749
How many answers to memorize for a test?
The objective of a test is to encourage you to learn and understand the material. If you do that you shouldn't have to memorize anything
How many answers to memorize for a test?
The objective of a test is to encourage you to learn and understand the material. If you do that you shouldn't have to memorize anything
How many answers to memorize for a test? The objective of a test is to encourage you to learn and understand the material. If you do that you shouldn't have to memorize anything
How many answers to memorize for a test? The objective of a test is to encourage you to learn and understand the material. If you do that you shouldn't have to memorize anything
40,750
Interpreting significance of Cragg-Donald F-Statistic for weak instruments
If you have a weak instrument then the bias of the IV estimator can be large and in some cases it can even be bigger than the bias of the OLS estimator. With their tabulated values Stock and Yogo first fix the largest relative bias of the two stage least squares estimator (2SLS) relative to OLS that is acceptable. In t...
Interpreting significance of Cragg-Donald F-Statistic for weak instruments
If you have a weak instrument then the bias of the IV estimator can be large and in some cases it can even be bigger than the bias of the OLS estimator. With their tabulated values Stock and Yogo firs
Interpreting significance of Cragg-Donald F-Statistic for weak instruments If you have a weak instrument then the bias of the IV estimator can be large and in some cases it can even be bigger than the bias of the OLS estimator. With their tabulated values Stock and Yogo first fix the largest relative bias of the two st...
Interpreting significance of Cragg-Donald F-Statistic for weak instruments If you have a weak instrument then the bias of the IV estimator can be large and in some cases it can even be bigger than the bias of the OLS estimator. With their tabulated values Stock and Yogo firs
40,751
Proof of Point-Biserial Correlation being a special case of Pearson Correlation
Let the $n$ data consist of $n_0\gt 0$ $(x, 0)$ pairs and $n_1\gt 0$ $(x, 1)$ pairs. Their Pearson correlation coefficient will be the same as the reversed data consisting of corresponding $(0,x)$ and $(1,x)$ pairs. Because there are exactly two distinct values of the first coordinates, the regression line of the rev...
Proof of Point-Biserial Correlation being a special case of Pearson Correlation
Let the $n$ data consist of $n_0\gt 0$ $(x, 0)$ pairs and $n_1\gt 0$ $(x, 1)$ pairs. Their Pearson correlation coefficient will be the same as the reversed data consisting of corresponding $(0,x)$ an
Proof of Point-Biserial Correlation being a special case of Pearson Correlation Let the $n$ data consist of $n_0\gt 0$ $(x, 0)$ pairs and $n_1\gt 0$ $(x, 1)$ pairs. Their Pearson correlation coefficient will be the same as the reversed data consisting of corresponding $(0,x)$ and $(1,x)$ pairs. Because there are exac...
Proof of Point-Biserial Correlation being a special case of Pearson Correlation Let the $n$ data consist of $n_0\gt 0$ $(x, 0)$ pairs and $n_1\gt 0$ $(x, 1)$ pairs. Their Pearson correlation coefficient will be the same as the reversed data consisting of corresponding $(0,x)$ an
40,752
Difference in PCA loadings between R and SPSS
The difference is in how R and SPSS interpret the word "loading". Loadings in PCA should be defined as eigenvectors of the covariance matrix scaled by the square roots of the respective eigenvalues. Please see e.g. my answer here for motivation: How does "Fundamental Theorem of Factor Analysis" apply to PCA, or how ar...
Difference in PCA loadings between R and SPSS
The difference is in how R and SPSS interpret the word "loading". Loadings in PCA should be defined as eigenvectors of the covariance matrix scaled by the square roots of the respective eigenvalues. P
Difference in PCA loadings between R and SPSS The difference is in how R and SPSS interpret the word "loading". Loadings in PCA should be defined as eigenvectors of the covariance matrix scaled by the square roots of the respective eigenvalues. Please see e.g. my answer here for motivation: How does "Fundamental Theor...
Difference in PCA loadings between R and SPSS The difference is in how R and SPSS interpret the word "loading". Loadings in PCA should be defined as eigenvectors of the covariance matrix scaled by the square roots of the respective eigenvalues. P
40,753
Difference in PCA loadings between R and SPSS
The simple answer, by a R-guy. About the sign-shifting; each loading-vector have an "evil twin vector" pointing in 180 degrees opposite direction in feature space. The loading vectors yield scores of opposite signs. Similar to (-1)(+1) =(+1)(-1), the solutions are identical. Also the length of the loading vector does n...
Difference in PCA loadings between R and SPSS
The simple answer, by a R-guy. About the sign-shifting; each loading-vector have an "evil twin vector" pointing in 180 degrees opposite direction in feature space. The loading vectors yield scores of
Difference in PCA loadings between R and SPSS The simple answer, by a R-guy. About the sign-shifting; each loading-vector have an "evil twin vector" pointing in 180 degrees opposite direction in feature space. The loading vectors yield scores of opposite signs. Similar to (-1)(+1) =(+1)(-1), the solutions are identical...
Difference in PCA loadings between R and SPSS The simple answer, by a R-guy. About the sign-shifting; each loading-vector have an "evil twin vector" pointing in 180 degrees opposite direction in feature space. The loading vectors yield scores of
40,754
Difference in PCA loadings between R and SPSS
Full details on the SPSS PCA algorithm would be found in the Algorithms doc included with the product. But it appears that the results are actually identical up to an arbitrary linear transformation.
Difference in PCA loadings between R and SPSS
Full details on the SPSS PCA algorithm would be found in the Algorithms doc included with the product. But it appears that the results are actually identical up to an arbitrary linear transformation.
Difference in PCA loadings between R and SPSS Full details on the SPSS PCA algorithm would be found in the Algorithms doc included with the product. But it appears that the results are actually identical up to an arbitrary linear transformation.
Difference in PCA loadings between R and SPSS Full details on the SPSS PCA algorithm would be found in the Algorithms doc included with the product. But it appears that the results are actually identical up to an arbitrary linear transformation.
40,755
Top scoring students across a series of tests
I agree with the comments above that this would be easier if the question were a little more precise. Here are some things to think about. set.seed(1) ## simulate data: refine to reflect attributes of interest n <- 30 ## test count m <- 100 ## student count ## student "ability": student rows, test columns sa <- m...
Top scoring students across a series of tests
I agree with the comments above that this would be easier if the question were a little more precise. Here are some things to think about. set.seed(1) ## simulate data: refine to reflect attributes
Top scoring students across a series of tests I agree with the comments above that this would be easier if the question were a little more precise. Here are some things to think about. set.seed(1) ## simulate data: refine to reflect attributes of interest n <- 30 ## test count m <- 100 ## student count ## student...
Top scoring students across a series of tests I agree with the comments above that this would be easier if the question were a little more precise. Here are some things to think about. set.seed(1) ## simulate data: refine to reflect attributes
40,756
Top scoring students across a series of tests
The method that you describe seems quite convoluted (and perhaps fairly inaccurate). Presumably, the tests measure some sort of trait (e.g., intelligence), or ability (e.g., math ability), or experience (e.g., learning) and you want the top 10% of students who score highest on this construct. You also mention having a ...
Top scoring students across a series of tests
The method that you describe seems quite convoluted (and perhaps fairly inaccurate). Presumably, the tests measure some sort of trait (e.g., intelligence), or ability (e.g., math ability), or experien
Top scoring students across a series of tests The method that you describe seems quite convoluted (and perhaps fairly inaccurate). Presumably, the tests measure some sort of trait (e.g., intelligence), or ability (e.g., math ability), or experience (e.g., learning) and you want the top 10% of students who score highest...
Top scoring students across a series of tests The method that you describe seems quite convoluted (and perhaps fairly inaccurate). Presumably, the tests measure some sort of trait (e.g., intelligence), or ability (e.g., math ability), or experien
40,757
Top scoring students across a series of tests
Personally, I don't like the premise. You asked and I will work with it, but I do not like the fundamental here. Personal aside on teaching I personally think that a teacher has 2 jobs, and neither is improved by ambiguity: to teach and certify the student has all the fundamentals down. If something isn't a fundam...
Top scoring students across a series of tests
Personally, I don't like the premise. You asked and I will work with it, but I do not like the fundamental here. Personal aside on teaching I personally think that a teacher has 2 jobs, and neither
Top scoring students across a series of tests Personally, I don't like the premise. You asked and I will work with it, but I do not like the fundamental here. Personal aside on teaching I personally think that a teacher has 2 jobs, and neither is improved by ambiguity: to teach and certify the student has all the f...
Top scoring students across a series of tests Personally, I don't like the premise. You asked and I will work with it, but I do not like the fundamental here. Personal aside on teaching I personally think that a teacher has 2 jobs, and neither
40,758
Books for learning non parametric Bayesian model
Part V of Bayesian Data Analysis is on non-linear and non-parametric methods, which as I recall has chapters on each of basis function methods, Gaussian processes, and Dirichlet processes. (Don't have my copy handy.) Gaussian Processes for Machine Learning is comprehensive, covering both theory and implementation, and ...
Books for learning non parametric Bayesian model
Part V of Bayesian Data Analysis is on non-linear and non-parametric methods, which as I recall has chapters on each of basis function methods, Gaussian processes, and Dirichlet processes. (Don't have
Books for learning non parametric Bayesian model Part V of Bayesian Data Analysis is on non-linear and non-parametric methods, which as I recall has chapters on each of basis function methods, Gaussian processes, and Dirichlet processes. (Don't have my copy handy.) Gaussian Processes for Machine Learning is comprehensi...
Books for learning non parametric Bayesian model Part V of Bayesian Data Analysis is on non-linear and non-parametric methods, which as I recall has chapters on each of basis function methods, Gaussian processes, and Dirichlet processes. (Don't have
40,759
Books for learning non parametric Bayesian model
A fantastic reference is Fundamentals of Nonparametric Bayesian Inference by Ghosal and van der Vaart.
Books for learning non parametric Bayesian model
A fantastic reference is Fundamentals of Nonparametric Bayesian Inference by Ghosal and van der Vaart.
Books for learning non parametric Bayesian model A fantastic reference is Fundamentals of Nonparametric Bayesian Inference by Ghosal and van der Vaart.
Books for learning non parametric Bayesian model A fantastic reference is Fundamentals of Nonparametric Bayesian Inference by Ghosal and van der Vaart.
40,760
Books for learning non parametric Bayesian model
Here is a good collection to buy. I like the "Bundle of algorithms in Java", it gives straight out implementations/examples as does "Machine learning, practical tools and techniques" which is also a great book with practical examples. Hope that helps
Books for learning non parametric Bayesian model
Here is a good collection to buy. I like the "Bundle of algorithms in Java", it gives straight out implementations/examples as does "Machine learning, practical tools and techniques" which is also a g
Books for learning non parametric Bayesian model Here is a good collection to buy. I like the "Bundle of algorithms in Java", it gives straight out implementations/examples as does "Machine learning, practical tools and techniques" which is also a great book with practical examples. Hope that helps
Books for learning non parametric Bayesian model Here is a good collection to buy. I like the "Bundle of algorithms in Java", it gives straight out implementations/examples as does "Machine learning, practical tools and techniques" which is also a g
40,761
Limiting distribution of the first order statistic of a general distribution
(The answer has been reworked to respond to OP's and whuber's comments). The complementary cdf of $X$ is $$G_n(x) = \left[1-F_Z\left(x/n\right)\right]^{n}$$ To prove that asymptotically $X$ follows an exponential distribution, we need to show that $$\lim_{n\rightarrow \infty}G_n(x)= e^{-\lambda x}$$ Consider $$F_Z\le...
Limiting distribution of the first order statistic of a general distribution
(The answer has been reworked to respond to OP's and whuber's comments). The complementary cdf of $X$ is $$G_n(x) = \left[1-F_Z\left(x/n\right)\right]^{n}$$ To prove that asymptotically $X$ follows
Limiting distribution of the first order statistic of a general distribution (The answer has been reworked to respond to OP's and whuber's comments). The complementary cdf of $X$ is $$G_n(x) = \left[1-F_Z\left(x/n\right)\right]^{n}$$ To prove that asymptotically $X$ follows an exponential distribution, we need to sho...
Limiting distribution of the first order statistic of a general distribution (The answer has been reworked to respond to OP's and whuber's comments). The complementary cdf of $X$ is $$G_n(x) = \left[1-F_Z\left(x/n\right)\right]^{n}$$ To prove that asymptotically $X$ follows
40,762
Limiting distribution of the first order statistic of a general distribution
To prove convergence in distribution we need to show that the complementary distribution of $X_n$, written $G_n$ where $G_n(x)=\Pr(X_n\gt x)$, gets close to an exponential function for $n$ sufficiently large. To this end, let $t\gt 0$ be an arbitrary point at which to evaluate $G_n(t)$. Note that the independence of ...
Limiting distribution of the first order statistic of a general distribution
To prove convergence in distribution we need to show that the complementary distribution of $X_n$, written $G_n$ where $G_n(x)=\Pr(X_n\gt x)$, gets close to an exponential function for $n$ sufficientl
Limiting distribution of the first order statistic of a general distribution To prove convergence in distribution we need to show that the complementary distribution of $X_n$, written $G_n$ where $G_n(x)=\Pr(X_n\gt x)$, gets close to an exponential function for $n$ sufficiently large. To this end, let $t\gt 0$ be an a...
Limiting distribution of the first order statistic of a general distribution To prove convergence in distribution we need to show that the complementary distribution of $X_n$, written $G_n$ where $G_n(x)=\Pr(X_n\gt x)$, gets close to an exponential function for $n$ sufficientl
40,763
Methods for testing a Bayesian method's software implementation
Bayesians don't lose the relative frequency-based interpretation of probability. In particular, if you define this procedure: simulate from the prior, then simulate from the model using those values from the prior, and estimate the parameters using the same prior. Then your credible intervals should have the approp...
Methods for testing a Bayesian method's software implementation
Bayesians don't lose the relative frequency-based interpretation of probability. In particular, if you define this procedure: simulate from the prior, then simulate from the model using those values
Methods for testing a Bayesian method's software implementation Bayesians don't lose the relative frequency-based interpretation of probability. In particular, if you define this procedure: simulate from the prior, then simulate from the model using those values from the prior, and estimate the parameters using the ...
Methods for testing a Bayesian method's software implementation Bayesians don't lose the relative frequency-based interpretation of probability. In particular, if you define this procedure: simulate from the prior, then simulate from the model using those values
40,764
Missing observations in a linear mixed model
You don't need to omit an individual if there is only missingness for a few observations. In fact, you want to include participants with missingness to increase your power and avoid biasing your results. The nice thing about mixed-effects is that they handle missing data pretty well with maximum likelihood estimation, ...
Missing observations in a linear mixed model
You don't need to omit an individual if there is only missingness for a few observations. In fact, you want to include participants with missingness to increase your power and avoid biasing your resul
Missing observations in a linear mixed model You don't need to omit an individual if there is only missingness for a few observations. In fact, you want to include participants with missingness to increase your power and avoid biasing your results. The nice thing about mixed-effects is that they handle missing data pre...
Missing observations in a linear mixed model You don't need to omit an individual if there is only missingness for a few observations. In fact, you want to include participants with missingness to increase your power and avoid biasing your resul
40,765
SVM basic theory?
Nonlinear SVM is a synonym for SVM with a kernel trick. The idea is that if there is no linear separation in the original space, it may exist in some other space, quite likely of a higher dimension. Kernel trick allows one to construct this space implicitly by messing with the dot product in the original space; that's ...
SVM basic theory?
Nonlinear SVM is a synonym for SVM with a kernel trick. The idea is that if there is no linear separation in the original space, it may exist in some other space, quite likely of a higher dimension. K
SVM basic theory? Nonlinear SVM is a synonym for SVM with a kernel trick. The idea is that if there is no linear separation in the original space, it may exist in some other space, quite likely of a higher dimension. Kernel trick allows one to construct this space implicitly by messing with the dot product in the origi...
SVM basic theory? Nonlinear SVM is a synonym for SVM with a kernel trick. The idea is that if there is no linear separation in the original space, it may exist in some other space, quite likely of a higher dimension. K
40,766
Run time analysis of the clustering algorithm (k-means)
Looking at these notes time complexity of Lloyds algorithm for k-means clustering is given as: O(n * K * I * d) n : number of points K : number of clusters I : number of iterations d : number of attributes My gut feeling is that in your case number of iterations (and number of attributes) is assumed to be constant.
Run time analysis of the clustering algorithm (k-means)
Looking at these notes time complexity of Lloyds algorithm for k-means clustering is given as: O(n * K * I * d) n : number of points K : number of clusters I : number of iterations d : number of attr
Run time analysis of the clustering algorithm (k-means) Looking at these notes time complexity of Lloyds algorithm for k-means clustering is given as: O(n * K * I * d) n : number of points K : number of clusters I : number of iterations d : number of attributes My gut feeling is that in your case number of iterations...
Run time analysis of the clustering algorithm (k-means) Looking at these notes time complexity of Lloyds algorithm for k-means clustering is given as: O(n * K * I * d) n : number of points K : number of clusters I : number of iterations d : number of attr
40,767
Why the trees generated via bagging are identically distributed?
Bagging technique uses bootstraps (random samples of the same length with replacement) to train each tree from the assembly. Thus, the samples used to build each individual tree comes from the same population as the original sample. This is why the input and target variables are called ID (identically distributed = sam...
Why the trees generated via bagging are identically distributed?
Bagging technique uses bootstraps (random samples of the same length with replacement) to train each tree from the assembly. Thus, the samples used to build each individual tree comes from the same po
Why the trees generated via bagging are identically distributed? Bagging technique uses bootstraps (random samples of the same length with replacement) to train each tree from the assembly. Thus, the samples used to build each individual tree comes from the same population as the original sample. This is why the input ...
Why the trees generated via bagging are identically distributed? Bagging technique uses bootstraps (random samples of the same length with replacement) to train each tree from the assembly. Thus, the samples used to build each individual tree comes from the same po
40,768
Why the trees generated via bagging are identically distributed?
I think rapaio is conflating a couple key concepts and in doing so misinterpreted the OP's question. Yes, the bootstrap samples utilized within a bagging algorithm are IID. However, the bagging estimator is ID, NOT IID. The bagging algorithm will generate B trees and the corresponding prediction estimates, $\{\hat{f...
Why the trees generated via bagging are identically distributed?
I think rapaio is conflating a couple key concepts and in doing so misinterpreted the OP's question. Yes, the bootstrap samples utilized within a bagging algorithm are IID. However, the bagging esti
Why the trees generated via bagging are identically distributed? I think rapaio is conflating a couple key concepts and in doing so misinterpreted the OP's question. Yes, the bootstrap samples utilized within a bagging algorithm are IID. However, the bagging estimator is ID, NOT IID. The bagging algorithm will gener...
Why the trees generated via bagging are identically distributed? I think rapaio is conflating a couple key concepts and in doing so misinterpreted the OP's question. Yes, the bootstrap samples utilized within a bagging algorithm are IID. However, the bagging esti
40,769
What is copula transformation
I believe you're just referring to transforming each marginal distribution to $U[0,1]$ via the probability integral transform, which when applied to each of the variables individually, transforms a d-dimensional distribution to its copula. For example, if you had a bivariate normal $(X,Y)$, and transform $U=F_X(X)$ and...
What is copula transformation
I believe you're just referring to transforming each marginal distribution to $U[0,1]$ via the probability integral transform, which when applied to each of the variables individually, transforms a d-
What is copula transformation I believe you're just referring to transforming each marginal distribution to $U[0,1]$ via the probability integral transform, which when applied to each of the variables individually, transforms a d-dimensional distribution to its copula. For example, if you had a bivariate normal $(X,Y)$...
What is copula transformation I believe you're just referring to transforming each marginal distribution to $U[0,1]$ via the probability integral transform, which when applied to each of the variables individually, transforms a d-
40,770
What is copula transformation
Sklar's theorem says that (bivariate case), for any given joint distribution function $H$, of two random variables $X$ and $Y$, with uniform univariate margins, $F_x(x)$ and $G_y(y)$, of $X$ and $Y$ respectively, then there exist a copula function $C$, such that: $$H(x,y)= C(F_x(x),G_y(y)) $$ If all margins is continu...
What is copula transformation
Sklar's theorem says that (bivariate case), for any given joint distribution function $H$, of two random variables $X$ and $Y$, with uniform univariate margins, $F_x(x)$ and $G_y(y)$, of $X$ and $Y$ r
What is copula transformation Sklar's theorem says that (bivariate case), for any given joint distribution function $H$, of two random variables $X$ and $Y$, with uniform univariate margins, $F_x(x)$ and $G_y(y)$, of $X$ and $Y$ respectively, then there exist a copula function $C$, such that: $$H(x,y)= C(F_x(x),G_y(y)...
What is copula transformation Sklar's theorem says that (bivariate case), for any given joint distribution function $H$, of two random variables $X$ and $Y$, with uniform univariate margins, $F_x(x)$ and $G_y(y)$, of $X$ and $Y$ r
40,771
OLS estimate of a linear model with dummy variable
The model that we have is: Knowing that X is a dummy variable, we can get the following: Using the above information, we can substitute for components of OLS estimation and by simplifying we get:
OLS estimate of a linear model with dummy variable
The model that we have is: Knowing that X is a dummy variable, we can get the following: Using the above information, we can substitute for components of OLS estimation and by simplifying we get:
OLS estimate of a linear model with dummy variable The model that we have is: Knowing that X is a dummy variable, we can get the following: Using the above information, we can substitute for components of OLS estimation and by simplifying we get:
OLS estimate of a linear model with dummy variable The model that we have is: Knowing that X is a dummy variable, we can get the following: Using the above information, we can substitute for components of OLS estimation and by simplifying we get:
40,772
How to prove that the chance of occurrence of event A increases in presence of event B, when both have a different Poisson distribution?
If A is Poisson, you would speak of its rate of occurrence, rather than its probability. If this is to be based on data, rather than a fully identified joint distribution, a simple approach is to condition on is observed values of B and the interest is if the observed counts of A tends to be higher when the count of B...
How to prove that the chance of occurrence of event A increases in presence of event B, when both ha
If A is Poisson, you would speak of its rate of occurrence, rather than its probability. If this is to be based on data, rather than a fully identified joint distribution, a simple approach is to con
How to prove that the chance of occurrence of event A increases in presence of event B, when both have a different Poisson distribution? If A is Poisson, you would speak of its rate of occurrence, rather than its probability. If this is to be based on data, rather than a fully identified joint distribution, a simple a...
How to prove that the chance of occurrence of event A increases in presence of event B, when both ha If A is Poisson, you would speak of its rate of occurrence, rather than its probability. If this is to be based on data, rather than a fully identified joint distribution, a simple approach is to con
40,773
How to log transform data with a large number of zeros
Do you know what the sensitivity of the machine is? If it cannot reliably record any values less than 100 (and therefore reports them as 0), then that means all your 0's are values between 0 (or negative infinity) and 100, adding 0.5 would underestimate this, 50 would be a more reasonable value, or possibly 100. It w...
How to log transform data with a large number of zeros
Do you know what the sensitivity of the machine is? If it cannot reliably record any values less than 100 (and therefore reports them as 0), then that means all your 0's are values between 0 (or nega
How to log transform data with a large number of zeros Do you know what the sensitivity of the machine is? If it cannot reliably record any values less than 100 (and therefore reports them as 0), then that means all your 0's are values between 0 (or negative infinity) and 100, adding 0.5 would underestimate this, 50 w...
How to log transform data with a large number of zeros Do you know what the sensitivity of the machine is? If it cannot reliably record any values less than 100 (and therefore reports them as 0), then that means all your 0's are values between 0 (or nega
40,774
How to log transform data with a large number of zeros
In your case, I would treat zeros separately from the other data points. You can work out a model for non-zero elements. Adding a small value $\epsilon$ at least works for data visualization purpose. Btw. there was an almost similar discussion before here: How should I transform non-negative data including zeros?
How to log transform data with a large number of zeros
In your case, I would treat zeros separately from the other data points. You can work out a model for non-zero elements. Adding a small value $\epsilon$ at least works for data visualization purpose.
How to log transform data with a large number of zeros In your case, I would treat zeros separately from the other data points. You can work out a model for non-zero elements. Adding a small value $\epsilon$ at least works for data visualization purpose. Btw. there was an almost similar discussion before here: How sho...
How to log transform data with a large number of zeros In your case, I would treat zeros separately from the other data points. You can work out a model for non-zero elements. Adding a small value $\epsilon$ at least works for data visualization purpose.
40,775
Differences between Multi-layer NN, Hopfield, Helmholtz and Boltzmann machines
Multilayer NN (MLP) and Hopfield networks are deterministic networks. Concretely, the first can be shown to estimate the conditional average on the target data. For details you may have a look at Bishop's book on neural networks. The Hopfield is a deterministic recurrent neural network. Deterministic because once the i...
Differences between Multi-layer NN, Hopfield, Helmholtz and Boltzmann machines
Multilayer NN (MLP) and Hopfield networks are deterministic networks. Concretely, the first can be shown to estimate the conditional average on the target data. For details you may have a look at Bish
Differences between Multi-layer NN, Hopfield, Helmholtz and Boltzmann machines Multilayer NN (MLP) and Hopfield networks are deterministic networks. Concretely, the first can be shown to estimate the conditional average on the target data. For details you may have a look at Bishop's book on neural networks. The Hopfiel...
Differences between Multi-layer NN, Hopfield, Helmholtz and Boltzmann machines Multilayer NN (MLP) and Hopfield networks are deterministic networks. Concretely, the first can be shown to estimate the conditional average on the target data. For details you may have a look at Bish
40,776
Why the most of world correlations are positive?
Although ttnphns's comment is slightly in jest - it actually has bearing on your question. We may consider different phenomenon as being caused by a set of related factors (which may or may not be measured). So for example say we have a latent factor of $\lambda$ that affects responses to a set of Likert items on a sur...
Why the most of world correlations are positive?
Although ttnphns's comment is slightly in jest - it actually has bearing on your question. We may consider different phenomenon as being caused by a set of related factors (which may or may not be mea
Why the most of world correlations are positive? Although ttnphns's comment is slightly in jest - it actually has bearing on your question. We may consider different phenomenon as being caused by a set of related factors (which may or may not be measured). So for example say we have a latent factor of $\lambda$ that af...
Why the most of world correlations are positive? Although ttnphns's comment is slightly in jest - it actually has bearing on your question. We may consider different phenomenon as being caused by a set of related factors (which may or may not be mea
40,777
Why the most of world correlations are positive?
To expand on Scortchi's/AndyW's point of confounding factors: For the food stuff I think the water content is an extremely important confounding variable. In particular, if you mix in fruits that are naturally eaten with very high water content (tomatoes, cucumbers) with fruit where the "natural" state is already dried...
Why the most of world correlations are positive?
To expand on Scortchi's/AndyW's point of confounding factors: For the food stuff I think the water content is an extremely important confounding variable. In particular, if you mix in fruits that are
Why the most of world correlations are positive? To expand on Scortchi's/AndyW's point of confounding factors: For the food stuff I think the water content is an extremely important confounding variable. In particular, if you mix in fruits that are naturally eaten with very high water content (tomatoes, cucumbers) with...
Why the most of world correlations are positive? To expand on Scortchi's/AndyW's point of confounding factors: For the food stuff I think the water content is an extremely important confounding variable. In particular, if you mix in fruits that are
40,778
Training a convolutional neural network
If I understand you correctly, the question is how to train the net if you have pooling layers? Well, the weights in pooling layers are not that different from the ones in "normal" layers. Imagine you have a max pooling layer with grid size 3x3. Imagine further that for a given training example, pixel number 5 (that is...
Training a convolutional neural network
If I understand you correctly, the question is how to train the net if you have pooling layers? Well, the weights in pooling layers are not that different from the ones in "normal" layers. Imagine you
Training a convolutional neural network If I understand you correctly, the question is how to train the net if you have pooling layers? Well, the weights in pooling layers are not that different from the ones in "normal" layers. Imagine you have a max pooling layer with grid size 3x3. Imagine further that for a given t...
Training a convolutional neural network If I understand you correctly, the question is how to train the net if you have pooling layers? Well, the weights in pooling layers are not that different from the ones in "normal" layers. Imagine you
40,779
Training a convolutional neural network
Back-propagation is "just" a nice rick to combine the chain rule with dynamic programming so that you get an efficient method to calculate the gradient of the network with respect to its parameters. Whether you can calculate the gradient does not depend on whether there are weights. You still have to calculate the deri...
Training a convolutional neural network
Back-propagation is "just" a nice rick to combine the chain rule with dynamic programming so that you get an efficient method to calculate the gradient of the network with respect to its parameters. W
Training a convolutional neural network Back-propagation is "just" a nice rick to combine the chain rule with dynamic programming so that you get an efficient method to calculate the gradient of the network with respect to its parameters. Whether you can calculate the gradient does not depend on whether there are weigh...
Training a convolutional neural network Back-propagation is "just" a nice rick to combine the chain rule with dynamic programming so that you get an efficient method to calculate the gradient of the network with respect to its parameters. W
40,780
Why does differencing time-series introduce negative autocorrelation
Take the simple white noise process $Z_t$, $EZ_t=0$, $cov(Z_t,Z_{t-h})=0$, for all $h\neq 0$. Now take its difference $Y_t=Z_{t}-Z_{t-1}$and calculate the first lag autocovariance: $$cov(Y_t,Y_{t-1})=cov(Z_t-Z_{t-1},Z_{t-1}-Z_{t-2})=-cov(Z_{t-1},Z_{t-1})=-var(Z_t)$$ Hence $corr(Y_t,Y_{t-1})=-1/2.$ (Since $var(Y_t)=2va...
Why does differencing time-series introduce negative autocorrelation
Take the simple white noise process $Z_t$, $EZ_t=0$, $cov(Z_t,Z_{t-h})=0$, for all $h\neq 0$. Now take its difference $Y_t=Z_{t}-Z_{t-1}$and calculate the first lag autocovariance: $$cov(Y_t,Y_{t-1})
Why does differencing time-series introduce negative autocorrelation Take the simple white noise process $Z_t$, $EZ_t=0$, $cov(Z_t,Z_{t-h})=0$, for all $h\neq 0$. Now take its difference $Y_t=Z_{t}-Z_{t-1}$and calculate the first lag autocovariance: $$cov(Y_t,Y_{t-1})=cov(Z_t-Z_{t-1},Z_{t-1}-Z_{t-2})=-cov(Z_{t-1},Z_{t...
Why does differencing time-series introduce negative autocorrelation Take the simple white noise process $Z_t$, $EZ_t=0$, $cov(Z_t,Z_{t-h})=0$, for all $h\neq 0$. Now take its difference $Y_t=Z_{t}-Z_{t-1}$and calculate the first lag autocovariance: $$cov(Y_t,Y_{t-1})
40,781
Why does differencing time-series introduce negative autocorrelation
unwarranted differencing is like unwaranted drugs they can have nasty side effects . The spike in the second differences suggests an ma coefficient which will effectively countermand the unwarranted differencing. The aic/bic stuff just doesn't always work as it often suggests over-differencing and over-populated ARMA s...
Why does differencing time-series introduce negative autocorrelation
unwarranted differencing is like unwaranted drugs they can have nasty side effects . The spike in the second differences suggests an ma coefficient which will effectively countermand the unwarranted d
Why does differencing time-series introduce negative autocorrelation unwarranted differencing is like unwaranted drugs they can have nasty side effects . The spike in the second differences suggests an ma coefficient which will effectively countermand the unwarranted differencing. The aic/bic stuff just doesn't always ...
Why does differencing time-series introduce negative autocorrelation unwarranted differencing is like unwaranted drugs they can have nasty side effects . The spike in the second differences suggests an ma coefficient which will effectively countermand the unwarranted d
40,782
nearPD function in Matrix package
The nearPD package uses the algorithm developed by Dr. Nick Higham and others. Higham describes the algorithm here (PDF): Higham, Nick (2002) Computing the nearest correlation matrix - a problem from finance; IMA Journal of Numerical Analysis 22, 329–343. In a nutshell, they are finding the "closest" (minimum differenc...
nearPD function in Matrix package
The nearPD package uses the algorithm developed by Dr. Nick Higham and others. Higham describes the algorithm here (PDF): Higham, Nick (2002) Computing the nearest correlation matrix - a problem from
nearPD function in Matrix package The nearPD package uses the algorithm developed by Dr. Nick Higham and others. Higham describes the algorithm here (PDF): Higham, Nick (2002) Computing the nearest correlation matrix - a problem from finance; IMA Journal of Numerical Analysis 22, 329–343. In a nutshell, they are findin...
nearPD function in Matrix package The nearPD package uses the algorithm developed by Dr. Nick Higham and others. Higham describes the algorithm here (PDF): Higham, Nick (2002) Computing the nearest correlation matrix - a problem from
40,783
In importance sampling, why should the importance density have heavier tails?
Heuristically, it's because, for many situations of interest, what happens in the tails of the distribution is important, maybe more important than what happens in the middle, so undersampling the tails results in relatively inaccurate estimates of the target quantity. More formally, consider a known function $h(x)$, a...
In importance sampling, why should the importance density have heavier tails?
Heuristically, it's because, for many situations of interest, what happens in the tails of the distribution is important, maybe more important than what happens in the middle, so undersampling the tai
In importance sampling, why should the importance density have heavier tails? Heuristically, it's because, for many situations of interest, what happens in the tails of the distribution is important, maybe more important than what happens in the middle, so undersampling the tails results in relatively inaccurate estima...
In importance sampling, why should the importance density have heavier tails? Heuristically, it's because, for many situations of interest, what happens in the tails of the distribution is important, maybe more important than what happens in the middle, so undersampling the tai
40,784
Define Priors for Dirichlet Distribution parameters in JAGS
I don't know for sure what the trick is, but this is my guess. Using JAGS syntax to specify $\xi \sim \mathcal D(\alpha)$, you would normally do something like this: xi ~ dirichlet(alpha[]) JAGS would then not allow you to assign a prior to $\alpha = (\alpha_1, \ldots, \alpha_J)$. Instead, let $\xi^\star_j \sim \mbox{...
Define Priors for Dirichlet Distribution parameters in JAGS
I don't know for sure what the trick is, but this is my guess. Using JAGS syntax to specify $\xi \sim \mathcal D(\alpha)$, you would normally do something like this: xi ~ dirichlet(alpha[]) JAGS woul
Define Priors for Dirichlet Distribution parameters in JAGS I don't know for sure what the trick is, but this is my guess. Using JAGS syntax to specify $\xi \sim \mathcal D(\alpha)$, you would normally do something like this: xi ~ dirichlet(alpha[]) JAGS would then not allow you to assign a prior to $\alpha = (\alpha_...
Define Priors for Dirichlet Distribution parameters in JAGS I don't know for sure what the trick is, but this is my guess. Using JAGS syntax to specify $\xi \sim \mathcal D(\alpha)$, you would normally do something like this: xi ~ dirichlet(alpha[]) JAGS woul
40,785
half-cauchy prior for scale parameter
An alternative to using a Half-Cauchy distribution with a well-defined variance is a Half-Student-t with $\nu>2$ degrees of freedom, e.g. $\nu=3$. $$\pi(\nu)= \frac{12 \sqrt{3}}{\pi \left(x^2+3\right)^2},\,\,\, \nu>0. $$ This prior has semi-heavy tails and it should produce fairly similar results as the Half-Cauchy pr...
half-cauchy prior for scale parameter
An alternative to using a Half-Cauchy distribution with a well-defined variance is a Half-Student-t with $\nu>2$ degrees of freedom, e.g. $\nu=3$. $$\pi(\nu)= \frac{12 \sqrt{3}}{\pi \left(x^2+3\right
half-cauchy prior for scale parameter An alternative to using a Half-Cauchy distribution with a well-defined variance is a Half-Student-t with $\nu>2$ degrees of freedom, e.g. $\nu=3$. $$\pi(\nu)= \frac{12 \sqrt{3}}{\pi \left(x^2+3\right)^2},\,\,\, \nu>0. $$ This prior has semi-heavy tails and it should produce fairly...
half-cauchy prior for scale parameter An alternative to using a Half-Cauchy distribution with a well-defined variance is a Half-Student-t with $\nu>2$ degrees of freedom, e.g. $\nu=3$. $$\pi(\nu)= \frac{12 \sqrt{3}}{\pi \left(x^2+3\right
40,786
Generating survival times for a piecewise constant hazard model with two change points
There are two basic approaches to generating data with piecewise constant hazard: inversion of the cumulative hazard and the composition method. Inversion of the cumulative hazard - essentially the inverse CDF method. Since $F(t) = 1-\exp(-H(t))$. If $U \sim Unif(0,1)$, then $F(X) = U$ is equivalent to $1-\exp(-H(X)) ...
Generating survival times for a piecewise constant hazard model with two change points
There are two basic approaches to generating data with piecewise constant hazard: inversion of the cumulative hazard and the composition method. Inversion of the cumulative hazard - essentially the i
Generating survival times for a piecewise constant hazard model with two change points There are two basic approaches to generating data with piecewise constant hazard: inversion of the cumulative hazard and the composition method. Inversion of the cumulative hazard - essentially the inverse CDF method. Since $F(t) = ...
Generating survival times for a piecewise constant hazard model with two change points There are two basic approaches to generating data with piecewise constant hazard: inversion of the cumulative hazard and the composition method. Inversion of the cumulative hazard - essentially the i
40,787
Analysis of temporal patterns
A runs test seems appropriate, and the cited literature at the end develops the test statistic for multiple categories. Unfortunately the paper is paywalled but here is a quick run-down of the test statistic (screen shot of relevant page here). For each individual group, we can count; $n_s = \text{Number of successes}...
Analysis of temporal patterns
A runs test seems appropriate, and the cited literature at the end develops the test statistic for multiple categories. Unfortunately the paper is paywalled but here is a quick run-down of the test st
Analysis of temporal patterns A runs test seems appropriate, and the cited literature at the end develops the test statistic for multiple categories. Unfortunately the paper is paywalled but here is a quick run-down of the test statistic (screen shot of relevant page here). For each individual group, we can count; $n_...
Analysis of temporal patterns A runs test seems appropriate, and the cited literature at the end develops the test statistic for multiple categories. Unfortunately the paper is paywalled but here is a quick run-down of the test st
40,788
Analysis of temporal patterns
If I understand, you are looking for k-mers which are patterns of size k found in sequences. There is an R package for analyzing sequence data called TraMineR which includes functions for plotting the sequences, finding the variance of state durations, compute within sequence entropy, extract frequent event subsequence...
Analysis of temporal patterns
If I understand, you are looking for k-mers which are patterns of size k found in sequences. There is an R package for analyzing sequence data called TraMineR which includes functions for plotting the
Analysis of temporal patterns If I understand, you are looking for k-mers which are patterns of size k found in sequences. There is an R package for analyzing sequence data called TraMineR which includes functions for plotting the sequences, finding the variance of state durations, compute within sequence entropy, extr...
Analysis of temporal patterns If I understand, you are looking for k-mers which are patterns of size k found in sequences. There is an R package for analyzing sequence data called TraMineR which includes functions for plotting the
40,789
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function?
On scikit-learn==0.14.1. $\theta_0$ can be a vector. The following code works for me. import numpy as np from sklearn.gaussian_process import GaussianProcess from sklearn.datasets import make_regression X, y = make_regression() bad_theta = np.abs(np.random.normal(0,1,100)) model = GaussianProcess(theta0=bad_theta) mode...
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function?
On scikit-learn==0.14.1. $\theta_0$ can be a vector. The following code works for me. import numpy as np from sklearn.gaussian_process import GaussianProcess from sklearn.datasets import make_regressi
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function? On scikit-learn==0.14.1. $\theta_0$ can be a vector. The following code works for me. import numpy as np from sklearn.gaussian_process import GaussianProcess from sklearn.datasets import make_regression X, y = make_regres...
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function? On scikit-learn==0.14.1. $\theta_0$ can be a vector. The following code works for me. import numpy as np from sklearn.gaussian_process import GaussianProcess from sklearn.datasets import make_regressi
40,790
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function?
For future users, in sklearn 0.19.1 (and probably earlier) you can use combined kernels. I think you can create the kernel you want by kernel = ConstantKernel(1.0) * RBF(np.ones(nrOfFeatures)) The ConstantKernel would be your theta0. In case you provide the RBF kernel with a single float, this will be your theta1
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function?
For future users, in sklearn 0.19.1 (and probably earlier) you can use combined kernels. I think you can create the kernel you want by kernel = ConstantKernel(1.0) * RBF(np.ones(nrOfFeatures)) The C
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function? For future users, in sklearn 0.19.1 (and probably earlier) you can use combined kernels. I think you can create the kernel you want by kernel = ConstantKernel(1.0) * RBF(np.ones(nrOfFeatures)) The ConstantKernel would b...
Scikit-learn's Gaussian Processes: How to include multiple hyperparameters in kernel/cov function? For future users, in sklearn 0.19.1 (and probably earlier) you can use combined kernels. I think you can create the kernel you want by kernel = ConstantKernel(1.0) * RBF(np.ones(nrOfFeatures)) The C
40,791
Singular values of the data matrix and eigenvalues of the covariance matrix
Aside stating the obvious: eig gives the results in ascending order while svd in descending one; the svd eigenvalues (and eigenvectors obviously) are dissimilar to those of eig decomposition because your matrix ingredients is not symmetric to start with. To paraphrase wikipedia a bit: "When the $X$ is a normal and/or...
Singular values of the data matrix and eigenvalues of the covariance matrix
Aside stating the obvious: eig gives the results in ascending order while svd in descending one; the svd eigenvalues (and eigenvectors obviously) are dissimilar to those of eig decomposition because y
Singular values of the data matrix and eigenvalues of the covariance matrix Aside stating the obvious: eig gives the results in ascending order while svd in descending one; the svd eigenvalues (and eigenvectors obviously) are dissimilar to those of eig decomposition because your matrix ingredients is not symmetric to s...
Singular values of the data matrix and eigenvalues of the covariance matrix Aside stating the obvious: eig gives the results in ascending order while svd in descending one; the svd eigenvalues (and eigenvectors obviously) are dissimilar to those of eig decomposition because y
40,792
Right-censored survival fit with JAGS
I was asked to re-post this answer here from my comment at http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html The specifics of this answer relate to the model in that comment, but the concepts apply to the topic here. The core of the JAGS model for censored data is this: ...
Right-censored survival fit with JAGS
I was asked to re-post this answer here from my comment at http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html The specifics of this answer relate to the
Right-censored survival fit with JAGS I was asked to re-post this answer here from my comment at http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html The specifics of this answer relate to the model in that comment, but the concepts apply to the topic here. The core of the ...
Right-censored survival fit with JAGS I was asked to re-post this answer here from my comment at http://doingbayesiandataanalysis.blogspot.com/2012/01/complete-example-of-right-censoring-in.html The specifics of this answer relate to the
40,793
Applications of Data Mining in economics [closed]
Here's a nice survey by Einav and Levin of what's been done and some directions for further research (Section 5). Here is an application to Netflix data and price discrimination where ML techniques do the heavy lifting in feature selection and demand estimation. Here's a paper on Yelp review fraud, where Yelp's fraud d...
Applications of Data Mining in economics [closed]
Here's a nice survey by Einav and Levin of what's been done and some directions for further research (Section 5). Here is an application to Netflix data and price discrimination where ML techniques do
Applications of Data Mining in economics [closed] Here's a nice survey by Einav and Levin of what's been done and some directions for further research (Section 5). Here is an application to Netflix data and price discrimination where ML techniques do the heavy lifting in feature selection and demand estimation. Here's ...
Applications of Data Mining in economics [closed] Here's a nice survey by Einav and Levin of what's been done and some directions for further research (Section 5). Here is an application to Netflix data and price discrimination where ML techniques do
40,794
Applications of Data Mining in economics [closed]
There's a recent article that uses Google Trends to predict financial crises or other economic events: http://www.nature.com/srep/2013/130425/srep01684/full/srep01684.html A similar approach can use Twitter (as in here), to predict other economic events or variables (e.g. marginal utilities, prices, etc).
Applications of Data Mining in economics [closed]
There's a recent article that uses Google Trends to predict financial crises or other economic events: http://www.nature.com/srep/2013/130425/srep01684/full/srep01684.html A similar approach can use T
Applications of Data Mining in economics [closed] There's a recent article that uses Google Trends to predict financial crises or other economic events: http://www.nature.com/srep/2013/130425/srep01684/full/srep01684.html A similar approach can use Twitter (as in here), to predict other economic events or variables (e....
Applications of Data Mining in economics [closed] There's a recent article that uses Google Trends to predict financial crises or other economic events: http://www.nature.com/srep/2013/130425/srep01684/full/srep01684.html A similar approach can use T
40,795
Applications of Data Mining in economics [closed]
Hidden Markov models (HMMs) in the form of "regime switching models" have been used to determine growth/decline periods (I know, they're not technically HMMs, but they basically are). Does that count? Read up on the work of James Hamilton if you're interested: http://weber.ucsd.edu/~jhamilto/
Applications of Data Mining in economics [closed]
Hidden Markov models (HMMs) in the form of "regime switching models" have been used to determine growth/decline periods (I know, they're not technically HMMs, but they basically are). Does that count?
Applications of Data Mining in economics [closed] Hidden Markov models (HMMs) in the form of "regime switching models" have been used to determine growth/decline periods (I know, they're not technically HMMs, but they basically are). Does that count? Read up on the work of James Hamilton if you're interested: http://we...
Applications of Data Mining in economics [closed] Hidden Markov models (HMMs) in the form of "regime switching models" have been used to determine growth/decline periods (I know, they're not technically HMMs, but they basically are). Does that count?
40,796
Best way to test runs
Your stated objective is to assess whether the 1s tend to rank lower (i.e. appear earlier) That is not measured by runs, but by ranks. Use the Wilcoxon (aka Mann-Whitney) test. This test is both conceptually and computationally simple, yet reasonably powerful. The data are ranked in the order of appearance using t...
Best way to test runs
Your stated objective is to assess whether the 1s tend to rank lower (i.e. appear earlier) That is not measured by runs, but by ranks. Use the Wilcoxon (aka Mann-Whitney) test. This test is both c
Best way to test runs Your stated objective is to assess whether the 1s tend to rank lower (i.e. appear earlier) That is not measured by runs, but by ranks. Use the Wilcoxon (aka Mann-Whitney) test. This test is both conceptually and computationally simple, yet reasonably powerful. The data are ranked in the order...
Best way to test runs Your stated objective is to assess whether the 1s tend to rank lower (i.e. appear earlier) That is not measured by runs, but by ranks. Use the Wilcoxon (aka Mann-Whitney) test. This test is both c
40,797
Best way to test runs
I think you have this muddled up. (i) The Kolmogorov Smirnov test is designed to test continuous, not discrete distributions; indeed, your values consist only of 0's and 1's, yet it appears you're testing against continuous uniformity. (ii) as written, it looks like this is completely ignoring the time order. It's not...
Best way to test runs
I think you have this muddled up. (i) The Kolmogorov Smirnov test is designed to test continuous, not discrete distributions; indeed, your values consist only of 0's and 1's, yet it appears you're tes
Best way to test runs I think you have this muddled up. (i) The Kolmogorov Smirnov test is designed to test continuous, not discrete distributions; indeed, your values consist only of 0's and 1's, yet it appears you're testing against continuous uniformity. (ii) as written, it looks like this is completely ignoring th...
Best way to test runs I think you have this muddled up. (i) The Kolmogorov Smirnov test is designed to test continuous, not discrete distributions; indeed, your values consist only of 0's and 1's, yet it appears you're tes
40,798
Best way to test runs
You can use also a test based on the Length of the longest head run (LLHR). In your example LLHR is too large -> you should reject the hypothesis that the sample is from Bernoulli B(1/2) distribution.
Best way to test runs
You can use also a test based on the Length of the longest head run (LLHR). In your example LLHR is too large -> you should reject the hypothesis that the sample is from Bernoulli B(1/2) distribution
Best way to test runs You can use also a test based on the Length of the longest head run (LLHR). In your example LLHR is too large -> you should reject the hypothesis that the sample is from Bernoulli B(1/2) distribution.
Best way to test runs You can use also a test based on the Length of the longest head run (LLHR). In your example LLHR is too large -> you should reject the hypothesis that the sample is from Bernoulli B(1/2) distribution
40,799
Meaning of a "portmanteau test"?
As far as I know "portmanteau test" is synonymous with "omnibus test". Either term gets used in two cases: (1) When the null hypothesis specifies values for a vector of parameters that are thought of as being on an equal footing, & the alternative is that at least one parameter value is different from that specified b...
Meaning of a "portmanteau test"?
As far as I know "portmanteau test" is synonymous with "omnibus test". Either term gets used in two cases: (1) When the null hypothesis specifies values for a vector of parameters that are thought of
Meaning of a "portmanteau test"? As far as I know "portmanteau test" is synonymous with "omnibus test". Either term gets used in two cases: (1) When the null hypothesis specifies values for a vector of parameters that are thought of as being on an equal footing, & the alternative is that at least one parameter value i...
Meaning of a "portmanteau test"? As far as I know "portmanteau test" is synonymous with "omnibus test". Either term gets used in two cases: (1) When the null hypothesis specifies values for a vector of parameters that are thought of
40,800
How to calculate the confidence intervals for likelihood ratios from a 2x2 table in the presence of cells with zeroes
The paper by Koopman (1984) Confidence intervals for the ratio of two binomial proportions gives two methods for calculating the confidence interval. I am gonna explain the first one here as the confidence intervals can be calculated analytically (the second method uses an iterative procedure to find the confidence int...
How to calculate the confidence intervals for likelihood ratios from a 2x2 table in the presence of
The paper by Koopman (1984) Confidence intervals for the ratio of two binomial proportions gives two methods for calculating the confidence interval. I am gonna explain the first one here as the confi
How to calculate the confidence intervals for likelihood ratios from a 2x2 table in the presence of cells with zeroes The paper by Koopman (1984) Confidence intervals for the ratio of two binomial proportions gives two methods for calculating the confidence interval. I am gonna explain the first one here as the confide...
How to calculate the confidence intervals for likelihood ratios from a 2x2 table in the presence of The paper by Koopman (1984) Confidence intervals for the ratio of two binomial proportions gives two methods for calculating the confidence interval. I am gonna explain the first one here as the confi