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
|
|---|---|---|---|---|---|---|
43,301
|
How does number of observations supporting alternate hypothesis on a test of a variance have to scale so that null is rejected?
|
People please correct me, but I have the impression that, given the set up, this is a simple problem that does not even require asymptotic theory, because, as it is posed, involves an alternative situation (the "malfunctioning" case) that possibly affects the assumption on the distribution family also (in case the distribution $A$ is not also normal) -and not just the value of some parameter characterizing necessarily the same distribution family.
So it is akin to a general misspecification test, and it seems to me that a pure Fisherian approach is the appropriate one here, where the decision to reject or not the null hypothesis is separate from the test results.
Therefore we can specify only the following null hypothesis
$$H_0 : X_i\sim N(0, \sigma^2_0)$$
without an alternative. Under this null-hypothesis, a statistic based on the bias-corrected sample variance $s^2 = \frac 1{n-1}\sum_{i=1}^n(X_i-\bar X)^2$ has a finite-sample chi-square distribution,
$$q_n \equiv(n-1)\frac{s^2}{\sigma^2_0} \sim\Big|_{H_0} \mathcal \chi^2_{n-1}$$
So for whatever sample size $n$, we can calculate the value of the statistic $q_n$, and matching it to the values from the CDF of a chi-square with $n-1$ degrees of freedom, obtain the corresponding $p$-value. The smaller the $p$-value, the lower credibility does the data provide to the null Hypothesis.
Rejection of the null-hypothesis (which, in the Fisherian spirit, has to do with the OP's preferences/guidelines and not with the statistical framework used and the result obtained), signals that probabilistically the machine is malfunctioning, irrespective of the reasons why, or how (I guess deterministic engineering will take over at that point).
A caveat to the suitability of this approach to the problem at hand: It may be the case that "machine is broken" may imply a tolerance threshold for the proportion of random numbers coming not from $N(0, \sigma^2_0)$. I.e. it is not about uncertainty of whether we have contamination or not, but of whether the degree of contamination is above or below a threshold -if it is below a threshold (including the possibility of zero-contamination), then the machine performs adequately and it is not considered "broken". This would require a different approach -but if this is the the true issue here, it is not spelled out in the OP's post, where his attempts to formalize the case indicated a $0/1$ situation.
|
How does number of observations supporting alternate hypothesis on a test of a variance have to scal
|
People please correct me, but I have the impression that, given the set up, this is a simple problem that does not even require asymptotic theory, because, as it is posed, involves an alternative situ
|
How does number of observations supporting alternate hypothesis on a test of a variance have to scale so that null is rejected?
People please correct me, but I have the impression that, given the set up, this is a simple problem that does not even require asymptotic theory, because, as it is posed, involves an alternative situation (the "malfunctioning" case) that possibly affects the assumption on the distribution family also (in case the distribution $A$ is not also normal) -and not just the value of some parameter characterizing necessarily the same distribution family.
So it is akin to a general misspecification test, and it seems to me that a pure Fisherian approach is the appropriate one here, where the decision to reject or not the null hypothesis is separate from the test results.
Therefore we can specify only the following null hypothesis
$$H_0 : X_i\sim N(0, \sigma^2_0)$$
without an alternative. Under this null-hypothesis, a statistic based on the bias-corrected sample variance $s^2 = \frac 1{n-1}\sum_{i=1}^n(X_i-\bar X)^2$ has a finite-sample chi-square distribution,
$$q_n \equiv(n-1)\frac{s^2}{\sigma^2_0} \sim\Big|_{H_0} \mathcal \chi^2_{n-1}$$
So for whatever sample size $n$, we can calculate the value of the statistic $q_n$, and matching it to the values from the CDF of a chi-square with $n-1$ degrees of freedom, obtain the corresponding $p$-value. The smaller the $p$-value, the lower credibility does the data provide to the null Hypothesis.
Rejection of the null-hypothesis (which, in the Fisherian spirit, has to do with the OP's preferences/guidelines and not with the statistical framework used and the result obtained), signals that probabilistically the machine is malfunctioning, irrespective of the reasons why, or how (I guess deterministic engineering will take over at that point).
A caveat to the suitability of this approach to the problem at hand: It may be the case that "machine is broken" may imply a tolerance threshold for the proportion of random numbers coming not from $N(0, \sigma^2_0)$. I.e. it is not about uncertainty of whether we have contamination or not, but of whether the degree of contamination is above or below a threshold -if it is below a threshold (including the possibility of zero-contamination), then the machine performs adequately and it is not considered "broken". This would require a different approach -but if this is the the true issue here, it is not spelled out in the OP's post, where his attempts to formalize the case indicated a $0/1$ situation.
|
How does number of observations supporting alternate hypothesis on a test of a variance have to scal
People please correct me, but I have the impression that, given the set up, this is a simple problem that does not even require asymptotic theory, because, as it is posed, involves an alternative situ
|
43,302
|
Estimating the functional form of the slowly time-varying variance of a Gaussian process
|
In functional data analysis, people often use penalties of the form
$$ \int_{D} [f^{(m)}(x)]^{2} dx $$
to ensure that an estimate of $f$ is smooth. Here $D$ is the domain of the function and $f^{(m)}(x)$ is the $m$'th derivative of $f$. In my own research I've found $m = 2$ to be useful. In your case the log-likelihood is
$$ -\frac{1}{2} \left( 2 \sum_{i=1}^{N} \log \big( \sigma(t_{i}) \big) + \sum_{i=1}^{N} \frac{x_{i}^{2}}{\sigma^{2}(t_{i})} \right) $$
An estimator that minimizes
$$
\left( 2 \sum_{i=1}^{N} \log \big( \sigma(t_{i}) \big) + \sum_{i=1}^{N} \frac{x_{i}^{2}}{\sigma^{2}(t_{i})} \right) + \lambda \int_{0}^{\infty} [\sigma^{(2)}(t)]^{2} dt $$
(or, equivalently, maximizes the penalized log likelihood) for an appropriately chosen tuning parameter, $\lambda$, will be smooth. This is a differentiable (on the interior of the parameter space) objective function of $\sigma(t_{1}), ..., \sigma(t_{K})$ (where $K$ is the number of unique time points) so it can be optimized using some standard approaches. Although, the potential non-convexity of the objective function could make starting values crucial for any optimization algorithm.
I've found that choosing $\lambda$ based on some model selection criteria such as AIC performs pretty well although there are many other potential choices. If you're going to go that route, the effective number of parameters in the model (which is required to calculate AIC) can be tricky to determine. As $\lambda \rightarrow 0$, you have the non-parametric MLE, so the number of parameters is equal to the number of unique times observed. As $\lambda \rightarrow \infty$, you have a perfectly linear fit (since the penalty will be 0 only when $\sigma(t)$ is linear and approaches $\infty$ otherwise) so there effective number of parameters is 2. Between these two extremes the effective number of parameters is not so obvious. Shedden and Zucker (2008)
http://www.ncbi.nlm.nih.gov/pubmed/19956348
use the AIC approach to choosing smoothness and derive an approximation to the effective number of parameters under penalization - that may be useful to look at.
|
Estimating the functional form of the slowly time-varying variance of a Gaussian process
|
In functional data analysis, people often use penalties of the form
$$ \int_{D} [f^{(m)}(x)]^{2} dx $$
to ensure that an estimate of $f$ is smooth. Here $D$ is the domain of the function and $f^{(m)
|
Estimating the functional form of the slowly time-varying variance of a Gaussian process
In functional data analysis, people often use penalties of the form
$$ \int_{D} [f^{(m)}(x)]^{2} dx $$
to ensure that an estimate of $f$ is smooth. Here $D$ is the domain of the function and $f^{(m)}(x)$ is the $m$'th derivative of $f$. In my own research I've found $m = 2$ to be useful. In your case the log-likelihood is
$$ -\frac{1}{2} \left( 2 \sum_{i=1}^{N} \log \big( \sigma(t_{i}) \big) + \sum_{i=1}^{N} \frac{x_{i}^{2}}{\sigma^{2}(t_{i})} \right) $$
An estimator that minimizes
$$
\left( 2 \sum_{i=1}^{N} \log \big( \sigma(t_{i}) \big) + \sum_{i=1}^{N} \frac{x_{i}^{2}}{\sigma^{2}(t_{i})} \right) + \lambda \int_{0}^{\infty} [\sigma^{(2)}(t)]^{2} dt $$
(or, equivalently, maximizes the penalized log likelihood) for an appropriately chosen tuning parameter, $\lambda$, will be smooth. This is a differentiable (on the interior of the parameter space) objective function of $\sigma(t_{1}), ..., \sigma(t_{K})$ (where $K$ is the number of unique time points) so it can be optimized using some standard approaches. Although, the potential non-convexity of the objective function could make starting values crucial for any optimization algorithm.
I've found that choosing $\lambda$ based on some model selection criteria such as AIC performs pretty well although there are many other potential choices. If you're going to go that route, the effective number of parameters in the model (which is required to calculate AIC) can be tricky to determine. As $\lambda \rightarrow 0$, you have the non-parametric MLE, so the number of parameters is equal to the number of unique times observed. As $\lambda \rightarrow \infty$, you have a perfectly linear fit (since the penalty will be 0 only when $\sigma(t)$ is linear and approaches $\infty$ otherwise) so there effective number of parameters is 2. Between these two extremes the effective number of parameters is not so obvious. Shedden and Zucker (2008)
http://www.ncbi.nlm.nih.gov/pubmed/19956348
use the AIC approach to choosing smoothness and derive an approximation to the effective number of parameters under penalization - that may be useful to look at.
|
Estimating the functional form of the slowly time-varying variance of a Gaussian process
In functional data analysis, people often use penalties of the form
$$ \int_{D} [f^{(m)}(x)]^{2} dx $$
to ensure that an estimate of $f$ is smooth. Here $D$ is the domain of the function and $f^{(m)
|
43,303
|
What is the best way to use a 2-class classifier for a multi-category case?
|
Training c linear discriminant functions is a example of a "1-vs-all" or "1-against-the-rest" approach to building a multiclass classifier given a binary classifier learning algorithm. Training C(c,2) 2-class classifiers is an example of the "1-vs-1" approach. As c gets larger, the "1-vs-1" approach builds a lot more classifiers (but each from a smaller training set).
This paper compares these two approaches, among others, using SVMs as the binary classifier learner:
C.-W. Hsu and C.-J. Lin. A comparison of methods for multi-class support vector machines , IEEE Transactions on Neural Networks, 13(2002), 415-425.
Hsu and Lin found 1-vs-1 worked best with SVMs, but this would not necessarily hold with all binary classifier learners, or all data sets.
Personally, I prefer polytomous logistic regression.
|
What is the best way to use a 2-class classifier for a multi-category case?
|
Training c linear discriminant functions is a example of a "1-vs-all" or "1-against-the-rest" approach to building a multiclass classifier given a binary classifier learning algorithm. Training C(c,2
|
What is the best way to use a 2-class classifier for a multi-category case?
Training c linear discriminant functions is a example of a "1-vs-all" or "1-against-the-rest" approach to building a multiclass classifier given a binary classifier learning algorithm. Training C(c,2) 2-class classifiers is an example of the "1-vs-1" approach. As c gets larger, the "1-vs-1" approach builds a lot more classifiers (but each from a smaller training set).
This paper compares these two approaches, among others, using SVMs as the binary classifier learner:
C.-W. Hsu and C.-J. Lin. A comparison of methods for multi-class support vector machines , IEEE Transactions on Neural Networks, 13(2002), 415-425.
Hsu and Lin found 1-vs-1 worked best with SVMs, but this would not necessarily hold with all binary classifier learners, or all data sets.
Personally, I prefer polytomous logistic regression.
|
What is the best way to use a 2-class classifier for a multi-category case?
Training c linear discriminant functions is a example of a "1-vs-all" or "1-against-the-rest" approach to building a multiclass classifier given a binary classifier learning algorithm. Training C(c,2
|
43,304
|
How to estimate the absolute expected difference?
|
Bootstrap bias correction was invented to adjusted for bias in the estimation of $f(Z)$ (my $Z$ is your $X-Y$). The idea is very simple: create $B$ bootstrap resamples from your data, and calculate $f_b=f(Z_b)$ for each one of them. Then the bootrstrap estimate of the bias is $\bar{f_b}-f(Z)$, where $\bar{f_b}$ is the average of $f_b$'s. Finally, subtract this bias from $f(Z)$ do get the bias corrected estimate $2f(Z) - \bar{f}_b$.
This estimate is unbiased, but has much more variance then the uncorrected estimate.
The reference for bootstrap methods including this bias correction is: Efron, Tibshirani 'An introduction to the bootstrap' (1993), Chapman & Hall.
|
How to estimate the absolute expected difference?
|
Bootstrap bias correction was invented to adjusted for bias in the estimation of $f(Z)$ (my $Z$ is your $X-Y$). The idea is very simple: create $B$ bootstrap resamples from your data, and calculate $f
|
How to estimate the absolute expected difference?
Bootstrap bias correction was invented to adjusted for bias in the estimation of $f(Z)$ (my $Z$ is your $X-Y$). The idea is very simple: create $B$ bootstrap resamples from your data, and calculate $f_b=f(Z_b)$ for each one of them. Then the bootrstrap estimate of the bias is $\bar{f_b}-f(Z)$, where $\bar{f_b}$ is the average of $f_b$'s. Finally, subtract this bias from $f(Z)$ do get the bias corrected estimate $2f(Z) - \bar{f}_b$.
This estimate is unbiased, but has much more variance then the uncorrected estimate.
The reference for bootstrap methods including this bias correction is: Efron, Tibshirani 'An introduction to the bootstrap' (1993), Chapman & Hall.
|
How to estimate the absolute expected difference?
Bootstrap bias correction was invented to adjusted for bias in the estimation of $f(Z)$ (my $Z$ is your $X-Y$). The idea is very simple: create $B$ bootstrap resamples from your data, and calculate $f
|
43,305
|
Creating point clusters of a specified size using R
|
Give the spatstat package a go - the package was designed by CSIRO for spatial point pattern analysis. There's a very extensive paper going over the use of the package on the CSIRO website.
|
Creating point clusters of a specified size using R
|
Give the spatstat package a go - the package was designed by CSIRO for spatial point pattern analysis. There's a very extensive paper going over the use of the package on the CSIRO website.
|
Creating point clusters of a specified size using R
Give the spatstat package a go - the package was designed by CSIRO for spatial point pattern analysis. There's a very extensive paper going over the use of the package on the CSIRO website.
|
Creating point clusters of a specified size using R
Give the spatstat package a go - the package was designed by CSIRO for spatial point pattern analysis. There's a very extensive paper going over the use of the package on the CSIRO website.
|
43,306
|
Creating point clusters of a specified size using R
|
How different are your cluster sizes with plain k-means ?
Take a look at
k-means-algorithm-variation-with-equal-cluster-size (Python, not R).
|
Creating point clusters of a specified size using R
|
How different are your cluster sizes with plain k-means ?
Take a look at
k-means-algorithm-variation-with-equal-cluster-size (Python, not R).
|
Creating point clusters of a specified size using R
How different are your cluster sizes with plain k-means ?
Take a look at
k-means-algorithm-variation-with-equal-cluster-size (Python, not R).
|
Creating point clusters of a specified size using R
How different are your cluster sizes with plain k-means ?
Take a look at
k-means-algorithm-variation-with-equal-cluster-size (Python, not R).
|
43,307
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
To me the main issue boils down to imposing a strong constraint on an unknown process.
Consider a specification $y_t=f(x_t)+\varepsilon_t$. If you don't know the exact form of a function $f(.)$, you could try a linear approximation: $$f(z)\approx a+b x_t$$
Notice, how this linear approximation is actually the first order Maclaurin (Taylor) series of the function $f(.)$ around $x_t=0$:
$$f(0)=a$$
$$\frac{\partial f(z)}{\partial z}=b$$
Hence, when you regress through origin, from Maclaurin series view, you're saying that $f(0)=0$. This is a very strong constraint on a model.
There are situations where imposing such a constraint makes a sense, and these are driven by theory or outside knowledge. I would argue that unless you have a reason to believe that $f(0)=0$ it's not a good idea to regress through origin. As with any constraint, this will lead to suboptimal parameter estimation.
EXAMPLE: CAPM in finance. Here we state that the excess return $r-r_f$ on a stock is defined by its beta on the excess market return $r_m-r_f$:
$$r-r_f=\beta (r_m-r_f)$$
The theory tells us that the regression should be through origin. Now, some practitioners believe that they can get an additional return, alpha, on top of CAPM relationship:
$$r-r_f=\alpha+\beta (r_m-r_f)$$
Both regressions are used in academic research and practice for different reasons. This example shows you when the imposition of a strong constraint, such as regression through origin, can make a sense in some situations.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
To me the main issue boils down to imposing a strong constraint on an unknown process.
Consider a specification $y_t=f(x_t)+\varepsilon_t$. If you don't know the exact form of a function $f(.)$, you
|
What are the uses and pitfalls of regression through the origin? [duplicate]
To me the main issue boils down to imposing a strong constraint on an unknown process.
Consider a specification $y_t=f(x_t)+\varepsilon_t$. If you don't know the exact form of a function $f(.)$, you could try a linear approximation: $$f(z)\approx a+b x_t$$
Notice, how this linear approximation is actually the first order Maclaurin (Taylor) series of the function $f(.)$ around $x_t=0$:
$$f(0)=a$$
$$\frac{\partial f(z)}{\partial z}=b$$
Hence, when you regress through origin, from Maclaurin series view, you're saying that $f(0)=0$. This is a very strong constraint on a model.
There are situations where imposing such a constraint makes a sense, and these are driven by theory or outside knowledge. I would argue that unless you have a reason to believe that $f(0)=0$ it's not a good idea to regress through origin. As with any constraint, this will lead to suboptimal parameter estimation.
EXAMPLE: CAPM in finance. Here we state that the excess return $r-r_f$ on a stock is defined by its beta on the excess market return $r_m-r_f$:
$$r-r_f=\beta (r_m-r_f)$$
The theory tells us that the regression should be through origin. Now, some practitioners believe that they can get an additional return, alpha, on top of CAPM relationship:
$$r-r_f=\alpha+\beta (r_m-r_f)$$
Both regressions are used in academic research and practice for different reasons. This example shows you when the imposition of a strong constraint, such as regression through origin, can make a sense in some situations.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
To me the main issue boils down to imposing a strong constraint on an unknown process.
Consider a specification $y_t=f(x_t)+\varepsilon_t$. If you don't know the exact form of a function $f(.)$, you
|
43,308
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
If the r.h.s variables & response have not been centered? Then (by definition) the estimated coefficients are biased.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
If the r.h.s variables & response have not been centered? Then (by definition) the estimated coefficients are biased.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
If the r.h.s variables & response have not been centered? Then (by definition) the estimated coefficients are biased.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
If the r.h.s variables & response have not been centered? Then (by definition) the estimated coefficients are biased.
|
43,309
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
The least-squares solution to the set of equations
0 = c1*x1_1 + c2*x1_2 + ... cn*x1_n
0 = c1*x2_1 + c2*x2_2 + ... cn*x2_n
0 = c1*x3_1 + c2*x3_2 + ... cn*x3_n
...
0 = c1*xn_1 + c2*xn_2 + ... cn*xn_n
is always c1=0, c2=0, ..., with zero error, so using standard tools, eg. the Perl module Statistics::Regression, to do regression through the origin, will come up with standard deviation = 0 and crash when dividing by standard deviation.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
|
The least-squares solution to the set of equations
0 = c1*x1_1 + c2*x1_2 + ... cn*x1_n
0 = c1*x2_1 + c2*x2_2 + ... cn*x2_n
0 = c1*x3_1 + c2*x3_2 + ... cn*x3_n
...
0 = c1*xn_1 + c2*xn_2 + ... cn*x
|
What are the uses and pitfalls of regression through the origin? [duplicate]
The least-squares solution to the set of equations
0 = c1*x1_1 + c2*x1_2 + ... cn*x1_n
0 = c1*x2_1 + c2*x2_2 + ... cn*x2_n
0 = c1*x3_1 + c2*x3_2 + ... cn*x3_n
...
0 = c1*xn_1 + c2*xn_2 + ... cn*xn_n
is always c1=0, c2=0, ..., with zero error, so using standard tools, eg. the Perl module Statistics::Regression, to do regression through the origin, will come up with standard deviation = 0 and crash when dividing by standard deviation.
|
What are the uses and pitfalls of regression through the origin? [duplicate]
The least-squares solution to the set of equations
0 = c1*x1_1 + c2*x1_2 + ... cn*x1_n
0 = c1*x2_1 + c2*x2_2 + ... cn*x2_n
0 = c1*x3_1 + c2*x3_2 + ... cn*x3_n
...
0 = c1*xn_1 + c2*xn_2 + ... cn*x
|
43,310
|
Species Richness, Dominance and Diversity Differences
|
I think neither of these responses fit perfectly into any of the standard GLM link functions. Taking a pragmatic approach it is probably sufficient to pick a link function that is broadly doing the right thing.
Your raw data is from a multinomial distribution, and Richness, $R$, is the number of categories with a score of 1 or more. Although this is count data, it isn't quite the same as the normal sort of count data. The most striking difference being that you can never have a count of zero. As pragmatic first attempt, I would consider modeling $(R-1)$ using a poisson link function. The handwaving reasoning here could be this: If you were catching animals at a random rate for a fixed length of time, the number caught would be modelled well by Poisson. You are catching a fixed number of animals, but at a random rate the type of animal changes. If it wasn't for the fact your return to species already seen, this would be quite a good match.
For diversity, things are even less intuitive. However, the diversity is a sort of average of the abundance ($p_i$) of each species, and as such is bounded by $[0,1]$. This suggests that you could probably treat it as a proportion and use a logit link function.
Advanced Alternative
If the pragmatic matching of support and "looks approximately right" approach is not satisfying, it appears there is another way. I don't know much about this, but there is something called the *Multinomial Diversity Model" which is designed to deal with these sorts of problems. It is described in this paper, http://www.ncbi.nlm.nih.gov/pubmed/23185889 but I have no idea how popular it is.
It is, however, implented in R and availble on CRAN as MRM, apparently by the author of the above paper. It includes a spider data set used as an example in the help:
library(MDM)
data(spider6)
fit0 <- mdm(y2p(spider6[,1:6])~1,data=spider6)
fit1 <- mdm(y2p(spider6[,1:6])~Water,data=spider6)
fit2 <- mdm(y2p(spider6[,1:6])~Water+Herbs,data=spider6)
fit3 <- mdm(y2p(spider6[,1:6])~Site,data=spider6,alpha=TRUE)
anova(fit0,fit1,fit2,fit3)
|
Species Richness, Dominance and Diversity Differences
|
I think neither of these responses fit perfectly into any of the standard GLM link functions. Taking a pragmatic approach it is probably sufficient to pick a link function that is broadly doing the r
|
Species Richness, Dominance and Diversity Differences
I think neither of these responses fit perfectly into any of the standard GLM link functions. Taking a pragmatic approach it is probably sufficient to pick a link function that is broadly doing the right thing.
Your raw data is from a multinomial distribution, and Richness, $R$, is the number of categories with a score of 1 or more. Although this is count data, it isn't quite the same as the normal sort of count data. The most striking difference being that you can never have a count of zero. As pragmatic first attempt, I would consider modeling $(R-1)$ using a poisson link function. The handwaving reasoning here could be this: If you were catching animals at a random rate for a fixed length of time, the number caught would be modelled well by Poisson. You are catching a fixed number of animals, but at a random rate the type of animal changes. If it wasn't for the fact your return to species already seen, this would be quite a good match.
For diversity, things are even less intuitive. However, the diversity is a sort of average of the abundance ($p_i$) of each species, and as such is bounded by $[0,1]$. This suggests that you could probably treat it as a proportion and use a logit link function.
Advanced Alternative
If the pragmatic matching of support and "looks approximately right" approach is not satisfying, it appears there is another way. I don't know much about this, but there is something called the *Multinomial Diversity Model" which is designed to deal with these sorts of problems. It is described in this paper, http://www.ncbi.nlm.nih.gov/pubmed/23185889 but I have no idea how popular it is.
It is, however, implented in R and availble on CRAN as MRM, apparently by the author of the above paper. It includes a spider data set used as an example in the help:
library(MDM)
data(spider6)
fit0 <- mdm(y2p(spider6[,1:6])~1,data=spider6)
fit1 <- mdm(y2p(spider6[,1:6])~Water,data=spider6)
fit2 <- mdm(y2p(spider6[,1:6])~Water+Herbs,data=spider6)
fit3 <- mdm(y2p(spider6[,1:6])~Site,data=spider6,alpha=TRUE)
anova(fit0,fit1,fit2,fit3)
|
Species Richness, Dominance and Diversity Differences
I think neither of these responses fit perfectly into any of the standard GLM link functions. Taking a pragmatic approach it is probably sufficient to pick a link function that is broadly doing the r
|
43,311
|
Explanation for the thresholds in the sequential probability ratio test
|
A first step in understanding this type of testing plan is to consider a Double-Sampling Plan for attributes. This type of plan is designed to determine whether a lot of product should be accepted or rejected based on sampling items, where each item in the lot can be categorized as either good or defective. The plan is defined by four numbers, $ n_{1} $, $ c_{1} $, $ n_{2} $, and $ c_{2} $. The plan is run as follows
A sample of size $ n_{1} $ is taken
If there are no more than $ c_{1} $
defects in the sample, then the lot is accepted.
If there are more than $ c_{2} $ defects, then
the lot is rejected.
If the lot is neither accepted nor rejected then a sample of
size $ n_{2} $ is taken.
If the sum of the number of defectives in both samples is
less than $ c_{2} $, then the lot is
accepted.
If the number the number of defects in both samples is greater than
$ c_{2} $, then the lot is rejected.
In such a plan, both a Type I and Type II error are chosen BEFORE the
plan is run, and that is how the numbers above are set.
There are plans called multiple sampling plans that instead of having two
samples being taken, have some pre-determined number of samples being taken.
Finally, when the multiplicity of the multiple sampling plan goes to
infinity you get the sequential probability ratio test plan.
|
Explanation for the thresholds in the sequential probability ratio test
|
A first step in understanding this type of testing plan is to consider a Double-Sampling Plan for attributes. This type of plan is designed to determine whether a lot of product should be accepted or
|
Explanation for the thresholds in the sequential probability ratio test
A first step in understanding this type of testing plan is to consider a Double-Sampling Plan for attributes. This type of plan is designed to determine whether a lot of product should be accepted or rejected based on sampling items, where each item in the lot can be categorized as either good or defective. The plan is defined by four numbers, $ n_{1} $, $ c_{1} $, $ n_{2} $, and $ c_{2} $. The plan is run as follows
A sample of size $ n_{1} $ is taken
If there are no more than $ c_{1} $
defects in the sample, then the lot is accepted.
If there are more than $ c_{2} $ defects, then
the lot is rejected.
If the lot is neither accepted nor rejected then a sample of
size $ n_{2} $ is taken.
If the sum of the number of defectives in both samples is
less than $ c_{2} $, then the lot is
accepted.
If the number the number of defects in both samples is greater than
$ c_{2} $, then the lot is rejected.
In such a plan, both a Type I and Type II error are chosen BEFORE the
plan is run, and that is how the numbers above are set.
There are plans called multiple sampling plans that instead of having two
samples being taken, have some pre-determined number of samples being taken.
Finally, when the multiplicity of the multiple sampling plan goes to
infinity you get the sequential probability ratio test plan.
|
Explanation for the thresholds in the sequential probability ratio test
A first step in understanding this type of testing plan is to consider a Double-Sampling Plan for attributes. This type of plan is designed to determine whether a lot of product should be accepted or
|
43,312
|
Standardized residuals vs. regular residuals
|
The $u$s are unobserved and the $\hat{d}$s are just estimates of them.
|
Standardized residuals vs. regular residuals
|
The $u$s are unobserved and the $\hat{d}$s are just estimates of them.
|
Standardized residuals vs. regular residuals
The $u$s are unobserved and the $\hat{d}$s are just estimates of them.
|
Standardized residuals vs. regular residuals
The $u$s are unobserved and the $\hat{d}$s are just estimates of them.
|
43,313
|
Standardized residuals vs. regular residuals
|
This inference is no different from any other inference we make. We assume a default (you could call it a 'null'). In this case, it's that the underlying distribution is Gaussian. We examine the data to see if they are inconsistent with our default hypothesis. If the qq-plot of our residuals looks sufficiently Gaussian for your satisfaction, then we stick with that assumption. In truth, no matter how non-normal our residuals appear, they could still have come from an underlying Gaussian distribution, but at some point, we just don't believe it anymore. Another way to phrase this is that we don't assume they're Gaussian because the qq-plot looks Gaussian, rather we don't stop assuming they're Gaussian because the qq-plot doen't look sufficiently non-Gaussian.
Some people have trouble with this line of reasoning; which is perfectly fine. You might be interested in checking out the Bayesian approach to statistics.
|
Standardized residuals vs. regular residuals
|
This inference is no different from any other inference we make. We assume a default (you could call it a 'null'). In this case, it's that the underlying distribution is Gaussian. We examine the da
|
Standardized residuals vs. regular residuals
This inference is no different from any other inference we make. We assume a default (you could call it a 'null'). In this case, it's that the underlying distribution is Gaussian. We examine the data to see if they are inconsistent with our default hypothesis. If the qq-plot of our residuals looks sufficiently Gaussian for your satisfaction, then we stick with that assumption. In truth, no matter how non-normal our residuals appear, they could still have come from an underlying Gaussian distribution, but at some point, we just don't believe it anymore. Another way to phrase this is that we don't assume they're Gaussian because the qq-plot looks Gaussian, rather we don't stop assuming they're Gaussian because the qq-plot doen't look sufficiently non-Gaussian.
Some people have trouble with this line of reasoning; which is perfectly fine. You might be interested in checking out the Bayesian approach to statistics.
|
Standardized residuals vs. regular residuals
This inference is no different from any other inference we make. We assume a default (you could call it a 'null'). In this case, it's that the underlying distribution is Gaussian. We examine the da
|
43,314
|
Standardized residuals vs. regular residuals
|
In a linear model $ y = X\beta + u $ with $u \sim N(0, \sigma^2I)$, the vector of raw residuals is $ \hat u = y - \hat y = (I - H)y $ where the hat matrix $H = X(X'X)^{-1}X' $. The response $y$ is normally distributed given the assumed normality of the error terms.
Consequently, if the model assumes normality correctly, $\hat u$ is also normally distributed since each residual is a linear combination of $y$. Therefore, if a QQ-plot does not support the normality of $\hat u$, it warrants a question about the normality of $y$, which in turn raises a doubt about the normality assumption of $u$. On the other hand, if there is a lack of evidence to reject the normality of $\hat u$, the logic is to accept the normality of $u$.
On the specific question about checking normality of $\hat d = \hat u/\hat \sigma $ and its relationship to the normality of $u$ ...
As just mentioned, $\hat u$ is normally distributed under the model, so is $\hat u/c$ for any non-zero constant $c$, such as $\sigma$. If $\sigma$ were known, the scaled residual $\hat u/\sigma$ would be better than $\hat u$ for identifying potential outliers. As $\sigma$ is usually unknown, $\hat d$ = $\hat u/\hat \sigma$ is used instead. However, the approach of checking the normality of $\hat d$ to validate the normality of $u$ is approximate and less preferred given that its divisor $\hat \sigma$ is a statistic, not a constant.
Is then using $\hat u$ to assess the normality of $u$ a perfect approach? Not necessarily...
Note that $Var(\hat u)$ = $\sigma^2(I - H)$, indicating that raw residuals are correlated and variances are not constant. More specifically, such residuals are not sample points randomly (independently) drawn from a common underlined distribution. Is it then appropriate to subject the residuals to a univariate QQ-plot to assess normality?
In brief, any conclusion about normality from a QQ-plot is visual based, thus subjective, regardless of which type of residuals (raw or otherwise) is evaluated. Besides, normality assessment is only one aspect of model adequacy assessment. While raw residuals may be more appropriate with QQ-plot, other types of residuals may be better suited with other diagnostic tools.
|
Standardized residuals vs. regular residuals
|
In a linear model $ y = X\beta + u $ with $u \sim N(0, \sigma^2I)$, the vector of raw residuals is $ \hat u = y - \hat y = (I - H)y $ where the hat matrix $H = X(X'X)^{-1}X' $. The response $y$ is
|
Standardized residuals vs. regular residuals
In a linear model $ y = X\beta + u $ with $u \sim N(0, \sigma^2I)$, the vector of raw residuals is $ \hat u = y - \hat y = (I - H)y $ where the hat matrix $H = X(X'X)^{-1}X' $. The response $y$ is normally distributed given the assumed normality of the error terms.
Consequently, if the model assumes normality correctly, $\hat u$ is also normally distributed since each residual is a linear combination of $y$. Therefore, if a QQ-plot does not support the normality of $\hat u$, it warrants a question about the normality of $y$, which in turn raises a doubt about the normality assumption of $u$. On the other hand, if there is a lack of evidence to reject the normality of $\hat u$, the logic is to accept the normality of $u$.
On the specific question about checking normality of $\hat d = \hat u/\hat \sigma $ and its relationship to the normality of $u$ ...
As just mentioned, $\hat u$ is normally distributed under the model, so is $\hat u/c$ for any non-zero constant $c$, such as $\sigma$. If $\sigma$ were known, the scaled residual $\hat u/\sigma$ would be better than $\hat u$ for identifying potential outliers. As $\sigma$ is usually unknown, $\hat d$ = $\hat u/\hat \sigma$ is used instead. However, the approach of checking the normality of $\hat d$ to validate the normality of $u$ is approximate and less preferred given that its divisor $\hat \sigma$ is a statistic, not a constant.
Is then using $\hat u$ to assess the normality of $u$ a perfect approach? Not necessarily...
Note that $Var(\hat u)$ = $\sigma^2(I - H)$, indicating that raw residuals are correlated and variances are not constant. More specifically, such residuals are not sample points randomly (independently) drawn from a common underlined distribution. Is it then appropriate to subject the residuals to a univariate QQ-plot to assess normality?
In brief, any conclusion about normality from a QQ-plot is visual based, thus subjective, regardless of which type of residuals (raw or otherwise) is evaluated. Besides, normality assessment is only one aspect of model adequacy assessment. While raw residuals may be more appropriate with QQ-plot, other types of residuals may be better suited with other diagnostic tools.
|
Standardized residuals vs. regular residuals
In a linear model $ y = X\beta + u $ with $u \sim N(0, \sigma^2I)$, the vector of raw residuals is $ \hat u = y - \hat y = (I - H)y $ where the hat matrix $H = X(X'X)^{-1}X' $. The response $y$ is
|
43,315
|
Classifying clusters using discriminant analysis
|
A good idea might be to run some ANOVAS and MANOVAS on the cluster for whatever variables you're using. The variables that generated the cluster should generally yield significant differences, but if the 5 new vars you're incorporating were not the vars you used to generate the cluster solution, it's interesting to run them.
ANOVA, or a simple compare means test, maybe a t-test, will give you an F statistic, which is a relatively good indicator of how different each group [cluster in this case] is in terms of the relevant variables.
if your new 5 vars are categorical it might be as easy as a chi square test, but you might give multiple correspondence a try. multiple correspondence yields a biplot such that the distances between categories is an indicator of how much they tend to happen together, so if you have cluster 1 very near to 3 categories you conclude that those three categories are characteristic of cluster 1.
Or, you know, just describe the univariate statistics of each of your clusters.
|
Classifying clusters using discriminant analysis
|
A good idea might be to run some ANOVAS and MANOVAS on the cluster for whatever variables you're using. The variables that generated the cluster should generally yield significant differences, but if
|
Classifying clusters using discriminant analysis
A good idea might be to run some ANOVAS and MANOVAS on the cluster for whatever variables you're using. The variables that generated the cluster should generally yield significant differences, but if the 5 new vars you're incorporating were not the vars you used to generate the cluster solution, it's interesting to run them.
ANOVA, or a simple compare means test, maybe a t-test, will give you an F statistic, which is a relatively good indicator of how different each group [cluster in this case] is in terms of the relevant variables.
if your new 5 vars are categorical it might be as easy as a chi square test, but you might give multiple correspondence a try. multiple correspondence yields a biplot such that the distances between categories is an indicator of how much they tend to happen together, so if you have cluster 1 very near to 3 categories you conclude that those three categories are characteristic of cluster 1.
Or, you know, just describe the univariate statistics of each of your clusters.
|
Classifying clusters using discriminant analysis
A good idea might be to run some ANOVAS and MANOVAS on the cluster for whatever variables you're using. The variables that generated the cluster should generally yield significant differences, but if
|
43,316
|
Inverse of false discovery rate (FDR)
|
You are trying to find the 'rejection region' for a given $q_{crit}$. ($q_{crit}$ is typically referred to as $\alpha$ in the literature.)
Further Reading:
Storey, JD "A direct approach to false discovery rates" J. R. Statist. Soc. (2002)
www.genomine.org/papers/directfdr.pdf
|
Inverse of false discovery rate (FDR)
|
You are trying to find the 'rejection region' for a given $q_{crit}$. ($q_{crit}$ is typically referred to as $\alpha$ in the literature.)
Further Reading:
Storey, JD "A direct approach to false disco
|
Inverse of false discovery rate (FDR)
You are trying to find the 'rejection region' for a given $q_{crit}$. ($q_{crit}$ is typically referred to as $\alpha$ in the literature.)
Further Reading:
Storey, JD "A direct approach to false discovery rates" J. R. Statist. Soc. (2002)
www.genomine.org/papers/directfdr.pdf
|
Inverse of false discovery rate (FDR)
You are trying to find the 'rejection region' for a given $q_{crit}$. ($q_{crit}$ is typically referred to as $\alpha$ in the literature.)
Further Reading:
Storey, JD "A direct approach to false disco
|
43,317
|
How to test whether two distance/difference matrices are different?
|
I am not sure I understand what you mean by difference/distance/dissimilarity matrix. Assuming that $D_{i,j}^2 = (v_i - v_j)^{\top}(v_i - v_j)$ for some vectors $v_i, v_j$, if you can accept a transformation to the crossproduct matrix $G_{i,j} = -2 v_i^{\top}v_j$ (say for example the vectors are normalized so $v_i^{\top}v_i = 1 = v_j^{\top}v_j$, and so you can subtract out the 2 from $D_{i,j}^2$). Then you can compare the two cross product matrices, $G$ and $H$ call them, by a Wilks' lambda test, I think. I'm not sure, but I think they would both have to be the same rotation away from Wishart matrices. The Wilks' lambda distribution would then describe the ratio of the products of the eigenvalues of the two matrices under the null.
This may not be applicable to your problem, though...
|
How to test whether two distance/difference matrices are different?
|
I am not sure I understand what you mean by difference/distance/dissimilarity matrix. Assuming that $D_{i,j}^2 = (v_i - v_j)^{\top}(v_i - v_j)$ for some vectors $v_i, v_j$, if you can accept a transfo
|
How to test whether two distance/difference matrices are different?
I am not sure I understand what you mean by difference/distance/dissimilarity matrix. Assuming that $D_{i,j}^2 = (v_i - v_j)^{\top}(v_i - v_j)$ for some vectors $v_i, v_j$, if you can accept a transformation to the crossproduct matrix $G_{i,j} = -2 v_i^{\top}v_j$ (say for example the vectors are normalized so $v_i^{\top}v_i = 1 = v_j^{\top}v_j$, and so you can subtract out the 2 from $D_{i,j}^2$). Then you can compare the two cross product matrices, $G$ and $H$ call them, by a Wilks' lambda test, I think. I'm not sure, but I think they would both have to be the same rotation away from Wishart matrices. The Wilks' lambda distribution would then describe the ratio of the products of the eigenvalues of the two matrices under the null.
This may not be applicable to your problem, though...
|
How to test whether two distance/difference matrices are different?
I am not sure I understand what you mean by difference/distance/dissimilarity matrix. Assuming that $D_{i,j}^2 = (v_i - v_j)^{\top}(v_i - v_j)$ for some vectors $v_i, v_j$, if you can accept a transfo
|
43,318
|
Which hierarchical clustering algorithm?
|
Sounds like you need HAC (hierarchical agglomerative clustering). There are many variants, but the basic idea is that you start with singleton clusters and progressively merge, based on different ways of determining which clusters are the "closest".
For more on HAC, see the wikipedia entry.
|
Which hierarchical clustering algorithm?
|
Sounds like you need HAC (hierarchical agglomerative clustering). There are many variants, but the basic idea is that you start with singleton clusters and progressively merge, based on different ways
|
Which hierarchical clustering algorithm?
Sounds like you need HAC (hierarchical agglomerative clustering). There are many variants, but the basic idea is that you start with singleton clusters and progressively merge, based on different ways of determining which clusters are the "closest".
For more on HAC, see the wikipedia entry.
|
Which hierarchical clustering algorithm?
Sounds like you need HAC (hierarchical agglomerative clustering). There are many variants, but the basic idea is that you start with singleton clusters and progressively merge, based on different ways
|
43,319
|
Which hierarchical clustering algorithm?
|
Some interesting things you could try out:
Take a look at SigClust - it's an R function that allows you to establish the significance of clustering using bootstrapping/monte carlo simulation. SigClust will provide a p-value for the clustering operation between two sets of points. Theoretically, you can run it at every node of your hierarchical clustering tree, but it tends to be time consuming so maybe at nodes of more than 10 points. In either case, if you SigClust consistently provide high p-values for a clustering of points, then those might highlight the natural clusters you are looking for.
Try to see whether you can use OREO or optimal re-ordering instead of hierarchical clustering. There isn't an R implementation available as far as I know, but the algorithm does generate very impressive results (at least in the papers that I have read). If you have a background in mathematical programming I'm sure you could get something like this working using CPLEX.
|
Which hierarchical clustering algorithm?
|
Some interesting things you could try out:
Take a look at SigClust - it's an R function that allows you to establish the significance of clustering using bootstrapping/monte carlo simulation. SigClus
|
Which hierarchical clustering algorithm?
Some interesting things you could try out:
Take a look at SigClust - it's an R function that allows you to establish the significance of clustering using bootstrapping/monte carlo simulation. SigClust will provide a p-value for the clustering operation between two sets of points. Theoretically, you can run it at every node of your hierarchical clustering tree, but it tends to be time consuming so maybe at nodes of more than 10 points. In either case, if you SigClust consistently provide high p-values for a clustering of points, then those might highlight the natural clusters you are looking for.
Try to see whether you can use OREO or optimal re-ordering instead of hierarchical clustering. There isn't an R implementation available as far as I know, but the algorithm does generate very impressive results (at least in the papers that I have read). If you have a background in mathematical programming I'm sure you could get something like this working using CPLEX.
|
Which hierarchical clustering algorithm?
Some interesting things you could try out:
Take a look at SigClust - it's an R function that allows you to establish the significance of clustering using bootstrapping/monte carlo simulation. SigClus
|
43,320
|
Which hierarchical clustering algorithm?
|
You might want to try "model-based clustering". This algorithm uses "BIC" to determine the number of clusters.
Sincerely
|
Which hierarchical clustering algorithm?
|
You might want to try "model-based clustering". This algorithm uses "BIC" to determine the number of clusters.
Sincerely
|
Which hierarchical clustering algorithm?
You might want to try "model-based clustering". This algorithm uses "BIC" to determine the number of clusters.
Sincerely
|
Which hierarchical clustering algorithm?
You might want to try "model-based clustering". This algorithm uses "BIC" to determine the number of clusters.
Sincerely
|
43,321
|
Canonical correlation analysis and time series analysis
|
I don't think that using CCA will help you. It appears to me that you have a number of endogenous series ( abundance of species n in number ) and a number of exogenous series ( variety of food resources m in number ). I would suggest constructing n transfer functions each one optimized to fully utilize the information content in the m supporting series and their lags if appropriate while incorporating and unspecified stochastic structure with ARMA and unspecified deterministic structure like Level Shifts/Local Time Trends etc.. Having these n equations unser a "statistical microscope" might illuminate "commonalities" suggesting further grouping of the n equations into subsets.
|
Canonical correlation analysis and time series analysis
|
I don't think that using CCA will help you. It appears to me that you have a number of endogenous series ( abundance of species n in number ) and a number of exogenous series ( variety of food resourc
|
Canonical correlation analysis and time series analysis
I don't think that using CCA will help you. It appears to me that you have a number of endogenous series ( abundance of species n in number ) and a number of exogenous series ( variety of food resources m in number ). I would suggest constructing n transfer functions each one optimized to fully utilize the information content in the m supporting series and their lags if appropriate while incorporating and unspecified stochastic structure with ARMA and unspecified deterministic structure like Level Shifts/Local Time Trends etc.. Having these n equations unser a "statistical microscope" might illuminate "commonalities" suggesting further grouping of the n equations into subsets.
|
Canonical correlation analysis and time series analysis
I don't think that using CCA will help you. It appears to me that you have a number of endogenous series ( abundance of species n in number ) and a number of exogenous series ( variety of food resourc
|
43,322
|
Hard exemplary problem sets to work through to solidify my understanding of statistical concepts?
|
Mathematical Statistics and Data Analysis, by John A. Rice, Third Edition
If you are struggling to understand how different things in statistical relate to each other, the "glue" that you are missing is an understanding of mathematical statistics.
Rice's textbook provides the theory that justifies most of the statistical tests and methods which are used in introductory statistical courses. For example, it derives the $t$ and $\chi^2$ distributions and describes how they can be used to construct statistical tests. By contrast, most introductory statistical texts list the different distributions and tests but do not derive them.
It is a standard textbook in mathematical statistics. It does not assume much in the way of existing knowledge, but it does require some effort to work through the content (particularly if you are not comfortable in maths). There are lots of examples at the end of the chapters.
No doubt there are other statistical textbooks of equal quality. My key point is that an understanding of mathematical statistics is the thing required in order to understand statistics at a non-superficial level and it is particularly useful if you come from a machine learning background as the basic logic is very different (i.e., proofs rather than learning by trial and error and bake-offs).
|
Hard exemplary problem sets to work through to solidify my understanding of statistical concepts?
|
Mathematical Statistics and Data Analysis, by John A. Rice, Third Edition
If you are struggling to understand how different things in statistical relate to each other, the "glue" that you are missing
|
Hard exemplary problem sets to work through to solidify my understanding of statistical concepts?
Mathematical Statistics and Data Analysis, by John A. Rice, Third Edition
If you are struggling to understand how different things in statistical relate to each other, the "glue" that you are missing is an understanding of mathematical statistics.
Rice's textbook provides the theory that justifies most of the statistical tests and methods which are used in introductory statistical courses. For example, it derives the $t$ and $\chi^2$ distributions and describes how they can be used to construct statistical tests. By contrast, most introductory statistical texts list the different distributions and tests but do not derive them.
It is a standard textbook in mathematical statistics. It does not assume much in the way of existing knowledge, but it does require some effort to work through the content (particularly if you are not comfortable in maths). There are lots of examples at the end of the chapters.
No doubt there are other statistical textbooks of equal quality. My key point is that an understanding of mathematical statistics is the thing required in order to understand statistics at a non-superficial level and it is particularly useful if you come from a machine learning background as the basic logic is very different (i.e., proofs rather than learning by trial and error and bake-offs).
|
Hard exemplary problem sets to work through to solidify my understanding of statistical concepts?
Mathematical Statistics and Data Analysis, by John A. Rice, Third Edition
If you are struggling to understand how different things in statistical relate to each other, the "glue" that you are missing
|
43,323
|
Two-way robust ANOVA
|
How is normality violated? Medians are more sensitive to skew than means as n gets low. Be careful of that. It would be very problematic if small n's varied in a systematic way.
How much is homoscedascity violated? If the n's are about equal it won't matter much for quite large differences.
|
Two-way robust ANOVA
|
How is normality violated? Medians are more sensitive to skew than means as n gets low. Be careful of that. It would be very problematic if small n's varied in a systematic way.
How much is homosce
|
Two-way robust ANOVA
How is normality violated? Medians are more sensitive to skew than means as n gets low. Be careful of that. It would be very problematic if small n's varied in a systematic way.
How much is homoscedascity violated? If the n's are about equal it won't matter much for quite large differences.
|
Two-way robust ANOVA
How is normality violated? Medians are more sensitive to skew than means as n gets low. Be careful of that. It would be very problematic if small n's varied in a systematic way.
How much is homosce
|
43,324
|
How would life expectancy impact the calculation of disease prevalence?
|
It depends on the disease. Consider the following formula:
Prevalence = Incidence * Duration.
If the disease state is permanent, like HIV, then a decrease in life expectancy will decrease prevalence. Example:
We have a population of 1000 people. 5 people get the disease, so incidence = 0.005. If the disease is harmless, and everyone lives, then there are 5 prevalent cases, so prevalence is also 0.005.
What if the life expectancy in the country drops dramatically - specifically, to a very, very small number. Now the duration of the disease is reduced, because people die. Now, even though incidence is 0.005, since duration ~ 0, prevalence will also ~ 0.
This is a problem with the HIV statistics in some African countries. As we introduct HAART, life expectancy is going up, which means the duration of the disease is going up, so you see a rise in prevalence even if your number of incident cases is staying steady or dropping.
For a "best practices" book, I'd suggest "Epidemiology: An Introduction" by Ken Rothman to start with, and "Modern Epidemiology 3rd Edition" by Rothman, Greenland and Lash once you feel like moving on to more advanced topics.
|
How would life expectancy impact the calculation of disease prevalence?
|
It depends on the disease. Consider the following formula:
Prevalence = Incidence * Duration.
If the disease state is permanent, like HIV, then a decrease in life expectancy will decrease prevalence.
|
How would life expectancy impact the calculation of disease prevalence?
It depends on the disease. Consider the following formula:
Prevalence = Incidence * Duration.
If the disease state is permanent, like HIV, then a decrease in life expectancy will decrease prevalence. Example:
We have a population of 1000 people. 5 people get the disease, so incidence = 0.005. If the disease is harmless, and everyone lives, then there are 5 prevalent cases, so prevalence is also 0.005.
What if the life expectancy in the country drops dramatically - specifically, to a very, very small number. Now the duration of the disease is reduced, because people die. Now, even though incidence is 0.005, since duration ~ 0, prevalence will also ~ 0.
This is a problem with the HIV statistics in some African countries. As we introduct HAART, life expectancy is going up, which means the duration of the disease is going up, so you see a rise in prevalence even if your number of incident cases is staying steady or dropping.
For a "best practices" book, I'd suggest "Epidemiology: An Introduction" by Ken Rothman to start with, and "Modern Epidemiology 3rd Edition" by Rothman, Greenland and Lash once you feel like moving on to more advanced topics.
|
How would life expectancy impact the calculation of disease prevalence?
It depends on the disease. Consider the following formula:
Prevalence = Incidence * Duration.
If the disease state is permanent, like HIV, then a decrease in life expectancy will decrease prevalence.
|
43,325
|
Derivation of distance in TwoStep clustering
|
SPSS two step cluster model algorithm is described in more detail in:
Chiu, Tom, DongPing Fang, John Chen, Yao Wang, and Christopher Jeris (2001), "A robust and scalable clustering algorithm for mixed type attributes in large database environment," Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining KDD '01.
More generally, if you look at the model-based clustering literature and the latent class literature you should get an understanding of how continuous and nominal variables enter into the likelihood. The various documentations for Latent Gold are pretty useful and available on the web.
Most of the published literature uses a slightly different model to that in SPSS. The difference relates to the treatment of the class sizes (the priors). The SPSS modification, which is a simplification, seems to be aimed at reducing computing costs (as opposed to increasing rigor).
|
Derivation of distance in TwoStep clustering
|
SPSS two step cluster model algorithm is described in more detail in:
Chiu, Tom, DongPing Fang, John Chen, Yao Wang, and Christopher Jeris (2001), "A robust and scalable clustering algorithm for mixed
|
Derivation of distance in TwoStep clustering
SPSS two step cluster model algorithm is described in more detail in:
Chiu, Tom, DongPing Fang, John Chen, Yao Wang, and Christopher Jeris (2001), "A robust and scalable clustering algorithm for mixed type attributes in large database environment," Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining KDD '01.
More generally, if you look at the model-based clustering literature and the latent class literature you should get an understanding of how continuous and nominal variables enter into the likelihood. The various documentations for Latent Gold are pretty useful and available on the web.
Most of the published literature uses a slightly different model to that in SPSS. The difference relates to the treatment of the class sizes (the priors). The SPSS modification, which is a simplification, seems to be aimed at reducing computing costs (as opposed to increasing rigor).
|
Derivation of distance in TwoStep clustering
SPSS two step cluster model algorithm is described in more detail in:
Chiu, Tom, DongPing Fang, John Chen, Yao Wang, and Christopher Jeris (2001), "A robust and scalable clustering algorithm for mixed
|
43,326
|
Example of discontinous effect of x on y dataset (for paper)
|
In economics, this is called "regression discontinuity." For one example, check out
David Card & Carlos Dobkin & Nicole Maestas, 2008. "The Impact of Nearly Universal Insurance Coverage on Health Care Utilization: Evidence from Medicare," American Economic Review, American Economic Association, vol. 98(5), pages 2242-58. [data]
Here's a summary piece:
Lee, David S., and Thomas Lemieux. 2010. "Regression Discontinuity Designs in Economics." Journal of Economic Literature, 48(2): 281–355. [article page]
Hope that helps.
|
Example of discontinous effect of x on y dataset (for paper)
|
In economics, this is called "regression discontinuity." For one example, check out
David Card & Carlos Dobkin & Nicole Maestas, 2008. "The Impact of Nearly Universal Insurance Coverage on Health Care
|
Example of discontinous effect of x on y dataset (for paper)
In economics, this is called "regression discontinuity." For one example, check out
David Card & Carlos Dobkin & Nicole Maestas, 2008. "The Impact of Nearly Universal Insurance Coverage on Health Care Utilization: Evidence from Medicare," American Economic Review, American Economic Association, vol. 98(5), pages 2242-58. [data]
Here's a summary piece:
Lee, David S., and Thomas Lemieux. 2010. "Regression Discontinuity Designs in Economics." Journal of Economic Literature, 48(2): 281–355. [article page]
Hope that helps.
|
Example of discontinous effect of x on y dataset (for paper)
In economics, this is called "regression discontinuity." For one example, check out
David Card & Carlos Dobkin & Nicole Maestas, 2008. "The Impact of Nearly Universal Insurance Coverage on Health Care
|
43,327
|
How do I calculate the effect size for the Kolmogorov-Smirnov Z statistic?
|
Yes. $D = Z/\sqrt{n}$ for the one-sample test. $D = Z/\sqrt{\frac{n_1 n_2}{n_1 + n_2}}$ for the two-sample test. $D$ should also be the "Most Extreme Differences - Absolute" entry in the output graphic (double-click the table shown in the SPSS output viewer). $Z$ might be labeled "Test Statistic," "Kolmogorov-Smirnov Z," or something else depending on which test and version of SPSS you're using.
It depends. Mann-Whitney tests for a difference in the central tendencies by comparing average ranks; K-S tests for a difference in distributions by comparing the maximum difference in empirical cumulative distribution functions. If you expect strong shape differences, such as only low and high values in one group but middle values for the other group (this would be atypical for most data), K-S is a better choice. If you expect just a location shift, Mann-Whitney is more powerful.
|
How do I calculate the effect size for the Kolmogorov-Smirnov Z statistic?
|
Yes. $D = Z/\sqrt{n}$ for the one-sample test. $D = Z/\sqrt{\frac{n_1 n_2}{n_1 + n_2}}$ for the two-sample test. $D$ should also be the "Most Extreme Differences - Absolute" entry in the output graphi
|
How do I calculate the effect size for the Kolmogorov-Smirnov Z statistic?
Yes. $D = Z/\sqrt{n}$ for the one-sample test. $D = Z/\sqrt{\frac{n_1 n_2}{n_1 + n_2}}$ for the two-sample test. $D$ should also be the "Most Extreme Differences - Absolute" entry in the output graphic (double-click the table shown in the SPSS output viewer). $Z$ might be labeled "Test Statistic," "Kolmogorov-Smirnov Z," or something else depending on which test and version of SPSS you're using.
It depends. Mann-Whitney tests for a difference in the central tendencies by comparing average ranks; K-S tests for a difference in distributions by comparing the maximum difference in empirical cumulative distribution functions. If you expect strong shape differences, such as only low and high values in one group but middle values for the other group (this would be atypical for most data), K-S is a better choice. If you expect just a location shift, Mann-Whitney is more powerful.
|
How do I calculate the effect size for the Kolmogorov-Smirnov Z statistic?
Yes. $D = Z/\sqrt{n}$ for the one-sample test. $D = Z/\sqrt{\frac{n_1 n_2}{n_1 + n_2}}$ for the two-sample test. $D$ should also be the "Most Extreme Differences - Absolute" entry in the output graphi
|
43,328
|
Merging spatial and temporal clusters
|
I don’t know if I understood your question correctly, but I’ll give it a try.
Any hierarchical agglomerative algorithm can do the job. Remember that agglomerative algorithms proceed by “pasting” observations to a cluster and treating the cluster as a single unit.
I would suggest this:
Substitute your 1d or 2d observations with the clusters’ centroids.
Use a distance to assign the temporal observations into the 1d/2d cluster. (Euclidean distance might work).
Hope this works =)
|
Merging spatial and temporal clusters
|
I don’t know if I understood your question correctly, but I’ll give it a try.
Any hierarchical agglomerative algorithm can do the job. Remember that agglomerative algorithms proceed by “pasting” obser
|
Merging spatial and temporal clusters
I don’t know if I understood your question correctly, but I’ll give it a try.
Any hierarchical agglomerative algorithm can do the job. Remember that agglomerative algorithms proceed by “pasting” observations to a cluster and treating the cluster as a single unit.
I would suggest this:
Substitute your 1d or 2d observations with the clusters’ centroids.
Use a distance to assign the temporal observations into the 1d/2d cluster. (Euclidean distance might work).
Hope this works =)
|
Merging spatial and temporal clusters
I don’t know if I understood your question correctly, but I’ll give it a try.
Any hierarchical agglomerative algorithm can do the job. Remember that agglomerative algorithms proceed by “pasting” obser
|
43,329
|
Can we get confidence intervals for entries in stationary vector for an absorbing, time-independent Markov chain?
|
So, as said in the comments, the Markov chain you consider has some absorbing states (and is irreducible, presumably), hence its stationary distribution is concentrated on these absorbing states. Therefore the issue is to compute some confidence intervals for the only two non zero coordinates of the stationary vector, one for each of the absorbing states. I would call these entries absorption probabilities rather than stationary vector because there is not much really stationary here, but anyway...
Since there are two absorbing states, $a$ and $b$ say, you are interested in $u_c=P_c[$The chain is absorbed at $a]$, for a given initial state $c\ne a$, $b$. I gather you observe the number $N_t(x)$ of particles at state $x$ and time $t$, for every state $x$ (or every $x\ne a$, $b$?), at two different times $t_1$ and $t_2$. How to estimate $u_c$ from these counts? Surely I am missing the obvious but, even replacing (a multiple of) each $N_t(x)$ by the exact value of $P_c[$The chain is at $x$ at time $t]$, I do not see how to compute $u_c$ from these quantities.
Dimensional analysis shows that for $n$ states, $N_t(x)$ at every state $x$ and two different times yields $2(n−1)$ independent parameters and the transition matrix has $n(n−1)$ independent parameters, a fact which seems to indicate that it would be impossible to identify the latter from the former as soon as $n\ge3$. OK, this argument is too sloppy to be really conclusive but...
(Caveat: I did not read, and have no access to, the paper by Karson and Wrobleski.)
|
Can we get confidence intervals for entries in stationary vector for an absorbing, time-independent
|
So, as said in the comments, the Markov chain you consider has some absorbing states (and is irreducible, presumably), hence its stationary distribution is concentrated on these absorbing states. Ther
|
Can we get confidence intervals for entries in stationary vector for an absorbing, time-independent Markov chain?
So, as said in the comments, the Markov chain you consider has some absorbing states (and is irreducible, presumably), hence its stationary distribution is concentrated on these absorbing states. Therefore the issue is to compute some confidence intervals for the only two non zero coordinates of the stationary vector, one for each of the absorbing states. I would call these entries absorption probabilities rather than stationary vector because there is not much really stationary here, but anyway...
Since there are two absorbing states, $a$ and $b$ say, you are interested in $u_c=P_c[$The chain is absorbed at $a]$, for a given initial state $c\ne a$, $b$. I gather you observe the number $N_t(x)$ of particles at state $x$ and time $t$, for every state $x$ (or every $x\ne a$, $b$?), at two different times $t_1$ and $t_2$. How to estimate $u_c$ from these counts? Surely I am missing the obvious but, even replacing (a multiple of) each $N_t(x)$ by the exact value of $P_c[$The chain is at $x$ at time $t]$, I do not see how to compute $u_c$ from these quantities.
Dimensional analysis shows that for $n$ states, $N_t(x)$ at every state $x$ and two different times yields $2(n−1)$ independent parameters and the transition matrix has $n(n−1)$ independent parameters, a fact which seems to indicate that it would be impossible to identify the latter from the former as soon as $n\ge3$. OK, this argument is too sloppy to be really conclusive but...
(Caveat: I did not read, and have no access to, the paper by Karson and Wrobleski.)
|
Can we get confidence intervals for entries in stationary vector for an absorbing, time-independent
So, as said in the comments, the Markov chain you consider has some absorbing states (and is irreducible, presumably), hence its stationary distribution is concentrated on these absorbing states. Ther
|
43,330
|
Is a correlation analysis with Pearson's correlation and Bonferroni Method a valid approach to find correlations between two sets of data
|
If you want to test that a given correlation coefficient is significantly different from 0 you would use the distribution of the sample Pearson product moment correlation under the null hypothesis. What they are asking here is different. In a specific case they use the hypergeometric distribution because if there is really no correlation they want to know what is the chance the the gene will occur in m out of the M species for each m between 0 and M. This does describe the hypergeometric distribution. So if m is sufficiently large you would infer that the distribution is not hypergeometric and consequently there is a real correlation. This seems to be an alternative test for non zero correlation. It is often possible to have several tests for the same null hypothesis in which case you would pick the one that is most powerful under reasonable assumptions for your data. It is not clear to me whether or not this hypergeometric test has good power characteristics.
Regarding good statistics textbooks, I don't know of any designed in general for science. If you want a good engineer statistics text or a medical statistics text i can make recommendations. Also I have over 600 books reviewed on amazon. So if you shop around for books on amazon there is a good chance that you can find a review by me for some of them. For engineering I would recommend looking for a book by Douglas Montgomery or one by Jay Devore. For Medicine look at Riffenburgh's "Statistics in Medicine" or the book by Altman. I also have written my own text "The Essentials of Biostatistics for Physicians, Nurses and Clinicians". For general statistics "The Practice of Statistics" by David Moore is an excellent introductory text.
|
Is a correlation analysis with Pearson's correlation and Bonferroni Method a valid approach to find
|
If you want to test that a given correlation coefficient is significantly different from 0 you would use the distribution of the sample Pearson product moment correlation under the null hypothesis. Wh
|
Is a correlation analysis with Pearson's correlation and Bonferroni Method a valid approach to find correlations between two sets of data
If you want to test that a given correlation coefficient is significantly different from 0 you would use the distribution of the sample Pearson product moment correlation under the null hypothesis. What they are asking here is different. In a specific case they use the hypergeometric distribution because if there is really no correlation they want to know what is the chance the the gene will occur in m out of the M species for each m between 0 and M. This does describe the hypergeometric distribution. So if m is sufficiently large you would infer that the distribution is not hypergeometric and consequently there is a real correlation. This seems to be an alternative test for non zero correlation. It is often possible to have several tests for the same null hypothesis in which case you would pick the one that is most powerful under reasonable assumptions for your data. It is not clear to me whether or not this hypergeometric test has good power characteristics.
Regarding good statistics textbooks, I don't know of any designed in general for science. If you want a good engineer statistics text or a medical statistics text i can make recommendations. Also I have over 600 books reviewed on amazon. So if you shop around for books on amazon there is a good chance that you can find a review by me for some of them. For engineering I would recommend looking for a book by Douglas Montgomery or one by Jay Devore. For Medicine look at Riffenburgh's "Statistics in Medicine" or the book by Altman. I also have written my own text "The Essentials of Biostatistics for Physicians, Nurses and Clinicians". For general statistics "The Practice of Statistics" by David Moore is an excellent introductory text.
|
Is a correlation analysis with Pearson's correlation and Bonferroni Method a valid approach to find
If you want to test that a given correlation coefficient is significantly different from 0 you would use the distribution of the sample Pearson product moment correlation under the null hypothesis. Wh
|
43,331
|
Choosing the scope when performing multiple comparisons?
|
Think of the following two experiments:
Experiment A; Throw a fair coin 10 times to assess Prob(Heads).
Experiment B: Throw a fair dice 5 times to assess Prob(Face showing 1).
To take the coin toss example from the wiki: We may wish to declare a coin as biased if we observe more than 9 heads out of 10 tosses.
Thus, if I were to repeat experiment A 100 times then there is 34% chance (see the wiki for the calculations) that we would identify a coin as biased when it is not thus increasing out type I error probability from 0.05 to 0.34. Therefore, we need to control for multiple comparisons in this context.
However, note that our trials in experiment A have no influence on our results as far as experiment B is concerned as that is a completely different data generating process. The above suggests that we have to control for multiple comparisons for the two experiments separately instead of collectively.
In other words, controlling for multiple comparisons should be done whenever the comparisons involve the same data generating process.
Edit
Strictly speaking the above example of coin vs dice is not a good example as that would be analogous to experiments that investigate two very different questions (e.g., estimate whether smoking causes cancer and estimate if jumping red lights leads to an accident). In these contexts, controlling for multiple comparisons collectively for the two experiments is meaningless.
On further thinking, it is not clear to me if the data generating process really has a special role to play as far as multiple comparisons are concerned. Even if the data generating process were to be different (perhaps because of different covariates) you will still run the risk of increasing type I error because of multiple comparisons.
Therefore, it seems to me that what matters is whether the multiple comparisons involve making judgement about the same null hypothesis. As long as the multiple comparisons involve the same null hypothesis we have to correct for multiple comparisons to keep Type I error at desired levels (e.g., 0.05).
|
Choosing the scope when performing multiple comparisons?
|
Think of the following two experiments:
Experiment A; Throw a fair coin 10 times to assess Prob(Heads).
Experiment B: Throw a fair dice 5 times to assess Prob(Face showing 1).
To take the coin toss ex
|
Choosing the scope when performing multiple comparisons?
Think of the following two experiments:
Experiment A; Throw a fair coin 10 times to assess Prob(Heads).
Experiment B: Throw a fair dice 5 times to assess Prob(Face showing 1).
To take the coin toss example from the wiki: We may wish to declare a coin as biased if we observe more than 9 heads out of 10 tosses.
Thus, if I were to repeat experiment A 100 times then there is 34% chance (see the wiki for the calculations) that we would identify a coin as biased when it is not thus increasing out type I error probability from 0.05 to 0.34. Therefore, we need to control for multiple comparisons in this context.
However, note that our trials in experiment A have no influence on our results as far as experiment B is concerned as that is a completely different data generating process. The above suggests that we have to control for multiple comparisons for the two experiments separately instead of collectively.
In other words, controlling for multiple comparisons should be done whenever the comparisons involve the same data generating process.
Edit
Strictly speaking the above example of coin vs dice is not a good example as that would be analogous to experiments that investigate two very different questions (e.g., estimate whether smoking causes cancer and estimate if jumping red lights leads to an accident). In these contexts, controlling for multiple comparisons collectively for the two experiments is meaningless.
On further thinking, it is not clear to me if the data generating process really has a special role to play as far as multiple comparisons are concerned. Even if the data generating process were to be different (perhaps because of different covariates) you will still run the risk of increasing type I error because of multiple comparisons.
Therefore, it seems to me that what matters is whether the multiple comparisons involve making judgement about the same null hypothesis. As long as the multiple comparisons involve the same null hypothesis we have to correct for multiple comparisons to keep Type I error at desired levels (e.g., 0.05).
|
Choosing the scope when performing multiple comparisons?
Think of the following two experiments:
Experiment A; Throw a fair coin 10 times to assess Prob(Heads).
Experiment B: Throw a fair dice 5 times to assess Prob(Face showing 1).
To take the coin toss ex
|
43,332
|
What is the expected number of runs of same color in a standard deck of cards?
|
Suppose $X_n$ denotes the color of the $n$th card in the shuffled deck.
Then note that the last card always denotes the end of a run. Other ends of runs are characterized by $X_n\ne X_{n+1}$ which indicates a run ending at $n$.
Note that $P(X_n\ne X_{n+1})=26/51$ (since once you fix a card, you can choose another card from remaining 51 out of which 26 will have a different color).
So summing up the indicators $X_n\ne X_{n+1}$ we get the number of runs -
$$\#\text{runs}=1+\sum_{n=1}^{51}\mathbb{I}_{X_n\ne X_{n+1}}.$$
So $$E(\#\text{runs})=1+\sum_{n=1}^{51}P(X_n\ne X_{n+1})=1+\sum_{n=1}^{51}26/51=27.$$
Source
|
What is the expected number of runs of same color in a standard deck of cards?
|
Suppose $X_n$ denotes the color of the $n$th card in the shuffled deck.
Then note that the last card always denotes the end of a run. Other ends of runs are characterized by $X_n\ne X_{n+1}$ which ind
|
What is the expected number of runs of same color in a standard deck of cards?
Suppose $X_n$ denotes the color of the $n$th card in the shuffled deck.
Then note that the last card always denotes the end of a run. Other ends of runs are characterized by $X_n\ne X_{n+1}$ which indicates a run ending at $n$.
Note that $P(X_n\ne X_{n+1})=26/51$ (since once you fix a card, you can choose another card from remaining 51 out of which 26 will have a different color).
So summing up the indicators $X_n\ne X_{n+1}$ we get the number of runs -
$$\#\text{runs}=1+\sum_{n=1}^{51}\mathbb{I}_{X_n\ne X_{n+1}}.$$
So $$E(\#\text{runs})=1+\sum_{n=1}^{51}P(X_n\ne X_{n+1})=1+\sum_{n=1}^{51}26/51=27.$$
Source
|
What is the expected number of runs of same color in a standard deck of cards?
Suppose $X_n$ denotes the color of the $n$th card in the shuffled deck.
Then note that the last card always denotes the end of a run. Other ends of runs are characterized by $X_n\ne X_{n+1}$ which ind
|
43,333
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
|
This is quite normal in case of machine learning -- it does not need to be optimal, it must be general.
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
|
This is quite normal in case of machine learning -- it does not need to be optimal, it must be general.
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
This is quite normal in case of machine learning -- it does not need to be optimal, it must be general.
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
This is quite normal in case of machine learning -- it does not need to be optimal, it must be general.
|
43,334
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
|
I am having troubling following your reasoning, but here are some things you should consider.
Generally, the harder you fit a model to your training data, the worse the model will perform on independent validation data sets. By over-fitting the model to the training set, you risk capturing predictor-response relationships that are particular to the training set you are using. These relationships are likely due to random chance. When building a model for classification, you want to only capture the predictor-response relationships that are common to all training sets. This is requires careful selection of the right size model (big enough to capture the true predictor-response relationship, small enough to not to overfit to your particular training set.)
Also, the fact that a linear regression gives an R^2 of 1 doesn't mean much. For example, I can generate a 101 X 100 matrix of N(0,1) observations, take the first column to be the "response", and the other 100 columns to be "predictors." This will give me an R^2 value of 1, even though the "response" and "predictors" are independent (assuming the rows/columns are linearly independent, which they will be with probability 1 if they are all N(0,1) observations.) So in your n=5 observation, p=20 predictor case, you can choose any 5 predictors and get a perfect fit. R^2 is generally a pretty poor model assessment metric.
Also, unless you are certain the conditional distribution of the predictors is multivariate normal and that the predictors have a common covariance matrix, LDA may not be the best choice here. There are several better nonparametric/semiparametric methods available.
Maybe you can clarify your post a little bit to get a better response.
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
|
I am having troubling following your reasoning, but here are some things you should consider.
Generally, the harder you fit a model to your training data, the worse the model will perform on independe
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
I am having troubling following your reasoning, but here are some things you should consider.
Generally, the harder you fit a model to your training data, the worse the model will perform on independent validation data sets. By over-fitting the model to the training set, you risk capturing predictor-response relationships that are particular to the training set you are using. These relationships are likely due to random chance. When building a model for classification, you want to only capture the predictor-response relationships that are common to all training sets. This is requires careful selection of the right size model (big enough to capture the true predictor-response relationship, small enough to not to overfit to your particular training set.)
Also, the fact that a linear regression gives an R^2 of 1 doesn't mean much. For example, I can generate a 101 X 100 matrix of N(0,1) observations, take the first column to be the "response", and the other 100 columns to be "predictors." This will give me an R^2 value of 1, even though the "response" and "predictors" are independent (assuming the rows/columns are linearly independent, which they will be with probability 1 if they are all N(0,1) observations.) So in your n=5 observation, p=20 predictor case, you can choose any 5 predictors and get a perfect fit. R^2 is generally a pretty poor model assessment metric.
Also, unless you are certain the conditional distribution of the predictors is multivariate normal and that the predictors have a common covariance matrix, LDA may not be the best choice here. There are several better nonparametric/semiparametric methods available.
Maybe you can clarify your post a little bit to get a better response.
|
Why prediction of a predicted variable from a discriminant analysis is imperfect
I am having troubling following your reasoning, but here are some things you should consider.
Generally, the harder you fit a model to your training data, the worse the model will perform on independe
|
43,335
|
Why do Bayesians care about the frequentist properties of Bayesian credible intervals?
|
Instead the correct interpretation of confidence intervals seem to be upon repeated samples of the data from the likelihood ('repeated experiments'), (1−α)
of the confidence intervals generated (which will differ every experiment) will contain the true value θ
Your understanding of the confidence interval is complicated by your thinking of it as a Bayesian interval. For a frequentist, an interval does not contain a true value (or not), rather it summarizes an interval or range into which an estimated frequency of results would occur if the study were replicated. Consider the estimation of normal variance without a degree of freedom correction: this is the maximum likelihood estimator, and it is biased. If I construct a 95% CI for this value using the appropriate $\chi^2$ statistics, and I replicate the study an infinite number of times, my biased estimators will fall in the interval 95% of the time as stated. These replicates will not, however, contain the true variance 95% of the time... the coverage will be slightly less than that. It is standard pedagogy to emphasize that the confidence interval does not reflect a probability of containing a true value - the only reason I can imagine for the persistence of this misunderstanding seems to be a lazy approach to pedagogy.
Results about frequentist properties of Bayesian estimators are tremendously interesting for a number of reasons. In particular, it may not be desirable to appeal to the Bayesian interpretation of probability, but rather to develop new ways of estimating values that were previously intractable. Mixed models and models for missing or truncated data come to mind. It's somewhat well known that the EM algorithm can maximize a likelihood, and that there are semiparametric regression techniques for some of these cases, but what about a Bayesian estimator? Could an informative prior be useful? Could the Bayes estimators in these cases improve the MSE? Can they overcome issues with singularities or unstable likelihood functions on the boundary? Bayesian statistics are, among many things, an interesting estimation technique.
I think the best way to understand this is that our preference for frequentist versus Bayesian interpretations of probability are, at times, subjective, and certainly do not apply for every type of problem. Given that, it should be easy to conceptualize frequentist problems (like a decision rule with well understood error rates, or applying standard NHST) where a Bayesian estimation technique could be useful.
|
Why do Bayesians care about the frequentist properties of Bayesian credible intervals?
|
Instead the correct interpretation of confidence intervals seem to be upon repeated samples of the data from the likelihood ('repeated experiments'), (1−α)
of the confidence intervals generated (which
|
Why do Bayesians care about the frequentist properties of Bayesian credible intervals?
Instead the correct interpretation of confidence intervals seem to be upon repeated samples of the data from the likelihood ('repeated experiments'), (1−α)
of the confidence intervals generated (which will differ every experiment) will contain the true value θ
Your understanding of the confidence interval is complicated by your thinking of it as a Bayesian interval. For a frequentist, an interval does not contain a true value (or not), rather it summarizes an interval or range into which an estimated frequency of results would occur if the study were replicated. Consider the estimation of normal variance without a degree of freedom correction: this is the maximum likelihood estimator, and it is biased. If I construct a 95% CI for this value using the appropriate $\chi^2$ statistics, and I replicate the study an infinite number of times, my biased estimators will fall in the interval 95% of the time as stated. These replicates will not, however, contain the true variance 95% of the time... the coverage will be slightly less than that. It is standard pedagogy to emphasize that the confidence interval does not reflect a probability of containing a true value - the only reason I can imagine for the persistence of this misunderstanding seems to be a lazy approach to pedagogy.
Results about frequentist properties of Bayesian estimators are tremendously interesting for a number of reasons. In particular, it may not be desirable to appeal to the Bayesian interpretation of probability, but rather to develop new ways of estimating values that were previously intractable. Mixed models and models for missing or truncated data come to mind. It's somewhat well known that the EM algorithm can maximize a likelihood, and that there are semiparametric regression techniques for some of these cases, but what about a Bayesian estimator? Could an informative prior be useful? Could the Bayes estimators in these cases improve the MSE? Can they overcome issues with singularities or unstable likelihood functions on the boundary? Bayesian statistics are, among many things, an interesting estimation technique.
I think the best way to understand this is that our preference for frequentist versus Bayesian interpretations of probability are, at times, subjective, and certainly do not apply for every type of problem. Given that, it should be easy to conceptualize frequentist problems (like a decision rule with well understood error rates, or applying standard NHST) where a Bayesian estimation technique could be useful.
|
Why do Bayesians care about the frequentist properties of Bayesian credible intervals?
Instead the correct interpretation of confidence intervals seem to be upon repeated samples of the data from the likelihood ('repeated experiments'), (1−α)
of the confidence intervals generated (which
|
43,336
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
|
While there is limited published research directly comparing the Box-Jenkins method based on ACF/PACF plots and information criteria-based methods in ARIMA model selection, most researchers and practitioners have gravitated towards using information criteria methods, such as AIC or BIC, due to their increased efficiency, automation, and out-of-sample forecasting performance.
One study that provides a comparison between the two methods is:
Makridakis, S., & Hibon, M. (2000). The M3-competition: results, conclusions and implications. International Journal of Forecasting, 16(4), 451-476.
The M3 competition involved researchers and practitioners submitting their models for forecasting various time series. While the study does not focus specifically on comparing Box-Jenkins and information criteria-based methods, it does provide insights into which methods performed better in real-world situations. The results of the M3 competition indicate that the methods based on optimizing information criteria tend to perform better in terms of out-of-sample forecasting accuracy.
Given the limited direct comparison of the two approaches in the literature, the preference for information criteria-based methods can be attributed to the following reasons:
Automation: Information criteria-based methods automate the model selection process, reducing the need for subjective decisions and interpretation of ACF/PACF plots.
Efficiency: Grid searching over possible model orders and selecting the one that optimizes an information criterion is generally faster and more efficient than manually identifying the optimal order from ACF/PACF plots.
Out-of-sample forecasting performance: In practice, methods based on optimizing information criteria tend to yield better out-of-sample forecasting accuracy than the Box-Jenkins method.
While the Box-Jenkins method may still have educational value and could be useful in specific cases, for most practical applications, using an automated approach like the ones provided by the forecast or fable packages in R is recommended.
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
|
While there is limited published research directly comparing the Box-Jenkins method based on ACF/PACF plots and information criteria-based methods in ARIMA model selection, most researchers and practi
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
While there is limited published research directly comparing the Box-Jenkins method based on ACF/PACF plots and information criteria-based methods in ARIMA model selection, most researchers and practitioners have gravitated towards using information criteria methods, such as AIC or BIC, due to their increased efficiency, automation, and out-of-sample forecasting performance.
One study that provides a comparison between the two methods is:
Makridakis, S., & Hibon, M. (2000). The M3-competition: results, conclusions and implications. International Journal of Forecasting, 16(4), 451-476.
The M3 competition involved researchers and practitioners submitting their models for forecasting various time series. While the study does not focus specifically on comparing Box-Jenkins and information criteria-based methods, it does provide insights into which methods performed better in real-world situations. The results of the M3 competition indicate that the methods based on optimizing information criteria tend to perform better in terms of out-of-sample forecasting accuracy.
Given the limited direct comparison of the two approaches in the literature, the preference for information criteria-based methods can be attributed to the following reasons:
Automation: Information criteria-based methods automate the model selection process, reducing the need for subjective decisions and interpretation of ACF/PACF plots.
Efficiency: Grid searching over possible model orders and selecting the one that optimizes an information criterion is generally faster and more efficient than manually identifying the optimal order from ACF/PACF plots.
Out-of-sample forecasting performance: In practice, methods based on optimizing information criteria tend to yield better out-of-sample forecasting accuracy than the Box-Jenkins method.
While the Box-Jenkins method may still have educational value and could be useful in specific cases, for most practical applications, using an automated approach like the ones provided by the forecast or fable packages in R is recommended.
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
While there is limited published research directly comparing the Box-Jenkins method based on ACF/PACF plots and information criteria-based methods in ARIMA model selection, most researchers and practi
|
43,337
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
|
From my experience, finding ARIMA (p) and (q) parameters from the ACF/PACF plots yields better results than auto.arima, measured as lower RSME and/or lower MAPE errors. Note that ARIMA is a statistical model, and the output of the auto-correlation plots relate directly to the auto-regression (AR) and moving average (MA) parts of the model. I acknowledge that it's not very practical though, especially when one needs to develop several ARIMA models at once (eg. to predict sales of several products, etc).
This is where auto.arima comes in handy, as it automatically finds a decent set of parameters. It's not always the best parameters (ie. not necessarily the lowest forecast error metrics), but typically decent parameters yielding not so different error metrics as compared to manual search. These automatic processes for picking the best model are based on some Information Criterion, such as AIC or BIC, which increasingly penalizes the inclusion of more parameters in the model. So these methods tend to find a balance between a good performance and a simple model - is to say, they find the best performance with a simpler model. They do so as typically the inclusion of more parameters tends to yield lower error metrics, even though the model may be running into overfitting - it is thus a way to avoid overfitting.
In conclusion:
If I am developing 1 (or very few) models, I'll search parameters manually through ACF/PACF for the best performance.
If I am developing several ARIMA models, I'll conduct the search automatically by auto.arima for the sake of practicality, without fearing a major loss in performance.
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
|
From my experience, finding ARIMA (p) and (q) parameters from the ACF/PACF plots yields better results than auto.arima, measured as lower RSME and/or lower MAPE errors. Note that ARIMA is a statistica
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
From my experience, finding ARIMA (p) and (q) parameters from the ACF/PACF plots yields better results than auto.arima, measured as lower RSME and/or lower MAPE errors. Note that ARIMA is a statistical model, and the output of the auto-correlation plots relate directly to the auto-regression (AR) and moving average (MA) parts of the model. I acknowledge that it's not very practical though, especially when one needs to develop several ARIMA models at once (eg. to predict sales of several products, etc).
This is where auto.arima comes in handy, as it automatically finds a decent set of parameters. It's not always the best parameters (ie. not necessarily the lowest forecast error metrics), but typically decent parameters yielding not so different error metrics as compared to manual search. These automatic processes for picking the best model are based on some Information Criterion, such as AIC or BIC, which increasingly penalizes the inclusion of more parameters in the model. So these methods tend to find a balance between a good performance and a simple model - is to say, they find the best performance with a simpler model. They do so as typically the inclusion of more parameters tends to yield lower error metrics, even though the model may be running into overfitting - it is thus a way to avoid overfitting.
In conclusion:
If I am developing 1 (or very few) models, I'll search parameters manually through ACF/PACF for the best performance.
If I am developing several ARIMA models, I'll conduct the search automatically by auto.arima for the sake of practicality, without fearing a major loss in performance.
|
Selecting ARIMA orders by ACF/PACF vs. by information criteria
From my experience, finding ARIMA (p) and (q) parameters from the ACF/PACF plots yields better results than auto.arima, measured as lower RSME and/or lower MAPE errors. Note that ARIMA is a statistica
|
43,338
|
Adam is an adaptive learning rate method, why people decrease its learning rate manually?
|
There is no one-size-fits-all optimizer. Adam sometimes works, sometimes doesn't. If you look at what is used in different research papers, you would see different optimizers used. There are some authors who argue that you should use vanilla SGD. Adam's learning rate may need tuning and is not necessarily the best algorithm. But there is also research showing that it may be beneficial to use other (that Adam's) learning rate schedules. So it is not that easy, Adam isn't necessarily enough.
|
Adam is an adaptive learning rate method, why people decrease its learning rate manually?
|
There is no one-size-fits-all optimizer. Adam sometimes works, sometimes doesn't. If you look at what is used in different research papers, you would see different optimizers used. There are some auth
|
Adam is an adaptive learning rate method, why people decrease its learning rate manually?
There is no one-size-fits-all optimizer. Adam sometimes works, sometimes doesn't. If you look at what is used in different research papers, you would see different optimizers used. There are some authors who argue that you should use vanilla SGD. Adam's learning rate may need tuning and is not necessarily the best algorithm. But there is also research showing that it may be beneficial to use other (that Adam's) learning rate schedules. So it is not that easy, Adam isn't necessarily enough.
|
Adam is an adaptive learning rate method, why people decrease its learning rate manually?
There is no one-size-fits-all optimizer. Adam sometimes works, sometimes doesn't. If you look at what is used in different research papers, you would see different optimizers used. There are some auth
|
43,339
|
Rule-Based and Tree-Based Statistical Models
|
Rule-based classifier cannot by greedy by definition, IMHO, since they involve only 1 "node". Hence, any rule-based classifier should fulfil what you need. Then, it depends what are your data/task. For classification I would suggest arulesCBA as the first choice to try:
https://cran.r-project.org/web/packages/arulesCBA/index.html
Personally, I have very good experience with Sirus (2class classification but very stable results, no problem with minority-class prediction):
https://cran.r-project.org/web/packages/sirus/index.html
Best!
|
Rule-Based and Tree-Based Statistical Models
|
Rule-based classifier cannot by greedy by definition, IMHO, since they involve only 1 "node". Hence, any rule-based classifier should fulfil what you need. Then, it depends what are your data/task. Fo
|
Rule-Based and Tree-Based Statistical Models
Rule-based classifier cannot by greedy by definition, IMHO, since they involve only 1 "node". Hence, any rule-based classifier should fulfil what you need. Then, it depends what are your data/task. For classification I would suggest arulesCBA as the first choice to try:
https://cran.r-project.org/web/packages/arulesCBA/index.html
Personally, I have very good experience with Sirus (2class classification but very stable results, no problem with minority-class prediction):
https://cran.r-project.org/web/packages/sirus/index.html
Best!
|
Rule-Based and Tree-Based Statistical Models
Rule-based classifier cannot by greedy by definition, IMHO, since they involve only 1 "node". Hence, any rule-based classifier should fulfil what you need. Then, it depends what are your data/task. Fo
|
43,340
|
Analyzing Pfizer Vaccine Efficacy: Testing a Claim about 2 Proportions
|
Based on the comments, there are several issues with this analysis. First, the analysis is based on being able to approximate binomial as normal. Textbooks I've consulted write this requirement in different ways. Sullivan (Fundamentals of Statistics) says that in addition to being binomial, each of the groups must pass $np(1-p) \ge 10$ for this to be valid. For the control group this requirement is satisfied. For the experimental group it is not. Triola (Elementary Statistics) says the requirement is $np\ge5$ and $nq\ge 5$ for each of the two groups. This requirement is met for both groups.
Second, the second analysis also depends on the control group being an estimate of the number of cases expected in the experimental group. This assumption is inaccurate and could cause the vaccine to appear less effective than it is.
Finally, for the confidence interval, again the textbooks give differing requirements ($np(1-p) \ge 10$ vs $np \ge 5$ and $nq \ge 5$). Only some of these requirements are met, suggesting we are on the hairy edge of validity with this analysis. So a crude guess about the proportion who got covid is ($1.6\%$ to $8.2\%$).
What all of the means to me is that we can do some basic analysis, but this has to be taken with a grain of salt because the number of cases is still sufficiently small to not robustly meet the requirements.
Finally, thanks to the people who commented on this posting as they helped me to think more deeply about what was going on
|
Analyzing Pfizer Vaccine Efficacy: Testing a Claim about 2 Proportions
|
Based on the comments, there are several issues with this analysis. First, the analysis is based on being able to approximate binomial as normal. Textbooks I've consulted write this requirement in d
|
Analyzing Pfizer Vaccine Efficacy: Testing a Claim about 2 Proportions
Based on the comments, there are several issues with this analysis. First, the analysis is based on being able to approximate binomial as normal. Textbooks I've consulted write this requirement in different ways. Sullivan (Fundamentals of Statistics) says that in addition to being binomial, each of the groups must pass $np(1-p) \ge 10$ for this to be valid. For the control group this requirement is satisfied. For the experimental group it is not. Triola (Elementary Statistics) says the requirement is $np\ge5$ and $nq\ge 5$ for each of the two groups. This requirement is met for both groups.
Second, the second analysis also depends on the control group being an estimate of the number of cases expected in the experimental group. This assumption is inaccurate and could cause the vaccine to appear less effective than it is.
Finally, for the confidence interval, again the textbooks give differing requirements ($np(1-p) \ge 10$ vs $np \ge 5$ and $nq \ge 5$). Only some of these requirements are met, suggesting we are on the hairy edge of validity with this analysis. So a crude guess about the proportion who got covid is ($1.6\%$ to $8.2\%$).
What all of the means to me is that we can do some basic analysis, but this has to be taken with a grain of salt because the number of cases is still sufficiently small to not robustly meet the requirements.
Finally, thanks to the people who commented on this posting as they helped me to think more deeply about what was going on
|
Analyzing Pfizer Vaccine Efficacy: Testing a Claim about 2 Proportions
Based on the comments, there are several issues with this analysis. First, the analysis is based on being able to approximate binomial as normal. Textbooks I've consulted write this requirement in d
|
43,341
|
How to train a neural network *not* to give a certain output?
|
Usually when doing multi-class classification, we encode the classes using one-hot encoding. For example, in four-class classification, belonging to third class would be encoded as [0, 0, 1, 0]. In your case, you seem to have missing information in the data, since you know only something like "it's not class one, or two", i.e. [0, 0, ?, ?].
Simple solution could be to redefine the problem, and treat it as a multi-label classification problem, where for each training example you would code as 0's the classes that are not positive, while positive, or unknown classes are coded as 1's.
[0, 0, ?, ?] -> [0, 0, 1, 1]
[1, 0, 0, 0] -> [1, 0, 0, 0]
[?, ?, 0, ?] -> [1, 1, 0, 1]
This would make your algorithm learn to classify the possible positives, so you could choose among them to make proper classification.
Notice, that this makes it a noisy labels problem. You have data, but imprecise. Imagine that you had three, very similar, examples, and you would know that the first is "not class one", second is "not class one, or four", while third is "not class three, or four". From this, you could deduce that the examples are certainly not from class four, and probably not from class one, or two, so they likely come from class two. This is how, given enough data, your algorithm could learn the correct answer given noisy labels.
If you additionally have a subset of good data, where all the examples have proper labels, than you could use this data to learn a standard multi-class classifier. Next, you could combine both results, so that first classifier is used to filter the likely classes, and second to make the classification. For example, if the first classifier returns the probabilities of being non-negative $(p_1, p_2, p_3, p_4)$, and the second one probabilities of belonging to the class $(q_1, q_2, q_3, q_4)$, than you could combine those to make classification by taking
$$
\operatorname{arg\max}_i\; (p_1 q_1,\, p_2 q_2,\, p_3 q_3,\, p_4 q_4)
$$
|
How to train a neural network *not* to give a certain output?
|
Usually when doing multi-class classification, we encode the classes using one-hot encoding. For example, in four-class classification, belonging to third class would be encoded as [0, 0, 1, 0]. In yo
|
How to train a neural network *not* to give a certain output?
Usually when doing multi-class classification, we encode the classes using one-hot encoding. For example, in four-class classification, belonging to third class would be encoded as [0, 0, 1, 0]. In your case, you seem to have missing information in the data, since you know only something like "it's not class one, or two", i.e. [0, 0, ?, ?].
Simple solution could be to redefine the problem, and treat it as a multi-label classification problem, where for each training example you would code as 0's the classes that are not positive, while positive, or unknown classes are coded as 1's.
[0, 0, ?, ?] -> [0, 0, 1, 1]
[1, 0, 0, 0] -> [1, 0, 0, 0]
[?, ?, 0, ?] -> [1, 1, 0, 1]
This would make your algorithm learn to classify the possible positives, so you could choose among them to make proper classification.
Notice, that this makes it a noisy labels problem. You have data, but imprecise. Imagine that you had three, very similar, examples, and you would know that the first is "not class one", second is "not class one, or four", while third is "not class three, or four". From this, you could deduce that the examples are certainly not from class four, and probably not from class one, or two, so they likely come from class two. This is how, given enough data, your algorithm could learn the correct answer given noisy labels.
If you additionally have a subset of good data, where all the examples have proper labels, than you could use this data to learn a standard multi-class classifier. Next, you could combine both results, so that first classifier is used to filter the likely classes, and second to make the classification. For example, if the first classifier returns the probabilities of being non-negative $(p_1, p_2, p_3, p_4)$, and the second one probabilities of belonging to the class $(q_1, q_2, q_3, q_4)$, than you could combine those to make classification by taking
$$
\operatorname{arg\max}_i\; (p_1 q_1,\, p_2 q_2,\, p_3 q_3,\, p_4 q_4)
$$
|
How to train a neural network *not* to give a certain output?
Usually when doing multi-class classification, we encode the classes using one-hot encoding. For example, in four-class classification, belonging to third class would be encoded as [0, 0, 1, 0]. In yo
|
43,342
|
How to train a neural network *not* to give a certain output?
|
To answer the question about your approach of providing target distributions: yes, that is a correct approach, and softmax is the right final layer for this approach.
|
How to train a neural network *not* to give a certain output?
|
To answer the question about your approach of providing target distributions: yes, that is a correct approach, and softmax is the right final layer for this approach.
|
How to train a neural network *not* to give a certain output?
To answer the question about your approach of providing target distributions: yes, that is a correct approach, and softmax is the right final layer for this approach.
|
How to train a neural network *not* to give a certain output?
To answer the question about your approach of providing target distributions: yes, that is a correct approach, and softmax is the right final layer for this approach.
|
43,343
|
When to test For Equality of Medians, and when Stochastic Equality?
|
This depends, in part, on the number of ordinal categories.
If the number of categories is small, then comparing the medians may be uninformative. Suppose the categories are Like/Like Somewhat/Neutral/Dislike Somewhat/Dislike, the
poor group’s answers are distributed 20%-20%-20%-20%-20%, and the rich group’s answers are distributed 10%-20%-25%-25%-20%. Then both groups have a median response of Neutral, but the comparison of random pairs shows that a rich person will probably be more negative than the poor person. Depending on the size of the groups, that might be significant.
If the number of categories is large, then comparing the medians may be more useful. Suppose twelve people from groups A and B all start a task at the same time, and the only data available is that they finish in the order ABABBBAAABAB. Then a random pair from the two groups is equally likely to have the A or B person finish first, but the median person in group B finished earlier than the median person in group A. Again, with enough people in the groups, the difference in medians might be significant.
More generally, if you don’t care about small perturbations in the tails of the two grops, or if you think that there’s more noise or measurement error in those tails, then the medians are more robust and it would be appropriate to test the significance of their difference.
|
When to test For Equality of Medians, and when Stochastic Equality?
|
This depends, in part, on the number of ordinal categories.
If the number of categories is small, then comparing the medians may be uninformative. Suppose the categories are Like/Like Somewhat/Neutral
|
When to test For Equality of Medians, and when Stochastic Equality?
This depends, in part, on the number of ordinal categories.
If the number of categories is small, then comparing the medians may be uninformative. Suppose the categories are Like/Like Somewhat/Neutral/Dislike Somewhat/Dislike, the
poor group’s answers are distributed 20%-20%-20%-20%-20%, and the rich group’s answers are distributed 10%-20%-25%-25%-20%. Then both groups have a median response of Neutral, but the comparison of random pairs shows that a rich person will probably be more negative than the poor person. Depending on the size of the groups, that might be significant.
If the number of categories is large, then comparing the medians may be more useful. Suppose twelve people from groups A and B all start a task at the same time, and the only data available is that they finish in the order ABABBBAAABAB. Then a random pair from the two groups is equally likely to have the A or B person finish first, but the median person in group B finished earlier than the median person in group A. Again, with enough people in the groups, the difference in medians might be significant.
More generally, if you don’t care about small perturbations in the tails of the two grops, or if you think that there’s more noise or measurement error in those tails, then the medians are more robust and it would be appropriate to test the significance of their difference.
|
When to test For Equality of Medians, and when Stochastic Equality?
This depends, in part, on the number of ordinal categories.
If the number of categories is small, then comparing the medians may be uninformative. Suppose the categories are Like/Like Somewhat/Neutral
|
43,344
|
Can any class of ML algorithms efficiently learn the modulo function (x mod y)?
|
FOURIER SERIES
"Not a machine learning algorithm," you say? I disagree. A Fourier series is a linear regression with infinite (nonlinear) features.
$$
\hat y_i = \hat a_0 + \hat a_1\cos\left(
\dfrac{
2\pi \times 1x_i
}{
P
}
\right)
+ \hat b_1\sin\left(
\dfrac{
2\pi \times 1x_i
}{
P
}
\right)
+ \hat a_2\cos\left(
\dfrac{
2\pi \times 2x_i
}{
P
}
\right)
+ \hat b_2\sin\left(
\dfrac{
2\pi \times 2x_i
}{
P
}
\right) +\dots
$$
Even with a finite number of features, you can get as close as you want to the modulo function, which is, ultimately, just a sawtooth function that we know a Fourier series can approximate well almost everywhere.
For the kind of periodic behavior that the modulo function exhibits, trigonometric functions and Fourier series seem like a natural place to look.
EDIT
If you want to have the period be variable (as in $z(x, y) = x\mod y$), perhaps consider an interaction term in the Fourier regression.
|
Can any class of ML algorithms efficiently learn the modulo function (x mod y)?
|
FOURIER SERIES
"Not a machine learning algorithm," you say? I disagree. A Fourier series is a linear regression with infinite (nonlinear) features.
$$
\hat y_i = \hat a_0 + \hat a_1\cos\left(
\dfrac{
|
Can any class of ML algorithms efficiently learn the modulo function (x mod y)?
FOURIER SERIES
"Not a machine learning algorithm," you say? I disagree. A Fourier series is a linear regression with infinite (nonlinear) features.
$$
\hat y_i = \hat a_0 + \hat a_1\cos\left(
\dfrac{
2\pi \times 1x_i
}{
P
}
\right)
+ \hat b_1\sin\left(
\dfrac{
2\pi \times 1x_i
}{
P
}
\right)
+ \hat a_2\cos\left(
\dfrac{
2\pi \times 2x_i
}{
P
}
\right)
+ \hat b_2\sin\left(
\dfrac{
2\pi \times 2x_i
}{
P
}
\right) +\dots
$$
Even with a finite number of features, you can get as close as you want to the modulo function, which is, ultimately, just a sawtooth function that we know a Fourier series can approximate well almost everywhere.
For the kind of periodic behavior that the modulo function exhibits, trigonometric functions and Fourier series seem like a natural place to look.
EDIT
If you want to have the period be variable (as in $z(x, y) = x\mod y$), perhaps consider an interaction term in the Fourier regression.
|
Can any class of ML algorithms efficiently learn the modulo function (x mod y)?
FOURIER SERIES
"Not a machine learning algorithm," you say? I disagree. A Fourier series is a linear regression with infinite (nonlinear) features.
$$
\hat y_i = \hat a_0 + \hat a_1\cos\left(
\dfrac{
|
43,345
|
Distribution-free confidence interval for IQR
|
Two observations, which may produce an acceptable result.
[EDIT] To answer the question on a theoretical formula, I start with individual sample quantiles, see presentation here, which assumes knowledge of the probability density function (pdf). Also, also this work which gives precise theoretical results for several distributions on the expected value and variance of the interquartile range.
Next, as the pdf is generally not known, there are several possible paths to estimate the variance of a sample quantile in practice (see, for example, discussion here per this 2005 work: ' VARIANCE ESTIMATION FOR SAMPLE QUANTILES USING THE m OUT OF n BOOTSTRAP'). Choose one.
Second, as the interquartile range is computed from a simultaneously drawn sample from two sides of an observed empirical distribution, I would argue that randomly having higher (or lower) observations on one side of the distribution produce correspondingly lower (or higher) counts on the opposite side. In other words, the sampling error between the individual quantiles in the IQR are likely negatively correlated.
So being conservative, the variance of the difference between the respective quantiles constituting the IQR is at most the sum of their individual variances (as the covariance term is expected to be negative).
Now, proceed to construct (and test) an interval for the IQR based on the square-root of the composite variance.
|
Distribution-free confidence interval for IQR
|
Two observations, which may produce an acceptable result.
[EDIT] To answer the question on a theoretical formula, I start with individual sample quantiles, see presentation here, which assumes knowled
|
Distribution-free confidence interval for IQR
Two observations, which may produce an acceptable result.
[EDIT] To answer the question on a theoretical formula, I start with individual sample quantiles, see presentation here, which assumes knowledge of the probability density function (pdf). Also, also this work which gives precise theoretical results for several distributions on the expected value and variance of the interquartile range.
Next, as the pdf is generally not known, there are several possible paths to estimate the variance of a sample quantile in practice (see, for example, discussion here per this 2005 work: ' VARIANCE ESTIMATION FOR SAMPLE QUANTILES USING THE m OUT OF n BOOTSTRAP'). Choose one.
Second, as the interquartile range is computed from a simultaneously drawn sample from two sides of an observed empirical distribution, I would argue that randomly having higher (or lower) observations on one side of the distribution produce correspondingly lower (or higher) counts on the opposite side. In other words, the sampling error between the individual quantiles in the IQR are likely negatively correlated.
So being conservative, the variance of the difference between the respective quantiles constituting the IQR is at most the sum of their individual variances (as the covariance term is expected to be negative).
Now, proceed to construct (and test) an interval for the IQR based on the square-root of the composite variance.
|
Distribution-free confidence interval for IQR
Two observations, which may produce an acceptable result.
[EDIT] To answer the question on a theoretical formula, I start with individual sample quantiles, see presentation here, which assumes knowled
|
43,346
|
intraclass correlation (ICC) to assess interrater reliability with repeated measures in R
|
and of course, time is nested within patient
You could just as easily consider patients nested in occasions, if your research question were about differences between occasions. From the perspective of generalizability theory (GT), your repeated measures are really cross-classified. Your "G-study" design is fully crossed: subjects $\times$ occasions $\times$ raters. This design was discussed in depth by:
Vangeneugden, T., Laenen, A., Geys, H., Renard, D., & Molenberghs, G. (2005). Applying concepts of generalizability theory on clinical trial data to investigate sources of variation and their impact on reliability. Biometrics, 61(1), 295-304. https://doi.org/10.1111/j.0006-341X.2005.031040.x
In classical test theory (CTT), reliability is merely the ratio of true-score variance to total variance (true + error), where "error" could be estimated as unreliable variance across scale items, raters, or occasions. CTT includes any reliable sources of error in the true score because it would be observed reliably, so estimates of IRR would be inflated by confounding some error across occasions as true-score variance.
GT extended CTT by allowing the error term to be decomposed into different sources of error, thus allowing for the possibility of excluding reliable error from the numerator ("universe-score variance", analogous to true-score variance in CTT). The term "generalizability" in GT is analogous to "reliability" in CTT, and it gives a less ambiguous quality to what is meant by it: How generalizable are your observed "insight" scores across different occasions and/or raters?
The Shrout & Fleiss (1979) notation you mentioned is insufficient for you design because they only discussed "two-facet designs" (subjects $\times$ raters), as did McGraw & Wong (1996) who extended their work and improved their ambiguous notation.
McGraw, K. O., & Wong, S. P. (1996). Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1(1), 30–46. https://doi.org/10.1037/1082-989X.1.1.30
In GT, a single "generalizability coefficient" (G-coef) is an ICC that quantifies reliability/generalizability of your observed scores simultaneously across raters and occasions. For example, if for each subject you chose to represent their insight by averaging their repeated measures across all $N_r=3$ raters and $N_o=4$ occasions ($N_r \times N_o = 12$), then the reliability of those composite scores would be:
$$\text{G-coef} = \frac{\sigma^2_s}{\sigma^2_s + \frac{\sigma^2_{sr}}{N_r} + \frac{\sigma^2_{so}}{N_o} + \frac{\sigma^2_{sro}}{N_r \times N_o}}$$
This is a 3-facet generalization of the 2-facet ICC(2,k) proposed by Shrout & Fleiss (1979), more descriptively labeled ICC(C,k) by McGraw & Wong (1996) because it is a measure of relative Consistency, as opposed to absolute Agreement. But this is a 3-way crossed design, so there is not a single "k" dimension. This is the model you want to fit:
$$\text{insight}=\mu + \beta_p + \beta_r + \beta_o + \beta_{pr} + \beta_{po} + \beta_{ro} + \beta_{pro}$$
where $\mu$ is the grand mean; subscripts indicate effects vary across patients, raters, or occasions (time); and the highest-order term ($\beta_{pro}$) is always confounded with any other source of measurement error. The variance components can be estimated using lme4, where the highest-order term will simply be the default residual ($\varepsilon$):
lmer(insight ~ 1 + (1|patient) + (1|rater) + (1|time) +
(1|patient:rater) + (1|patient:time) + (1|rater:time),
data=d)
In fact, the R package gtheory can be used to automatically calculate the G-coef, specified using lme4 syntax.
If you think it is relevant to still calculate reliability across only one dimension of error (IRR or test-retest reliability), you need to add another source of error variance (the dimension you are ignoring) from the denominator also to the numerator. Find these formulas in Vangeneugden et al. (2005, p. 298, Eqs. 9 and 10), who also discuss and present formulas for ICCs of absolute agreement ("dependability coefficients" in GT), in case you find those relevant to how you will use your observed scores. But note that they do not divide any error by $N$, which estimates reliability of individual scores (i.e., relevant if you do not intend to use repeated measures in the future, and so will not in practice calculate an average to represent each patient's insight).
|
intraclass correlation (ICC) to assess interrater reliability with repeated measures in R
|
and of course, time is nested within patient
You could just as easily consider patients nested in occasions, if your research question were about differences between occasions. From the perspective
|
intraclass correlation (ICC) to assess interrater reliability with repeated measures in R
and of course, time is nested within patient
You could just as easily consider patients nested in occasions, if your research question were about differences between occasions. From the perspective of generalizability theory (GT), your repeated measures are really cross-classified. Your "G-study" design is fully crossed: subjects $\times$ occasions $\times$ raters. This design was discussed in depth by:
Vangeneugden, T., Laenen, A., Geys, H., Renard, D., & Molenberghs, G. (2005). Applying concepts of generalizability theory on clinical trial data to investigate sources of variation and their impact on reliability. Biometrics, 61(1), 295-304. https://doi.org/10.1111/j.0006-341X.2005.031040.x
In classical test theory (CTT), reliability is merely the ratio of true-score variance to total variance (true + error), where "error" could be estimated as unreliable variance across scale items, raters, or occasions. CTT includes any reliable sources of error in the true score because it would be observed reliably, so estimates of IRR would be inflated by confounding some error across occasions as true-score variance.
GT extended CTT by allowing the error term to be decomposed into different sources of error, thus allowing for the possibility of excluding reliable error from the numerator ("universe-score variance", analogous to true-score variance in CTT). The term "generalizability" in GT is analogous to "reliability" in CTT, and it gives a less ambiguous quality to what is meant by it: How generalizable are your observed "insight" scores across different occasions and/or raters?
The Shrout & Fleiss (1979) notation you mentioned is insufficient for you design because they only discussed "two-facet designs" (subjects $\times$ raters), as did McGraw & Wong (1996) who extended their work and improved their ambiguous notation.
McGraw, K. O., & Wong, S. P. (1996). Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1(1), 30–46. https://doi.org/10.1037/1082-989X.1.1.30
In GT, a single "generalizability coefficient" (G-coef) is an ICC that quantifies reliability/generalizability of your observed scores simultaneously across raters and occasions. For example, if for each subject you chose to represent their insight by averaging their repeated measures across all $N_r=3$ raters and $N_o=4$ occasions ($N_r \times N_o = 12$), then the reliability of those composite scores would be:
$$\text{G-coef} = \frac{\sigma^2_s}{\sigma^2_s + \frac{\sigma^2_{sr}}{N_r} + \frac{\sigma^2_{so}}{N_o} + \frac{\sigma^2_{sro}}{N_r \times N_o}}$$
This is a 3-facet generalization of the 2-facet ICC(2,k) proposed by Shrout & Fleiss (1979), more descriptively labeled ICC(C,k) by McGraw & Wong (1996) because it is a measure of relative Consistency, as opposed to absolute Agreement. But this is a 3-way crossed design, so there is not a single "k" dimension. This is the model you want to fit:
$$\text{insight}=\mu + \beta_p + \beta_r + \beta_o + \beta_{pr} + \beta_{po} + \beta_{ro} + \beta_{pro}$$
where $\mu$ is the grand mean; subscripts indicate effects vary across patients, raters, or occasions (time); and the highest-order term ($\beta_{pro}$) is always confounded with any other source of measurement error. The variance components can be estimated using lme4, where the highest-order term will simply be the default residual ($\varepsilon$):
lmer(insight ~ 1 + (1|patient) + (1|rater) + (1|time) +
(1|patient:rater) + (1|patient:time) + (1|rater:time),
data=d)
In fact, the R package gtheory can be used to automatically calculate the G-coef, specified using lme4 syntax.
If you think it is relevant to still calculate reliability across only one dimension of error (IRR or test-retest reliability), you need to add another source of error variance (the dimension you are ignoring) from the denominator also to the numerator. Find these formulas in Vangeneugden et al. (2005, p. 298, Eqs. 9 and 10), who also discuss and present formulas for ICCs of absolute agreement ("dependability coefficients" in GT), in case you find those relevant to how you will use your observed scores. But note that they do not divide any error by $N$, which estimates reliability of individual scores (i.e., relevant if you do not intend to use repeated measures in the future, and so will not in practice calculate an average to represent each patient's insight).
|
intraclass correlation (ICC) to assess interrater reliability with repeated measures in R
and of course, time is nested within patient
You could just as easily consider patients nested in occasions, if your research question were about differences between occasions. From the perspective
|
43,347
|
Probability of A given B or C
|
1)
$P(A | B \text{ or } C)=P(A|B\cup C)=\frac{P(A\cap(B\cup C))}{P(B\cup C)}$
2)$P(A | B \text{ or } C \text{ or } \dots \color{red}{\text{or }X})$
what is $B \text{ or } X$?
If $X$ is a random variable, I think it is only valid if we use it like $B\cup \{X\in E\}=\{\omega \in \Omega \mid \omega \in B \text{ or } x(\omega)\in E\}$.
so
$P(A | B \text{ or } C \text{ or } \cdots \text{ or } \{X \in E\})$ can be easily calculated by defining $D=B \cup C \cup \cdots \cup \{X \in E\}$.
3) $P(X= x|Y\in [a,b])$ for the case $Y$ is a continues random variable You can easily calculate it if you knowing $P(X\leq x|Y\in [a,b])$.
$$P(X\leq x|Y\in [a,b])=P(\{X \leq x\}|\{Y\in [a,b]\})=\frac{P(\{X \leq x\} \cap \{Y\in [a,b]\})}{P(\{Y\in [a,b]\})}=\frac{\int_{-\infty}^{x}\int_{y\in [a,b]}f_{(X,Y)}(t , y) dy dt}{P(\{Y\in [a,b]\})}=\frac{\int_{-\infty}^{x} \int_{y\in [a,b]}p(t | y)p(y) dy dt}{P(\{Y\in [a,b]\})}$$.
|
Probability of A given B or C
|
1)
$P(A | B \text{ or } C)=P(A|B\cup C)=\frac{P(A\cap(B\cup C))}{P(B\cup C)}$
2)$P(A | B \text{ or } C \text{ or } \dots \color{red}{\text{or }X})$
what is $B \text{ or } X$?
If $X$ is a random variab
|
Probability of A given B or C
1)
$P(A | B \text{ or } C)=P(A|B\cup C)=\frac{P(A\cap(B\cup C))}{P(B\cup C)}$
2)$P(A | B \text{ or } C \text{ or } \dots \color{red}{\text{or }X})$
what is $B \text{ or } X$?
If $X$ is a random variable, I think it is only valid if we use it like $B\cup \{X\in E\}=\{\omega \in \Omega \mid \omega \in B \text{ or } x(\omega)\in E\}$.
so
$P(A | B \text{ or } C \text{ or } \cdots \text{ or } \{X \in E\})$ can be easily calculated by defining $D=B \cup C \cup \cdots \cup \{X \in E\}$.
3) $P(X= x|Y\in [a,b])$ for the case $Y$ is a continues random variable You can easily calculate it if you knowing $P(X\leq x|Y\in [a,b])$.
$$P(X\leq x|Y\in [a,b])=P(\{X \leq x\}|\{Y\in [a,b]\})=\frac{P(\{X \leq x\} \cap \{Y\in [a,b]\})}{P(\{Y\in [a,b]\})}=\frac{\int_{-\infty}^{x}\int_{y\in [a,b]}f_{(X,Y)}(t , y) dy dt}{P(\{Y\in [a,b]\})}=\frac{\int_{-\infty}^{x} \int_{y\in [a,b]}p(t | y)p(y) dy dt}{P(\{Y\in [a,b]\})}$$.
|
Probability of A given B or C
1)
$P(A | B \text{ or } C)=P(A|B\cup C)=\frac{P(A\cap(B\cup C))}{P(B\cup C)}$
2)$P(A | B \text{ or } C \text{ or } \dots \color{red}{\text{or }X})$
what is $B \text{ or } X$?
If $X$ is a random variab
|
43,348
|
ANOVA: life after rejecting the null hypothesis
|
I'll try to answer one piece of the question. There is an established protocol for distinguishing similar groups from dissimilar groups which results in a compact letter display. A series of pairwise tests can be reduced to a compact letter display manually, or, for example, with the function cld in the multcomp package in R.
The following example uses a function from the rcompanion package, because I find it a little easier. (With the caveat that I am the author of this package).
Here, groups sharing a letter are not significantly different (alpha = 0.05).
if(!require(rcompanion)){install.packages("rcompanion")}
Data = read.table(header=T, text="
Comparison p.value cohen.d
'A - B = 0' 0.20 0.5
'A - C = 0' 0.01 0.9
'A - D = 0' 0.001 1.5
'B - C = 0' 0.20 0.5
'B - D = 0' 0.01 1.1
'C - D = 0' 0.20 0.5
")
library(rcompanion)
cldList(p.value ~ Comparison, data=Data, threshold=0.05)
### Group Letter MonoLetter
### 1 A a a
### 2 B ab ab
### 3 C bc bc
### 4 D c c
###
### Groups sharing a letter are not significantly different (alpha = 0.05).
This can be a compact way to present the results of many comparisons, and these letters are useful to add to plots. However, there is a movement away from presenting results in this way, because it treats the alpha level as a magic cutoff, whereas presenting the p values themselves gives the reader more information. For example, the essential R package emmeans no longer supports compact letter displays.
Of course, in this discussion, one shouldn't put too much weight on the p values. One could perhaps use an effect size statistic (like Cohen's d) to do a similar procedure.
Here, let's say we are considering two groups to be relatively similar if Cohen's d isn't at least 1.0. We can create a flag for this, and run a similar procedure.
Data$Flag = as.numeric(Data$cohen.d < 1.0)
cldList(Flag ~ Comparison, data=Data, threshold=0)
### Group Letter MonoLetter
### 1 A a a
### 2 B a a
### 3 C ab ab
### 4 D b b
###
### Groups sharing a letter have Cohen's *d* < 1.0
|
ANOVA: life after rejecting the null hypothesis
|
I'll try to answer one piece of the question. There is an established protocol for distinguishing similar groups from dissimilar groups which results in a compact letter display. A series of pairwis
|
ANOVA: life after rejecting the null hypothesis
I'll try to answer one piece of the question. There is an established protocol for distinguishing similar groups from dissimilar groups which results in a compact letter display. A series of pairwise tests can be reduced to a compact letter display manually, or, for example, with the function cld in the multcomp package in R.
The following example uses a function from the rcompanion package, because I find it a little easier. (With the caveat that I am the author of this package).
Here, groups sharing a letter are not significantly different (alpha = 0.05).
if(!require(rcompanion)){install.packages("rcompanion")}
Data = read.table(header=T, text="
Comparison p.value cohen.d
'A - B = 0' 0.20 0.5
'A - C = 0' 0.01 0.9
'A - D = 0' 0.001 1.5
'B - C = 0' 0.20 0.5
'B - D = 0' 0.01 1.1
'C - D = 0' 0.20 0.5
")
library(rcompanion)
cldList(p.value ~ Comparison, data=Data, threshold=0.05)
### Group Letter MonoLetter
### 1 A a a
### 2 B ab ab
### 3 C bc bc
### 4 D c c
###
### Groups sharing a letter are not significantly different (alpha = 0.05).
This can be a compact way to present the results of many comparisons, and these letters are useful to add to plots. However, there is a movement away from presenting results in this way, because it treats the alpha level as a magic cutoff, whereas presenting the p values themselves gives the reader more information. For example, the essential R package emmeans no longer supports compact letter displays.
Of course, in this discussion, one shouldn't put too much weight on the p values. One could perhaps use an effect size statistic (like Cohen's d) to do a similar procedure.
Here, let's say we are considering two groups to be relatively similar if Cohen's d isn't at least 1.0. We can create a flag for this, and run a similar procedure.
Data$Flag = as.numeric(Data$cohen.d < 1.0)
cldList(Flag ~ Comparison, data=Data, threshold=0)
### Group Letter MonoLetter
### 1 A a a
### 2 B a a
### 3 C ab ab
### 4 D b b
###
### Groups sharing a letter have Cohen's *d* < 1.0
|
ANOVA: life after rejecting the null hypothesis
I'll try to answer one piece of the question. There is an established protocol for distinguishing similar groups from dissimilar groups which results in a compact letter display. A series of pairwis
|
43,349
|
ANOVA: life after rejecting the null hypothesis
|
The approaches that I have used to deal with this problem:
Pairwise comparisons There is much literature devoted to the statistical issues involved in post_hoc pairwise testing. In practical terms however pairwise testing itself does not give any answers: you still need some kind of clustering algorithm and post-post-hoc analysis to get sensible results.
Robust regression Robust regression with M-estimators (e.g., Huber or Tukey) works quite well; e.g., in order to determine the common mean. However, it is difficult to judge the errors and the quality of the estimates.
Expectation maximization EM is complimentary to robust regression: it is easy to interpret, but it requires defining a parametric model for the data and the outliers.
|
ANOVA: life after rejecting the null hypothesis
|
The approaches that I have used to deal with this problem:
Pairwise comparisons There is much literature devoted to the statistical issues involved in post_hoc pairwise testing. In practical terms ho
|
ANOVA: life after rejecting the null hypothesis
The approaches that I have used to deal with this problem:
Pairwise comparisons There is much literature devoted to the statistical issues involved in post_hoc pairwise testing. In practical terms however pairwise testing itself does not give any answers: you still need some kind of clustering algorithm and post-post-hoc analysis to get sensible results.
Robust regression Robust regression with M-estimators (e.g., Huber or Tukey) works quite well; e.g., in order to determine the common mean. However, it is difficult to judge the errors and the quality of the estimates.
Expectation maximization EM is complimentary to robust regression: it is easy to interpret, but it requires defining a parametric model for the data and the outliers.
|
ANOVA: life after rejecting the null hypothesis
The approaches that I have used to deal with this problem:
Pairwise comparisons There is much literature devoted to the statistical issues involved in post_hoc pairwise testing. In practical terms ho
|
43,350
|
LASSO with poorly conditioned predictors
|
When you say you're solving $Ay = b$, you're automatically placing yourself into a normal OLS regression problem. Lasso simply does not belong to that kind of problem, which is why "the matrix being ill conditioned" has little meaning.
By solving a normal OLS, you're finding $b$ that minimizes $RSS(b)=\sum(y_i - b_0 - \sum_jx_{ij}b_j)^2.$ You rewrite this as:
$RSS(b) = (y-Xb)^T(y-Xb)$ which has solution
$b = (X^TX)^{-1}X^Ty = Ay$
which is the linear programming problem you mentioned, where the matrix $A$ is ill conditioned.
When you switch to lasso, the problem becomes:
$RSS(b) = (y-Xb)^T(y-Xb) + \lambda b$
This would end up being:
$b = (X^TX)(2X^Ty + \lambda)$
which simply CANT be written in a $Ay = b$ form, so it's impossible to see how the original matrix $A$ affects the problem.
The fact that $(X^TX)^{-1}X^T$ is ill conditioned has no impact on the LASSO problem, as it simply solves a different problem which is quadratic! (and matrix ill conditioning is only defined for linear systems)
|
LASSO with poorly conditioned predictors
|
When you say you're solving $Ay = b$, you're automatically placing yourself into a normal OLS regression problem. Lasso simply does not belong to that kind of problem, which is why "the matrix being i
|
LASSO with poorly conditioned predictors
When you say you're solving $Ay = b$, you're automatically placing yourself into a normal OLS regression problem. Lasso simply does not belong to that kind of problem, which is why "the matrix being ill conditioned" has little meaning.
By solving a normal OLS, you're finding $b$ that minimizes $RSS(b)=\sum(y_i - b_0 - \sum_jx_{ij}b_j)^2.$ You rewrite this as:
$RSS(b) = (y-Xb)^T(y-Xb)$ which has solution
$b = (X^TX)^{-1}X^Ty = Ay$
which is the linear programming problem you mentioned, where the matrix $A$ is ill conditioned.
When you switch to lasso, the problem becomes:
$RSS(b) = (y-Xb)^T(y-Xb) + \lambda b$
This would end up being:
$b = (X^TX)(2X^Ty + \lambda)$
which simply CANT be written in a $Ay = b$ form, so it's impossible to see how the original matrix $A$ affects the problem.
The fact that $(X^TX)^{-1}X^T$ is ill conditioned has no impact on the LASSO problem, as it simply solves a different problem which is quadratic! (and matrix ill conditioning is only defined for linear systems)
|
LASSO with poorly conditioned predictors
When you say you're solving $Ay = b$, you're automatically placing yourself into a normal OLS regression problem. Lasso simply does not belong to that kind of problem, which is why "the matrix being i
|
43,351
|
If linear combination of two time series processes is non-stationary does it mean one of the two series is non-stationary
|
Here's a simple counterexample (for discrete time). Let $X_t$ and $Z_t$ be iid standard Normal sequences. Let $\alpha_t$ be a sequence of numbers in $(-1,1)$. Define $Y_t=\alpha_t X_t+\beta_t Z_t$. Now
$Y_t$ is independent for different times.
The variance of $Y_t$ is $\alpha_t^2+\beta_t^2$ so given any $\alpha_t$ with $|\alpha_t|<1$ we can (and do) choose $\beta_t$ to make $Y_t$ standard Normal
therefore $Y_t$ is weakly stationary: its distributions are all standard Normal
But $\mathrm{cov}[X_t,Y_t]= \alpha_t$
Now consider the linear combination $Y_t-\alpha X_t=\beta_t Z_t$. This series is not weakly stationary because $\beta_t$ changes over time. The variance at time $t$ is $\beta_t^2$, which is not constant.
The condition you'd need for weak stationarity of linear combinations is that the pair $(X_t, Y_t)$ were individually weak-stationary and that their covariance was constant over time. You could say they were "jointly weak stationary", though I don't know whether this is standard terminology.
Two final notes: first, $X_t$ and $Y_t$ in this example are strongly stationary as well as weakly stationary. Second, $X_t$ and $Y_t$ are each uncorrelated over time, but that would be easy to change.
|
If linear combination of two time series processes is non-stationary does it mean one of the two ser
|
Here's a simple counterexample (for discrete time). Let $X_t$ and $Z_t$ be iid standard Normal sequences. Let $\alpha_t$ be a sequence of numbers in $(-1,1)$. Define $Y_t=\alpha_t X_t+\beta_t Z_t$.
|
If linear combination of two time series processes is non-stationary does it mean one of the two series is non-stationary
Here's a simple counterexample (for discrete time). Let $X_t$ and $Z_t$ be iid standard Normal sequences. Let $\alpha_t$ be a sequence of numbers in $(-1,1)$. Define $Y_t=\alpha_t X_t+\beta_t Z_t$. Now
$Y_t$ is independent for different times.
The variance of $Y_t$ is $\alpha_t^2+\beta_t^2$ so given any $\alpha_t$ with $|\alpha_t|<1$ we can (and do) choose $\beta_t$ to make $Y_t$ standard Normal
therefore $Y_t$ is weakly stationary: its distributions are all standard Normal
But $\mathrm{cov}[X_t,Y_t]= \alpha_t$
Now consider the linear combination $Y_t-\alpha X_t=\beta_t Z_t$. This series is not weakly stationary because $\beta_t$ changes over time. The variance at time $t$ is $\beta_t^2$, which is not constant.
The condition you'd need for weak stationarity of linear combinations is that the pair $(X_t, Y_t)$ were individually weak-stationary and that their covariance was constant over time. You could say they were "jointly weak stationary", though I don't know whether this is standard terminology.
Two final notes: first, $X_t$ and $Y_t$ in this example are strongly stationary as well as weakly stationary. Second, $X_t$ and $Y_t$ are each uncorrelated over time, but that would be easy to change.
|
If linear combination of two time series processes is non-stationary does it mean one of the two ser
Here's a simple counterexample (for discrete time). Let $X_t$ and $Z_t$ be iid standard Normal sequences. Let $\alpha_t$ be a sequence of numbers in $(-1,1)$. Define $Y_t=\alpha_t X_t+\beta_t Z_t$.
|
43,352
|
If linear combination of two time series processes is non-stationary does it mean one of the two series is non-stationary
|
Let $$Z_t=aX_t+bY_t$$
Given that $Z_t$ is is NOT stationary, but $X_t$ and $Y_t$ are stationary.
So, we can say that $\exists \,\ s \neq t$ such that $$E(Z_t)\neq E(Z_s)$$
$$\implies aE(X_t) + bE(Y_t) \neq aE(X_s) + bE(Y_s)$$
However, $E(X_t)= E(X_s)$ and $E(Y_t)= E(Y_s)$, $\forall \,\, t,s$
So there is a contradiction.
EDIT: Apologies for childish answer above. Another attempt. Let me try using logic statements.
Statement $A$: $Z_t$ is non-stationary.
Statement $B$: At least one of $X_t$ and $Y_t$ is non-stationary.
Let's assume that what you say is correct, i.e.,
$$A \implies B $$
So, $$!B \implies !A $$
This would mean that each of $X_t$ and $Y_t$ being stationary (statement !B) would imply stationarity of linear combination of $X_t$ and $Y_t$. We know this to be not always true. So $A \implies B $ is also not true.
|
If linear combination of two time series processes is non-stationary does it mean one of the two ser
|
Let $$Z_t=aX_t+bY_t$$
Given that $Z_t$ is is NOT stationary, but $X_t$ and $Y_t$ are stationary.
So, we can say that $\exists \,\ s \neq t$ such that $$E(Z_t)\neq E(Z_s)$$
$$\implies aE(X_t) + bE(Y_t)
|
If linear combination of two time series processes is non-stationary does it mean one of the two series is non-stationary
Let $$Z_t=aX_t+bY_t$$
Given that $Z_t$ is is NOT stationary, but $X_t$ and $Y_t$ are stationary.
So, we can say that $\exists \,\ s \neq t$ such that $$E(Z_t)\neq E(Z_s)$$
$$\implies aE(X_t) + bE(Y_t) \neq aE(X_s) + bE(Y_s)$$
However, $E(X_t)= E(X_s)$ and $E(Y_t)= E(Y_s)$, $\forall \,\, t,s$
So there is a contradiction.
EDIT: Apologies for childish answer above. Another attempt. Let me try using logic statements.
Statement $A$: $Z_t$ is non-stationary.
Statement $B$: At least one of $X_t$ and $Y_t$ is non-stationary.
Let's assume that what you say is correct, i.e.,
$$A \implies B $$
So, $$!B \implies !A $$
This would mean that each of $X_t$ and $Y_t$ being stationary (statement !B) would imply stationarity of linear combination of $X_t$ and $Y_t$. We know this to be not always true. So $A \implies B $ is also not true.
|
If linear combination of two time series processes is non-stationary does it mean one of the two ser
Let $$Z_t=aX_t+bY_t$$
Given that $Z_t$ is is NOT stationary, but $X_t$ and $Y_t$ are stationary.
So, we can say that $\exists \,\ s \neq t$ such that $$E(Z_t)\neq E(Z_s)$$
$$\implies aE(X_t) + bE(Y_t)
|
43,353
|
How is TD(1) of TD(lambda) equivalent to Monte Carlo?
|
The last equation in your description is valid as long as it's episodic. It's not necessary to ask for it from the first equation. So if you directly write it with the natural meaning, then it's OK if lambda is 1.
By "natural meaning": the lambda return of TD(lambda) is the weighted average of future returns in each step. Then, facing an episodic case, it's "natural" to write in that way, and not necessary to derive it from other case (continuing case).
|
How is TD(1) of TD(lambda) equivalent to Monte Carlo?
|
The last equation in your description is valid as long as it's episodic. It's not necessary to ask for it from the first equation. So if you directly write it with the natural meaning, then it's OK if
|
How is TD(1) of TD(lambda) equivalent to Monte Carlo?
The last equation in your description is valid as long as it's episodic. It's not necessary to ask for it from the first equation. So if you directly write it with the natural meaning, then it's OK if lambda is 1.
By "natural meaning": the lambda return of TD(lambda) is the weighted average of future returns in each step. Then, facing an episodic case, it's "natural" to write in that way, and not necessary to derive it from other case (continuing case).
|
How is TD(1) of TD(lambda) equivalent to Monte Carlo?
The last equation in your description is valid as long as it's episodic. It's not necessary to ask for it from the first equation. So if you directly write it with the natural meaning, then it's OK if
|
43,354
|
Bounds on $P(Y, X)$ with $P(Y)$ and $P(X)$ known, as well as $X \geq Y$
|
Update: A sharp lower bound is given in Corollary 2.4 in Nutz, Marcel, and Ruodu Wang. "The Directional Optimal Transport." arXiv preprint arXiv:2002.08717 (2020).
A bound exploiting the inequality constraint is given by
Smith, Woollcott. "Inequalities for bivariate distribution with x ≤ y
and marginals given." Communications in Statistics-Theory and Methods
12.12 (1983): 1371-1379.
It proceeds by bounding the CDF $P(X \leq x, Y \leq y) = H(x, y)$. The uppper bound is given by
$$min(P(X \leq x), P(Y \leq y)).$$
This is the standard Frechet-Hoeffding bound. This bound is sharp under the available information and the restriction $P(X \geq Y) = 1$.
A lower bound is
$$P(X \leq x) - max(0, min(P(Y \leq y) - P(Y \leq x), P(X \leq y) - P(X \leq x))).$$
According to the paper, this bound may "define a probability density function with negative densities".
I do not know how to get at "nice" representations of the resulting bounds on $E[XY]$. Without the inequality constraint, sharp bounds on this expectations, using the quantile functions $Q_X$ and $Q_Y$ of the variables, are
$$E[XY]_U = \int_0^1 Q_X(u)Q_Y(u)du$$
and
$$E[XY]_L = \int_0^1 Q_X(u)Q_Y(1 - u)du,$$
see Aronow, Peter M., Donald P. Green, and Donald KK Lee. "Sharp bounds on the variance in randomized experiments." The Annals of Statistics 42.3 (2014): 850-871.
The upper bound $E[XY]_U$ is sharp if $P(X \geq Y) = 1$, but the lower bound could be improved upon. This lower bound is givne in the Nutz/Wang paper.
|
Bounds on $P(Y, X)$ with $P(Y)$ and $P(X)$ known, as well as $X \geq Y$
|
Update: A sharp lower bound is given in Corollary 2.4 in Nutz, Marcel, and Ruodu Wang. "The Directional Optimal Transport." arXiv preprint arXiv:2002.08717 (2020).
A bound exploiting the inequality co
|
Bounds on $P(Y, X)$ with $P(Y)$ and $P(X)$ known, as well as $X \geq Y$
Update: A sharp lower bound is given in Corollary 2.4 in Nutz, Marcel, and Ruodu Wang. "The Directional Optimal Transport." arXiv preprint arXiv:2002.08717 (2020).
A bound exploiting the inequality constraint is given by
Smith, Woollcott. "Inequalities for bivariate distribution with x ≤ y
and marginals given." Communications in Statistics-Theory and Methods
12.12 (1983): 1371-1379.
It proceeds by bounding the CDF $P(X \leq x, Y \leq y) = H(x, y)$. The uppper bound is given by
$$min(P(X \leq x), P(Y \leq y)).$$
This is the standard Frechet-Hoeffding bound. This bound is sharp under the available information and the restriction $P(X \geq Y) = 1$.
A lower bound is
$$P(X \leq x) - max(0, min(P(Y \leq y) - P(Y \leq x), P(X \leq y) - P(X \leq x))).$$
According to the paper, this bound may "define a probability density function with negative densities".
I do not know how to get at "nice" representations of the resulting bounds on $E[XY]$. Without the inequality constraint, sharp bounds on this expectations, using the quantile functions $Q_X$ and $Q_Y$ of the variables, are
$$E[XY]_U = \int_0^1 Q_X(u)Q_Y(u)du$$
and
$$E[XY]_L = \int_0^1 Q_X(u)Q_Y(1 - u)du,$$
see Aronow, Peter M., Donald P. Green, and Donald KK Lee. "Sharp bounds on the variance in randomized experiments." The Annals of Statistics 42.3 (2014): 850-871.
The upper bound $E[XY]_U$ is sharp if $P(X \geq Y) = 1$, but the lower bound could be improved upon. This lower bound is givne in the Nutz/Wang paper.
|
Bounds on $P(Y, X)$ with $P(Y)$ and $P(X)$ known, as well as $X \geq Y$
Update: A sharp lower bound is given in Corollary 2.4 in Nutz, Marcel, and Ruodu Wang. "The Directional Optimal Transport." arXiv preprint arXiv:2002.08717 (2020).
A bound exploiting the inequality co
|
43,355
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
I don't know if $R^2_{\text{adj.}}$ have any optimal properties for model selection, but it is surely taught (or at least mentioned) in that context. One reason might be because most students have met $R^2$ early on, so there is then something to build on.
One example is the following exam paper from University of Oslo (see problem 1.) The text used in that course, Regression Methods
in Biostatistics
Linear, Logistic, Survival, and Repeated
Measures Models
Second edition by Eric Vittinghoff, David V. Glidden, Stephen C. Shiboski and Charles E. McCulloch mentions $R^2_{\text{adj.}}$ early on in their chapter 10 on variable selection (as penalizing less than AIC, for example) but neither it nor AIC is mentioned in their summary/recommendations 10.5.
So it is maybe mostly used didactically, as an introduction to the problems of model selection, and not because of any optimality properties.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
I don't know if $R^2_{\text{adj.}}$ have any optimal properties for model selection, but it is surely taught (or at least mentioned) in that context. One reason might be because most students have met
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
I don't know if $R^2_{\text{adj.}}$ have any optimal properties for model selection, but it is surely taught (or at least mentioned) in that context. One reason might be because most students have met $R^2$ early on, so there is then something to build on.
One example is the following exam paper from University of Oslo (see problem 1.) The text used in that course, Regression Methods
in Biostatistics
Linear, Logistic, Survival, and Repeated
Measures Models
Second edition by Eric Vittinghoff, David V. Glidden, Stephen C. Shiboski and Charles E. McCulloch mentions $R^2_{\text{adj.}}$ early on in their chapter 10 on variable selection (as penalizing less than AIC, for example) but neither it nor AIC is mentioned in their summary/recommendations 10.5.
So it is maybe mostly used didactically, as an introduction to the problems of model selection, and not because of any optimality properties.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
I don't know if $R^2_{\text{adj.}}$ have any optimal properties for model selection, but it is surely taught (or at least mentioned) in that context. One reason might be because most students have met
|
43,356
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
Answer for part1:
If you add more variables, even totally insignificant variable, R2 can only go up. this is not the case with adjusted R2.
You can try running multiple regression and then add random variable and see what happened to R2 and what happened to the adjusted R2.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
Answer for part1:
If you add more variables, even totally insignificant variable, R2 can only go up. this is not the case with adjusted R2.
You can try running multiple regression and then add random
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
Answer for part1:
If you add more variables, even totally insignificant variable, R2 can only go up. this is not the case with adjusted R2.
You can try running multiple regression and then add random variable and see what happened to R2 and what happened to the adjusted R2.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
Answer for part1:
If you add more variables, even totally insignificant variable, R2 can only go up. this is not the case with adjusted R2.
You can try running multiple regression and then add random
|
43,357
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
I would propose six optimality properties.
Overfit Mitigation
Simplicity and Parsimony
General Shared Understanding
Semi-Efficient Factor Identification
Robustness to Sample Size Change
Explanatory Utility
Overfit Mitigation
What kind of model is overfit? In part, this depends on the model's use case. Suppose we are using a model to test whether a hypothesized factor-level relationship exists. In that case a model which tends to allow spurious relations is overfit.
"The use of an adjusted R2...is an attempt to account for the phenomenon of the R2 automatically and spuriously increasing when extra explanatory variables are added to the model." Wikipedia.
Simplicity and Parsimony
Parsimony is valued on normative and economic rationale. Occam's Razor is an example of a norm, and depending on what we mean by "justification," it might pass or fail.
The economic rationale for simplicity and parsimony are harder to dismiss:
Complex models with many factors are expensive to gather data for.
Complex models can be more expensive to execute.
Complex models are hard to communicate and think through. Business and legal risks can result from this, as well as plain time spent communicating from one person to another.
Given two models with equal explanatory power (R2), then, AR2 selects for the simpler and more parsimonious model.
General Shared Understanding
Justification involves shared understanding. Consider a peer-review situation. If the reviewer and the reviewed lack a shared understanding of model selection, questions or rejections may occur.
R2 is an elementary statistical concept and those only familiar with elementary statistics still generally understand that R2 is gameable and AR2 is preferred to R2 for the above reasons.
Sure, there may be better choices compared to AR2 such as AIC and BIC, but if the reviewer is unfamiliar with these then their use may not succeed as a justification. What's worse, the reviewer may have a misunderstanding themselves and required AIC or BIC when they aren't required - that itself is unjustified.
My limited understanding indicates that AIC is now considered rather arbitrary by many - specifically the 2s in the formula. WAIC, DIC, and LOO-CV have been suggested as preferred, see here.
I hope by "justified" we don't mean "no better parameter exists" because it seems to me that some better parameter might always exist unbeknownst to us, therefore this style of justification always fails. Instead "justified" ought to mean "satisfies the requirement at hand" in my view.
Semi-Efficient Factor Identification
Caveat: I made up this term and I could be using it wrong :)
Basically, if we are interested in identifying true factor relations, we should expect p < 0.5, ie P(B) > P'(B). AR2 maximization satisfies this as adding a factor with p >= 0.5 will reduce AR2. Now this isn't an exact match because I think AR2 generally penalizes p > 0.35-ish.
It's true AIC penalizes more in general but I'm not sure that's a good thing if the goal is to identify all observed features that have an identifiable relation, say at least directionally, in a given data set.
Robustness to Sample Size Change
In the comments of this post, Scortchi - Reinstate Monica notes that it "makes no sense to compare likelihoods (or therefore AICs) of models fitted on different nos observations." In contrast, r-squared and adjusted r-squared are absolute measures that can be compared with a change in the number of samples.
This might be useful in the case of a questionnaire that includes some optional questions and partial responses. It's of course important to be mindful of issues like response bias in such cases.
Explanatory Utility
Here, we are told that "R2 and AIC are answering two different questions...R2 is saying something to the effect of how well your model explains the observed data...AIC, on the other hand, is trying to explain how well the model will predict on new data."
So if the use case is non-predictive, such as in the case of theory-driven, factor-level hypothesis testing, AIC may be considered inappropriate.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
|
I would propose six optimality properties.
Overfit Mitigation
Simplicity and Parsimony
General Shared Understanding
Semi-Efficient Factor Identification
Robustness to Sample Size Change
Explanatory U
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
I would propose six optimality properties.
Overfit Mitigation
Simplicity and Parsimony
General Shared Understanding
Semi-Efficient Factor Identification
Robustness to Sample Size Change
Explanatory Utility
Overfit Mitigation
What kind of model is overfit? In part, this depends on the model's use case. Suppose we are using a model to test whether a hypothesized factor-level relationship exists. In that case a model which tends to allow spurious relations is overfit.
"The use of an adjusted R2...is an attempt to account for the phenomenon of the R2 automatically and spuriously increasing when extra explanatory variables are added to the model." Wikipedia.
Simplicity and Parsimony
Parsimony is valued on normative and economic rationale. Occam's Razor is an example of a norm, and depending on what we mean by "justification," it might pass or fail.
The economic rationale for simplicity and parsimony are harder to dismiss:
Complex models with many factors are expensive to gather data for.
Complex models can be more expensive to execute.
Complex models are hard to communicate and think through. Business and legal risks can result from this, as well as plain time spent communicating from one person to another.
Given two models with equal explanatory power (R2), then, AR2 selects for the simpler and more parsimonious model.
General Shared Understanding
Justification involves shared understanding. Consider a peer-review situation. If the reviewer and the reviewed lack a shared understanding of model selection, questions or rejections may occur.
R2 is an elementary statistical concept and those only familiar with elementary statistics still generally understand that R2 is gameable and AR2 is preferred to R2 for the above reasons.
Sure, there may be better choices compared to AR2 such as AIC and BIC, but if the reviewer is unfamiliar with these then their use may not succeed as a justification. What's worse, the reviewer may have a misunderstanding themselves and required AIC or BIC when they aren't required - that itself is unjustified.
My limited understanding indicates that AIC is now considered rather arbitrary by many - specifically the 2s in the formula. WAIC, DIC, and LOO-CV have been suggested as preferred, see here.
I hope by "justified" we don't mean "no better parameter exists" because it seems to me that some better parameter might always exist unbeknownst to us, therefore this style of justification always fails. Instead "justified" ought to mean "satisfies the requirement at hand" in my view.
Semi-Efficient Factor Identification
Caveat: I made up this term and I could be using it wrong :)
Basically, if we are interested in identifying true factor relations, we should expect p < 0.5, ie P(B) > P'(B). AR2 maximization satisfies this as adding a factor with p >= 0.5 will reduce AR2. Now this isn't an exact match because I think AR2 generally penalizes p > 0.35-ish.
It's true AIC penalizes more in general but I'm not sure that's a good thing if the goal is to identify all observed features that have an identifiable relation, say at least directionally, in a given data set.
Robustness to Sample Size Change
In the comments of this post, Scortchi - Reinstate Monica notes that it "makes no sense to compare likelihoods (or therefore AICs) of models fitted on different nos observations." In contrast, r-squared and adjusted r-squared are absolute measures that can be compared with a change in the number of samples.
This might be useful in the case of a questionnaire that includes some optional questions and partial responses. It's of course important to be mindful of issues like response bias in such cases.
Explanatory Utility
Here, we are told that "R2 and AIC are answering two different questions...R2 is saying something to the effect of how well your model explains the observed data...AIC, on the other hand, is trying to explain how well the model will predict on new data."
So if the use case is non-predictive, such as in the case of theory-driven, factor-level hypothesis testing, AIC may be considered inappropriate.
|
Justification for and optimality of $R^2_{adj.}$ as a model selection criterion
I would propose six optimality properties.
Overfit Mitigation
Simplicity and Parsimony
General Shared Understanding
Semi-Efficient Factor Identification
Robustness to Sample Size Change
Explanatory U
|
43,358
|
distribution for scaled Maximum of n independent Weibulls for $n \to \infty$
|
The determination of the domain of attraction and of the related
constants $a_n$ and $b_n$ uses several functions related to the survival
function, here given by $S(x) = \exp\{-(\lambda x)^k\}$ for $x > 0$.
Of major importance are the tail-quantile function $U(t)$ and the
hazard rate function $h(x)$.
The tail-quantile is obtained by solving $S(U) = 1/t$ for $U$, which
leads to $U(t) = \lambda^{-1} (\log t)^{1/k}$ for $t> 1$. The hazard
rate is $h(x) = -\text{d}\log S(x)/\text{d}x = \lambda^k \, k
\,x^{k-1}$ for $x>0$. The derivative of the inverse hazard rate
$1/h(x)$ is proportional to $x^{-k}$, hence tends to zero for large
$x$ since $k>0$. So the Von Mises' condition holds. We know that
the distribution is in the Gumbel domain of attraction and that we
have the following convergence in distribution to the standard Gumbel
\begin{equation}
\frac{M_n - U(n)}{a_n} \to \text{Gumbel}.
\end{equation}
Moreover we know that we can choose $a_n$ as $e(U(n))$ where $e(x)$
denotes the mean residual life function given by $e(x) := A(x) /
S(x)$ with $A(x) := \int_{x}^\infty S(t) \,\text{d}t$ for $x >0$.
We now proceed to the evaluation of $e(U(n))$ or to the
determination of a quantity which is equivalent to it for large
$n$. Using the change of variable $u := (\lambda t)^k$ we get
$$
A(x) = \int_{x}^\infty \exp\{-(\lambda t)^k\}\,\text{d}t= \frac{1}{\lambda k}
\int_{(\lambda x)^k}^{\infty} u^{1/k -1} e^{-u} \text{d}u
= (\lambda k)^{-1} \, \Gamma(s,\, v),
$$
where $\Gamma(s,\,v)$ stands for the incomplete gamma
function
evaluated at $s:= 1/k$ and $v := (\lambda x)^k$. We can use the
following known result about the incomplete gamma $\Gamma(s,\, v) \sim
v^{s-1} e^{-v}$ for $v \to \infty$ which can be shown using
integration by parts. So
$$
e(x) \sim
\frac{(\lambda k)^{-1}\, \left\{ (\lambda x)^k \right\}^{1/k - 1}
\exp\{- (\lambda x)^k \}}{S(x)} = \frac{x}{k} \, (\lambda x)^{-k}.
$$
Note that $h(x) \times e(x)$ tends to $1$ for large $x$, which is
clear from the last equivalence; this limit condition is both
necessary an sufficient for the attraction to the Gumbel when $h(x)$
is monotonic for large $x$, as is the case here - see Theorem 1 in
Galambos and
Obretenov.
We can choose $a_n$ as $1 / h(U(n))$, and our constants can
be
$$
a_n = \dfrac{1}{\lambda k} \, (\log n)^{1/k -1}, \qquad
b_n = \dfrac{1}{\lambda} \, (\log n )^{1/k}.
$$
A precise statement of Von Mises' condition is found in the classical
book Modelling Extremal Events by Embrechts
P., Klüppelberg C. and Mikosch T. In this book (up to change in
notations), the couple of constants is given in Table 3.4.4.
## Weibull parameters
k <- 2.5; lambda <- 10
## simulate
set.seed(123)
n <- 40; nsim <- 10000
X <- array(rweibull(n * nsim, shape = k, scale = 1/ lambda), dim = c(nsim, n))
M <- apply(X, 1, max)
bn <- log(n)^(1 / k) / lambda
an <- log(n)^(1 / k - 1) / lambda / k
Mscale <- scale(M, center = bn, scale = an)
hist(Mscale, breaks = 100, probability = TRUE, col = "lightyellow",
main = sprintf("Simulated maxima for n = %d", n), xlab = "")
require(evd)
curve(dgumbel, add = TRUE, col = "orangered", lwd = 2)
|
distribution for scaled Maximum of n independent Weibulls for $n \to \infty$
|
The determination of the domain of attraction and of the related
constants $a_n$ and $b_n$ uses several functions related to the survival
function, here given by $S(x) = \exp\{-(\lambda x)^k\}$ for $x
|
distribution for scaled Maximum of n independent Weibulls for $n \to \infty$
The determination of the domain of attraction and of the related
constants $a_n$ and $b_n$ uses several functions related to the survival
function, here given by $S(x) = \exp\{-(\lambda x)^k\}$ for $x > 0$.
Of major importance are the tail-quantile function $U(t)$ and the
hazard rate function $h(x)$.
The tail-quantile is obtained by solving $S(U) = 1/t$ for $U$, which
leads to $U(t) = \lambda^{-1} (\log t)^{1/k}$ for $t> 1$. The hazard
rate is $h(x) = -\text{d}\log S(x)/\text{d}x = \lambda^k \, k
\,x^{k-1}$ for $x>0$. The derivative of the inverse hazard rate
$1/h(x)$ is proportional to $x^{-k}$, hence tends to zero for large
$x$ since $k>0$. So the Von Mises' condition holds. We know that
the distribution is in the Gumbel domain of attraction and that we
have the following convergence in distribution to the standard Gumbel
\begin{equation}
\frac{M_n - U(n)}{a_n} \to \text{Gumbel}.
\end{equation}
Moreover we know that we can choose $a_n$ as $e(U(n))$ where $e(x)$
denotes the mean residual life function given by $e(x) := A(x) /
S(x)$ with $A(x) := \int_{x}^\infty S(t) \,\text{d}t$ for $x >0$.
We now proceed to the evaluation of $e(U(n))$ or to the
determination of a quantity which is equivalent to it for large
$n$. Using the change of variable $u := (\lambda t)^k$ we get
$$
A(x) = \int_{x}^\infty \exp\{-(\lambda t)^k\}\,\text{d}t= \frac{1}{\lambda k}
\int_{(\lambda x)^k}^{\infty} u^{1/k -1} e^{-u} \text{d}u
= (\lambda k)^{-1} \, \Gamma(s,\, v),
$$
where $\Gamma(s,\,v)$ stands for the incomplete gamma
function
evaluated at $s:= 1/k$ and $v := (\lambda x)^k$. We can use the
following known result about the incomplete gamma $\Gamma(s,\, v) \sim
v^{s-1} e^{-v}$ for $v \to \infty$ which can be shown using
integration by parts. So
$$
e(x) \sim
\frac{(\lambda k)^{-1}\, \left\{ (\lambda x)^k \right\}^{1/k - 1}
\exp\{- (\lambda x)^k \}}{S(x)} = \frac{x}{k} \, (\lambda x)^{-k}.
$$
Note that $h(x) \times e(x)$ tends to $1$ for large $x$, which is
clear from the last equivalence; this limit condition is both
necessary an sufficient for the attraction to the Gumbel when $h(x)$
is monotonic for large $x$, as is the case here - see Theorem 1 in
Galambos and
Obretenov.
We can choose $a_n$ as $1 / h(U(n))$, and our constants can
be
$$
a_n = \dfrac{1}{\lambda k} \, (\log n)^{1/k -1}, \qquad
b_n = \dfrac{1}{\lambda} \, (\log n )^{1/k}.
$$
A precise statement of Von Mises' condition is found in the classical
book Modelling Extremal Events by Embrechts
P., Klüppelberg C. and Mikosch T. In this book (up to change in
notations), the couple of constants is given in Table 3.4.4.
## Weibull parameters
k <- 2.5; lambda <- 10
## simulate
set.seed(123)
n <- 40; nsim <- 10000
X <- array(rweibull(n * nsim, shape = k, scale = 1/ lambda), dim = c(nsim, n))
M <- apply(X, 1, max)
bn <- log(n)^(1 / k) / lambda
an <- log(n)^(1 / k - 1) / lambda / k
Mscale <- scale(M, center = bn, scale = an)
hist(Mscale, breaks = 100, probability = TRUE, col = "lightyellow",
main = sprintf("Simulated maxima for n = %d", n), xlab = "")
require(evd)
curve(dgumbel, add = TRUE, col = "orangered", lwd = 2)
|
distribution for scaled Maximum of n independent Weibulls for $n \to \infty$
The determination of the domain of attraction and of the related
constants $a_n$ and $b_n$ uses several functions related to the survival
function, here given by $S(x) = \exp\{-(\lambda x)^k\}$ for $x
|
43,359
|
"Return values" of univariate logistic regression
|
Recall that logistic regression is a model that predicts the odds
$$
\frac{p(x)}{1 - p(x)} = e^{\beta_0 + \beta_1 x}
$$
Now look at the Preposition 1 in the paper (p 5062)
$$
LR_\text{logistic}(\ln \tfrac{s}{1-s};a,c) = \exp[ a\ln\tfrac{s}{1-s}+c ]
$$
It seems like Algorithm 1 (p 5063) is a "univariate logistic regression" with $y_\text{train}$ being the dependent variable, $s'=\tfrac{s_\text{train}}{1-s_\text{train}}$ being the independent variable, $a$ being the slope and $c$ intercept. In Algorithm 2, it is a "bivariate" model with $s'=\ln s_\text{train}$ and $s''=-\ln (1-s_\text{train})$ as features and $a,b$ as parameters.
|
"Return values" of univariate logistic regression
|
Recall that logistic regression is a model that predicts the odds
$$
\frac{p(x)}{1 - p(x)} = e^{\beta_0 + \beta_1 x}
$$
Now look at the Preposition 1 in the paper (p 5062)
$$
LR_\text{logistic}(\ln \t
|
"Return values" of univariate logistic regression
Recall that logistic regression is a model that predicts the odds
$$
\frac{p(x)}{1 - p(x)} = e^{\beta_0 + \beta_1 x}
$$
Now look at the Preposition 1 in the paper (p 5062)
$$
LR_\text{logistic}(\ln \tfrac{s}{1-s};a,c) = \exp[ a\ln\tfrac{s}{1-s}+c ]
$$
It seems like Algorithm 1 (p 5063) is a "univariate logistic regression" with $y_\text{train}$ being the dependent variable, $s'=\tfrac{s_\text{train}}{1-s_\text{train}}$ being the independent variable, $a$ being the slope and $c$ intercept. In Algorithm 2, it is a "bivariate" model with $s'=\ln s_\text{train}$ and $s''=-\ln (1-s_\text{train})$ as features and $a,b$ as parameters.
|
"Return values" of univariate logistic regression
Recall that logistic regression is a model that predicts the odds
$$
\frac{p(x)}{1 - p(x)} = e^{\beta_0 + \beta_1 x}
$$
Now look at the Preposition 1 in the paper (p 5062)
$$
LR_\text{logistic}(\ln \t
|
43,360
|
Does having the same order statistics imply the same distribution?
|
The distribution of $(Y_1,\ldots,Y_n)$ is identified by the joint distribution of the order statistic $(Y_{(1)},\ldots,Y_{(n)})$ and of the rank statistic $(\sigma_1,\ldots,\sigma_n)$. In the case of an independent sample, the later distribution is uniform over the set of all possible permutations. But it could be any other distribution over thee set of all possible permutations.
Second, while the marginal distributions of the components of the order statistic of $Y$ are the same as the marginal distributions of the components of the order statistic of $X$, this does not imply that the joint distribution is the same.
|
Does having the same order statistics imply the same distribution?
|
The distribution of $(Y_1,\ldots,Y_n)$ is identified by the joint distribution of the order statistic $(Y_{(1)},\ldots,Y_{(n)})$ and of the rank statistic $(\sigma_1,\ldots,\sigma_n)$. In the case of
|
Does having the same order statistics imply the same distribution?
The distribution of $(Y_1,\ldots,Y_n)$ is identified by the joint distribution of the order statistic $(Y_{(1)},\ldots,Y_{(n)})$ and of the rank statistic $(\sigma_1,\ldots,\sigma_n)$. In the case of an independent sample, the later distribution is uniform over the set of all possible permutations. But it could be any other distribution over thee set of all possible permutations.
Second, while the marginal distributions of the components of the order statistic of $Y$ are the same as the marginal distributions of the components of the order statistic of $X$, this does not imply that the joint distribution is the same.
|
Does having the same order statistics imply the same distribution?
The distribution of $(Y_1,\ldots,Y_n)$ is identified by the joint distribution of the order statistic $(Y_{(1)},\ldots,Y_{(n)})$ and of the rank statistic $(\sigma_1,\ldots,\sigma_n)$. In the case of
|
43,361
|
Efficient Estimator from Insufficient Statistic
|
Since [under assumptions of its existence] a minimal sufficient statistic $S_n$ is a function of a sample $(X_1,\ldots,X_n)$,$$S_n=S_n(X_1,\ldots,X_n)$$
an efficient estimator $\hat{\theta}(S)$ can be written as$$\hat{\theta}(S(X_1,\ldots,X_n))$$which makes the question difficult to understand.
Note that the Cramèr-Rao lower bound is only achieved by an efficient estimator of the natural parameter in the setting of exponential families and also that there exist many cases where there is no uniformly minimum-variance unbiased estimator.
Note also that, outside exponential families, admissible estimators cannot be sufficient.
|
Efficient Estimator from Insufficient Statistic
|
Since [under assumptions of its existence] a minimal sufficient statistic $S_n$ is a function of a sample $(X_1,\ldots,X_n)$,$$S_n=S_n(X_1,\ldots,X_n)$$
an efficient estimator $\hat{\theta}(S)$ can be
|
Efficient Estimator from Insufficient Statistic
Since [under assumptions of its existence] a minimal sufficient statistic $S_n$ is a function of a sample $(X_1,\ldots,X_n)$,$$S_n=S_n(X_1,\ldots,X_n)$$
an efficient estimator $\hat{\theta}(S)$ can be written as$$\hat{\theta}(S(X_1,\ldots,X_n))$$which makes the question difficult to understand.
Note that the Cramèr-Rao lower bound is only achieved by an efficient estimator of the natural parameter in the setting of exponential families and also that there exist many cases where there is no uniformly minimum-variance unbiased estimator.
Note also that, outside exponential families, admissible estimators cannot be sufficient.
|
Efficient Estimator from Insufficient Statistic
Since [under assumptions of its existence] a minimal sufficient statistic $S_n$ is a function of a sample $(X_1,\ldots,X_n)$,$$S_n=S_n(X_1,\ldots,X_n)$$
an efficient estimator $\hat{\theta}(S)$ can be
|
43,362
|
Extreme Value Theory - domains of attraction and techniques for evaluting a limit
|
Preliminary interpretation: Your question does not clearly specify what you mean by $w(G)$, but you say that this is an "upper end point"of the distribution. I am going to assume that you mean that $t \uparrow w(G)$ implies $G(t) \uparrow 1$. My answer proceeds on this basis.
To simplify the notation in this problem we treat $\gamma$ as fixed and denote $G_x(t) \equiv G(t+x\gamma(t))$. We then define the functions:
$$E_x(t) \equiv \frac{1-G_x(t)}{1-G(t)} \quad \quad \quad \bar{E}_x(t) \equiv \frac{G_x(t)}{G(t)}.$$
These functions are related by:
$$\bar{E}_x(t) = \frac{1- E_x(t)(1-G(t))}{G(t)}.$$
By assumption, for all $x \in \mathbb{R}$ you have $\lim_{t \uparrow w(G)} E_x(t)= e^{-x}$. By the composition law of limits (and assuming the required continuity for it to apply) we also have:
$$\lim_{t \uparrow w(G)} \bar{E}_x(t) = \lim_{t \uparrow w(G)} \frac{1- e^{-x}(1-G(t))}{G(t)}.$$
We now define and simplify the function:
$$\begin{equation} \begin{aligned}
H(t,x)
&\equiv \frac{G_x(t)}{1-G_x(t)} - \frac{G(t)}{1-G(t)} \\[6pt]
&= \frac{1-G(t)}{1-G_x(t)} \cdot \frac{G_x(t)}{G(t)} \cdot \frac{G(t)}{1-G(t)} - \frac{G(t)}{1-G(t)} \\[6pt]
&= \frac{G(t)}{1-G(t)} \Bigg[ \frac{1-G(t)}{1-G_x(t)} \cdot \frac{G_x(t)}{G(t)} - 1 \Bigg] \\[6pt]
&= \frac{G(t)}{1-G(t)} \Bigg[ \frac{\bar{E}_x(t)}{E_x(t)} - 1 \Bigg]. \\[6pt]
\end{aligned} \end{equation}$$
Hence, applying the composition law again yields:
$$\begin{equation} \begin{aligned}
\lim_{t \uparrow w(G)} (1-G(t)) \cdot H(t,x)
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{\bar{E}_x(t)}{E_x(t)} - 1 \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{1- e^{-x}(1-G(t))}{e^{-x} G(t)} - 1 \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{1- e^{-x} + e^{-x} G(t) - e^{-x} G(t)}{e^{-x} G(t)} \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \cdot \frac{1- e^{-x}}{e^{-x} G(t)} \\[6pt]
&= \frac{1- e^{-x}}{e^{-x}} \\[6pt]
&= e^{x}-1. \\[6pt]
\end{aligned} \end{equation}$$
Now, the limit you want to find is $\lim_{t \uparrow w(G)} \exp(H(t,x))$. This limit is infinity, but there is a related limit that may be useful:
$$\begin{equation} \begin{aligned}
\lim_{t \uparrow w(G)} \exp(H(t,x))^{\exp(1-G(t))}
&= \lim_{t \uparrow w(G)} \exp( (1-G(t)) \cdot H(t,x)) \\[6pt]
&= \exp(e^x-1). \\[6pt]
\end{aligned} \end{equation}$$
|
Extreme Value Theory - domains of attraction and techniques for evaluting a limit
|
Preliminary interpretation: Your question does not clearly specify what you mean by $w(G)$, but you say that this is an "upper end point"of the distribution. I am going to assume that you mean that $
|
Extreme Value Theory - domains of attraction and techniques for evaluting a limit
Preliminary interpretation: Your question does not clearly specify what you mean by $w(G)$, but you say that this is an "upper end point"of the distribution. I am going to assume that you mean that $t \uparrow w(G)$ implies $G(t) \uparrow 1$. My answer proceeds on this basis.
To simplify the notation in this problem we treat $\gamma$ as fixed and denote $G_x(t) \equiv G(t+x\gamma(t))$. We then define the functions:
$$E_x(t) \equiv \frac{1-G_x(t)}{1-G(t)} \quad \quad \quad \bar{E}_x(t) \equiv \frac{G_x(t)}{G(t)}.$$
These functions are related by:
$$\bar{E}_x(t) = \frac{1- E_x(t)(1-G(t))}{G(t)}.$$
By assumption, for all $x \in \mathbb{R}$ you have $\lim_{t \uparrow w(G)} E_x(t)= e^{-x}$. By the composition law of limits (and assuming the required continuity for it to apply) we also have:
$$\lim_{t \uparrow w(G)} \bar{E}_x(t) = \lim_{t \uparrow w(G)} \frac{1- e^{-x}(1-G(t))}{G(t)}.$$
We now define and simplify the function:
$$\begin{equation} \begin{aligned}
H(t,x)
&\equiv \frac{G_x(t)}{1-G_x(t)} - \frac{G(t)}{1-G(t)} \\[6pt]
&= \frac{1-G(t)}{1-G_x(t)} \cdot \frac{G_x(t)}{G(t)} \cdot \frac{G(t)}{1-G(t)} - \frac{G(t)}{1-G(t)} \\[6pt]
&= \frac{G(t)}{1-G(t)} \Bigg[ \frac{1-G(t)}{1-G_x(t)} \cdot \frac{G_x(t)}{G(t)} - 1 \Bigg] \\[6pt]
&= \frac{G(t)}{1-G(t)} \Bigg[ \frac{\bar{E}_x(t)}{E_x(t)} - 1 \Bigg]. \\[6pt]
\end{aligned} \end{equation}$$
Hence, applying the composition law again yields:
$$\begin{equation} \begin{aligned}
\lim_{t \uparrow w(G)} (1-G(t)) \cdot H(t,x)
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{\bar{E}_x(t)}{E_x(t)} - 1 \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{1- e^{-x}(1-G(t))}{e^{-x} G(t)} - 1 \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \Bigg[ \frac{1- e^{-x} + e^{-x} G(t) - e^{-x} G(t)}{e^{-x} G(t)} \Bigg] \\[6pt]
&= \lim_{t \uparrow w(G)} G(t) \cdot \frac{1- e^{-x}}{e^{-x} G(t)} \\[6pt]
&= \frac{1- e^{-x}}{e^{-x}} \\[6pt]
&= e^{x}-1. \\[6pt]
\end{aligned} \end{equation}$$
Now, the limit you want to find is $\lim_{t \uparrow w(G)} \exp(H(t,x))$. This limit is infinity, but there is a related limit that may be useful:
$$\begin{equation} \begin{aligned}
\lim_{t \uparrow w(G)} \exp(H(t,x))^{\exp(1-G(t))}
&= \lim_{t \uparrow w(G)} \exp( (1-G(t)) \cdot H(t,x)) \\[6pt]
&= \exp(e^x-1). \\[6pt]
\end{aligned} \end{equation}$$
|
Extreme Value Theory - domains of attraction and techniques for evaluting a limit
Preliminary interpretation: Your question does not clearly specify what you mean by $w(G)$, but you say that this is an "upper end point"of the distribution. I am going to assume that you mean that $
|
43,363
|
In linear regression, data is highly skewed, transformation doesn't work..!
|
There are too many questions asked. You are welcome to break it down. And many of the questions are already answered well in this forum.
I will only address your first question here.
There's more variables, and most of them are heavily skewed. (mostly right or some left)
It is seems you may have some mis-understandings on linear regression assumptions. Linear regression does not assume independent variable / model input to be Gaussian distributed, but assume the residual.
Details can be found
Why is the normality of residuals "barely important at all" for the purpose of estimating the regression line?
Why linear regression has assumption on residual but generalized linear model has assumptions on response?
In the first link I provided, it also explains normality of residuals is not that important as you may think.
For feature selections see here
|
In linear regression, data is highly skewed, transformation doesn't work..!
|
There are too many questions asked. You are welcome to break it down. And many of the questions are already answered well in this forum.
I will only address your first question here.
There's more var
|
In linear regression, data is highly skewed, transformation doesn't work..!
There are too many questions asked. You are welcome to break it down. And many of the questions are already answered well in this forum.
I will only address your first question here.
There's more variables, and most of them are heavily skewed. (mostly right or some left)
It is seems you may have some mis-understandings on linear regression assumptions. Linear regression does not assume independent variable / model input to be Gaussian distributed, but assume the residual.
Details can be found
Why is the normality of residuals "barely important at all" for the purpose of estimating the regression line?
Why linear regression has assumption on residual but generalized linear model has assumptions on response?
In the first link I provided, it also explains normality of residuals is not that important as you may think.
For feature selections see here
|
In linear regression, data is highly skewed, transformation doesn't work..!
There are too many questions asked. You are welcome to break it down. And many of the questions are already answered well in this forum.
I will only address your first question here.
There's more var
|
43,364
|
Predictive Posterior Distribution of Normal Distribution with Unknown Mean and Variance
|
If
$$p(\mu,\tau|\mathbf{x})\propto \tau^{\frac{n}{2}+ξ_{0}-1}\exp(-\tauξ_{0})\exp\left\{-\frac{1}{2}\tau\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}\tag{1}$$
and (assuming $\tilde X\sim\mathcal N(\mu,\tau^{-1})$)
$$p(\tilde{x}|\mu,\tau)\propto \tau^{1/2}{\sqrt{2\pi}}\exp\{-\frac{1}{2}\tau(\tilde x-\mu)^2\}$$
then
$$p(\tilde{x}|\mu,\tau)p(\mu,\tau|\mathbf{x})\propto
\tau^{\frac{n-1}{2}+\xi_{0}}\exp\left\{-\tau\xi_{0}-\frac{\tau(\tilde x-\mu)^2}{2}-\frac{\tau}{2}\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{(\mu-\mu_{0})^2}{2\sigma_{0}^{2}}\right\}$$
Integrating out $\tau$ gives
$$p(\tilde{x}|\mu,\mathbf{x})\propto
\left\{2\xi_{0}+(\tilde x-\mu)^2+\sum_{i=1}^{n}(x_{i}-\mu)^2\right\}^{-\frac{n+1}{2}-\xi_{0}}\exp\left\{-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}$$
which has no closed form expression.
The issue stems from the choice of prior
$$\mu\sim\mathcal N(\mu_0,\sigma_0^{})$$
since this prior is not conjugate: as you can see from (1), the posterior on $\mu,\tau)$ is not of the same form as the prior since $\mu$ and $\tau$ become dependent. A conjugate prior should involve $\tau$ as for instance
$$\mu\sim\mathcal N(\mu_0,\omega\tau^{-1})$$
(as for instance detailed in our Bayesian essentials texbook, Chapter 2).
|
Predictive Posterior Distribution of Normal Distribution with Unknown Mean and Variance
|
If
$$p(\mu,\tau|\mathbf{x})\propto \tau^{\frac{n}{2}+ξ_{0}-1}\exp(-\tauξ_{0})\exp\left\{-\frac{1}{2}\tau\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}\tag{1}$$
and (assum
|
Predictive Posterior Distribution of Normal Distribution with Unknown Mean and Variance
If
$$p(\mu,\tau|\mathbf{x})\propto \tau^{\frac{n}{2}+ξ_{0}-1}\exp(-\tauξ_{0})\exp\left\{-\frac{1}{2}\tau\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}\tag{1}$$
and (assuming $\tilde X\sim\mathcal N(\mu,\tau^{-1})$)
$$p(\tilde{x}|\mu,\tau)\propto \tau^{1/2}{\sqrt{2\pi}}\exp\{-\frac{1}{2}\tau(\tilde x-\mu)^2\}$$
then
$$p(\tilde{x}|\mu,\tau)p(\mu,\tau|\mathbf{x})\propto
\tau^{\frac{n-1}{2}+\xi_{0}}\exp\left\{-\tau\xi_{0}-\frac{\tau(\tilde x-\mu)^2}{2}-\frac{\tau}{2}\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{(\mu-\mu_{0})^2}{2\sigma_{0}^{2}}\right\}$$
Integrating out $\tau$ gives
$$p(\tilde{x}|\mu,\mathbf{x})\propto
\left\{2\xi_{0}+(\tilde x-\mu)^2+\sum_{i=1}^{n}(x_{i}-\mu)^2\right\}^{-\frac{n+1}{2}-\xi_{0}}\exp\left\{-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}$$
which has no closed form expression.
The issue stems from the choice of prior
$$\mu\sim\mathcal N(\mu_0,\sigma_0^{})$$
since this prior is not conjugate: as you can see from (1), the posterior on $\mu,\tau)$ is not of the same form as the prior since $\mu$ and $\tau$ become dependent. A conjugate prior should involve $\tau$ as for instance
$$\mu\sim\mathcal N(\mu_0,\omega\tau^{-1})$$
(as for instance detailed in our Bayesian essentials texbook, Chapter 2).
|
Predictive Posterior Distribution of Normal Distribution with Unknown Mean and Variance
If
$$p(\mu,\tau|\mathbf{x})\propto \tau^{\frac{n}{2}+ξ_{0}-1}\exp(-\tauξ_{0})\exp\left\{-\frac{1}{2}\tau\sum_{i=1}^{n}(x_{i}-\mu)^2-\frac{1}{2\sigma_{0}^{2}}(\mu-\mu_{0})^2\right\}\tag{1}$$
and (assum
|
43,365
|
What is the difference between Silhouette Index vs Dunn Index vs Davies-Bouldin Index
|
Bolshakova and Azuaje (2003) presents an evaluation between the three cluster validation techniques you mention. Maybe this helps if you haven't seen it.
|
What is the difference between Silhouette Index vs Dunn Index vs Davies-Bouldin Index
|
Bolshakova and Azuaje (2003) presents an evaluation between the three cluster validation techniques you mention. Maybe this helps if you haven't seen it.
|
What is the difference between Silhouette Index vs Dunn Index vs Davies-Bouldin Index
Bolshakova and Azuaje (2003) presents an evaluation between the three cluster validation techniques you mention. Maybe this helps if you haven't seen it.
|
What is the difference between Silhouette Index vs Dunn Index vs Davies-Bouldin Index
Bolshakova and Azuaje (2003) presents an evaluation between the three cluster validation techniques you mention. Maybe this helps if you haven't seen it.
|
43,366
|
Fisher information for MLE with constraint
|
Constraints greatly complicate the usage of Fisher's information with asymptotic theory for derivation of an estimator's distribution. Two general tips:
1.) If you are dealing with equality constraints (which seems like the case in OP's problem), you can often use a change of parameterizations such that the parameter lies on a lower dimensional space without constraints. This is recommended.
2.) If you are dealing with inequality constraints, and your results imply you are far from the boundary (i.e., you estimate a probability as $\hat p = 0.25$ with standard error $SE(\hat p) = 0.05$), the issue can likely be safely ignored.
|
Fisher information for MLE with constraint
|
Constraints greatly complicate the usage of Fisher's information with asymptotic theory for derivation of an estimator's distribution. Two general tips:
1.) If you are dealing with equality constraint
|
Fisher information for MLE with constraint
Constraints greatly complicate the usage of Fisher's information with asymptotic theory for derivation of an estimator's distribution. Two general tips:
1.) If you are dealing with equality constraints (which seems like the case in OP's problem), you can often use a change of parameterizations such that the parameter lies on a lower dimensional space without constraints. This is recommended.
2.) If you are dealing with inequality constraints, and your results imply you are far from the boundary (i.e., you estimate a probability as $\hat p = 0.25$ with standard error $SE(\hat p) = 0.05$), the issue can likely be safely ignored.
|
Fisher information for MLE with constraint
Constraints greatly complicate the usage of Fisher's information with asymptotic theory for derivation of an estimator's distribution. Two general tips:
1.) If you are dealing with equality constraint
|
43,367
|
Fisher information for MLE with constraint
|
I think not. The Fisher Information is a function of $\theta$, so it specifies what the what kind of performance you can expected of your estimator given a value of $\theta$. In some cases the FI depends on $\theta$, in some cases it does not. I don't think having a constraint on $\theta$ changes that.
What I would recommend however, is to look into Bayesian MMSE estimators. The advantage of the Bayesian approach is that they allow you to use any prior knowledge about the parameter (in your case $g(\theta) = 0$) to improve the estimator. There is a good explanation with an example of a constrained estimator for a DC level in noise in this lecture from the Estimation and Detection course of the TU Delft.. In know it's quite a different approach from solving the Lanrange dual problem as you are trying now, but might be worth having a look!
|
Fisher information for MLE with constraint
|
I think not. The Fisher Information is a function of $\theta$, so it specifies what the what kind of performance you can expected of your estimator given a value of $\theta$. In some cases the FI depe
|
Fisher information for MLE with constraint
I think not. The Fisher Information is a function of $\theta$, so it specifies what the what kind of performance you can expected of your estimator given a value of $\theta$. In some cases the FI depends on $\theta$, in some cases it does not. I don't think having a constraint on $\theta$ changes that.
What I would recommend however, is to look into Bayesian MMSE estimators. The advantage of the Bayesian approach is that they allow you to use any prior knowledge about the parameter (in your case $g(\theta) = 0$) to improve the estimator. There is a good explanation with an example of a constrained estimator for a DC level in noise in this lecture from the Estimation and Detection course of the TU Delft.. In know it's quite a different approach from solving the Lanrange dual problem as you are trying now, but might be worth having a look!
|
Fisher information for MLE with constraint
I think not. The Fisher Information is a function of $\theta$, so it specifies what the what kind of performance you can expected of your estimator given a value of $\theta$. In some cases the FI depe
|
43,368
|
Weight normalization technique used in Image Style Transfer
|
Short answer: Take the activation map corresponding to a particular weight matrix, take the mean of all the activations, and then average this mean over all images. Then divide the weight matrix and the bias by this average. And yes it makes sense to do it sequentially.
Long answer: (Using the notation used in the paper you cited)
The convolution operator for the $i^{th}$ feature map performs an inner product with image patches $x_j$:
$$ max\{0,\ w_i^{l} \bullet x_{j} + b_j^{l}\} = F_{ij}^l$$
They take the mean of activations over all images $\chi$ and all spatial locations $j$ (let's call that $s_i$)
$$ s_i^{l} \equiv \mathbf{E}_{\chi, j}[max\{0,\ w_i^{l} \bullet x_{j} + b_j^{l}\}] = \frac{1}{KM_l} \sum_{\chi} \sum_{j=1}^{M_l} F_{ij}^l$$
Here $K$ is the number of images in the dataset.
Now you just scale $w_i^{l}$ and $b_j^{l}$ by $\frac{1}{s_i^{l}}$, giving you:
$$\mathbf{E}_{\chi, j}[ max\{0,\ \frac{w_i^{l}}{s_i^{l}} \bullet x_{j} + \frac{b_j^{l}}{s_i^{l}}\}] = 1$$
This also ensures that activations that were zero earlier, after passing through the RELU nonlinearity, remain so, i.e.
$$w_i^{l} \bullet x_{j} + b_j^{l}< 0 \iff \frac{w_i^{l}}{s_i^{l}} \bullet x_{j} + \frac{b_j^{l}}{s_i^{l}}< 0$$
|
Weight normalization technique used in Image Style Transfer
|
Short answer: Take the activation map corresponding to a particular weight matrix, take the mean of all the activations, and then average this mean over all images. Then divide the weight matrix and t
|
Weight normalization technique used in Image Style Transfer
Short answer: Take the activation map corresponding to a particular weight matrix, take the mean of all the activations, and then average this mean over all images. Then divide the weight matrix and the bias by this average. And yes it makes sense to do it sequentially.
Long answer: (Using the notation used in the paper you cited)
The convolution operator for the $i^{th}$ feature map performs an inner product with image patches $x_j$:
$$ max\{0,\ w_i^{l} \bullet x_{j} + b_j^{l}\} = F_{ij}^l$$
They take the mean of activations over all images $\chi$ and all spatial locations $j$ (let's call that $s_i$)
$$ s_i^{l} \equiv \mathbf{E}_{\chi, j}[max\{0,\ w_i^{l} \bullet x_{j} + b_j^{l}\}] = \frac{1}{KM_l} \sum_{\chi} \sum_{j=1}^{M_l} F_{ij}^l$$
Here $K$ is the number of images in the dataset.
Now you just scale $w_i^{l}$ and $b_j^{l}$ by $\frac{1}{s_i^{l}}$, giving you:
$$\mathbf{E}_{\chi, j}[ max\{0,\ \frac{w_i^{l}}{s_i^{l}} \bullet x_{j} + \frac{b_j^{l}}{s_i^{l}}\}] = 1$$
This also ensures that activations that were zero earlier, after passing through the RELU nonlinearity, remain so, i.e.
$$w_i^{l} \bullet x_{j} + b_j^{l}< 0 \iff \frac{w_i^{l}}{s_i^{l}} \bullet x_{j} + \frac{b_j^{l}}{s_i^{l}}< 0$$
|
Weight normalization technique used in Image Style Transfer
Short answer: Take the activation map corresponding to a particular weight matrix, take the mean of all the activations, and then average this mean over all images. Then divide the weight matrix and t
|
43,369
|
Weight normalization technique used in Image Style Transfer
|
You are correct that once we have the mean feature activations over a set of images, we normalize the network sequentially, layer by layer. There is a subtlety involved, though. You can't rescale layer weights independently of the previous layers.
Let $W_i^l$ and $b_i^l$ be the weights and bias of the $i$-th convolutional filter in layer $l$. The kernel $W_i^l$ has a 3D shape with dimensions $h \times w \times c$ (height, width, channels_in), but for easier notation down the road let's reshape it to $p \times c$, where $p = h \times w$.
$F_{ij}^l \equiv max(0,\ W_i^l \bullet P_j^{l-1} + b_i^l)$ is the activation of the $i$-th filter in layer $l$ at the $j$-th position in the activation map. Here $\bullet$ designates the convolution operation (or Frobenius inner product, or multiply-add; I adopted the symbol from Baba's answer) and $P_j^{l-1}$ is the window of $h \times w \times c = p \times c$ activations in layer $l-1$'s output that the filter convolves with at the position under consideration.
Let $$\mu_i^l \equiv \mathop{\mathbb{E}}_{X, j}F_{ij}^l = \frac{1}{NM^l} \sum_X \sum_{j=1}^{M^l} F_{ij}^l = \frac{1}{NM^l} \sum_X \sum_{j=1}^{M^l} max(0,\ W_i^l \bullet P_j^{l-1} + b_i^l)$$ be the mean activation of the $i$-th filter in layer $l$ over all $N$ images in the dataset $X$ and all $M^l$ positions in the filter's activation map. This is obviously a non-negative number, and it is actually positive for all filters in the VGG networks (when mean activations are collected over a decently sized data set).
Now suppose we "normalize" the activations by dividing weights and biases by $\mu_i^l$. This would make the mean of the activation equal to 1, if the incoming activations were the same as the original non-normalized activations. That is, $\mathbb{E}_{X, j} max(0,\ \frac{W_i^l}{\mu_i^l} \bullet P_j^{l-1} + \frac{b_i^l}{\mu_i^l}) = 1$, but only if the previous layer's activations $P_j^{l-1}$ are the same as in the original non-normalized network -- the network we calculated $\mu_i^l$ in. This is only true for the first conv layer in the normalized network, the layer that convolves with the input image. For other layers this will not only result in wrong scale, but it can actually reverse the sign of the convolution and, consequently, zero out activations after passing through the ReLU. In other words, it changes the network's output.
To fix this, we need to restore incoming activations: but we can't alter the incoming values themselves, we have to undo the normalization of the previous layer using the weights of the current layer. Note that a weight in a filter only interacts with a single channel in the previous layer. So we rescale all the weights in $W_i^l$ which interact with the $k$-th channel in layer ${l-1}$ by multiplying them by $\mu_k^{l-1}$. This cancels out the normalization of the previous layer.
To formalize, let
$D^{l-1} \equiv \begin{bmatrix} \mu_1^{l-1} & 0 & \dots & 0 \\ 0 & \mu_2^{l-1} & \dots & 0 \\\vdots & & \ddots & \\ 0 & \dots & 0 & \mu_c^{l-1} \end{bmatrix} $ be the diagonal $c \times c$ matrix constructed using all $c$ mean activations from layer $l-1$.
Then, $\mathbb{E}_{X, j} max(0,\ \frac{W_i^l{D^{l-1}}}{\mu_i^l} \bullet P_j^{l-1} + \frac{b_i^l}{\mu_i^l}) = 1$. (And this is the reason we reshaped weights to 2D, so that we can multiply matrices instead of tensors, for the sake of clarity.)
Also note that max and average pooling layers will not interfere with this scheme, because they don't alter scale.
The above probably looks more complex than it is in actual code. I pushed a GitHub repo with a short Keras implementation: https://github.com/corleypc/vgg-normalize. Looking at the sample code will likely elucidate things further.
|
Weight normalization technique used in Image Style Transfer
|
You are correct that once we have the mean feature activations over a set of images, we normalize the network sequentially, layer by layer. There is a subtlety involved, though. You can't rescale laye
|
Weight normalization technique used in Image Style Transfer
You are correct that once we have the mean feature activations over a set of images, we normalize the network sequentially, layer by layer. There is a subtlety involved, though. You can't rescale layer weights independently of the previous layers.
Let $W_i^l$ and $b_i^l$ be the weights and bias of the $i$-th convolutional filter in layer $l$. The kernel $W_i^l$ has a 3D shape with dimensions $h \times w \times c$ (height, width, channels_in), but for easier notation down the road let's reshape it to $p \times c$, where $p = h \times w$.
$F_{ij}^l \equiv max(0,\ W_i^l \bullet P_j^{l-1} + b_i^l)$ is the activation of the $i$-th filter in layer $l$ at the $j$-th position in the activation map. Here $\bullet$ designates the convolution operation (or Frobenius inner product, or multiply-add; I adopted the symbol from Baba's answer) and $P_j^{l-1}$ is the window of $h \times w \times c = p \times c$ activations in layer $l-1$'s output that the filter convolves with at the position under consideration.
Let $$\mu_i^l \equiv \mathop{\mathbb{E}}_{X, j}F_{ij}^l = \frac{1}{NM^l} \sum_X \sum_{j=1}^{M^l} F_{ij}^l = \frac{1}{NM^l} \sum_X \sum_{j=1}^{M^l} max(0,\ W_i^l \bullet P_j^{l-1} + b_i^l)$$ be the mean activation of the $i$-th filter in layer $l$ over all $N$ images in the dataset $X$ and all $M^l$ positions in the filter's activation map. This is obviously a non-negative number, and it is actually positive for all filters in the VGG networks (when mean activations are collected over a decently sized data set).
Now suppose we "normalize" the activations by dividing weights and biases by $\mu_i^l$. This would make the mean of the activation equal to 1, if the incoming activations were the same as the original non-normalized activations. That is, $\mathbb{E}_{X, j} max(0,\ \frac{W_i^l}{\mu_i^l} \bullet P_j^{l-1} + \frac{b_i^l}{\mu_i^l}) = 1$, but only if the previous layer's activations $P_j^{l-1}$ are the same as in the original non-normalized network -- the network we calculated $\mu_i^l$ in. This is only true for the first conv layer in the normalized network, the layer that convolves with the input image. For other layers this will not only result in wrong scale, but it can actually reverse the sign of the convolution and, consequently, zero out activations after passing through the ReLU. In other words, it changes the network's output.
To fix this, we need to restore incoming activations: but we can't alter the incoming values themselves, we have to undo the normalization of the previous layer using the weights of the current layer. Note that a weight in a filter only interacts with a single channel in the previous layer. So we rescale all the weights in $W_i^l$ which interact with the $k$-th channel in layer ${l-1}$ by multiplying them by $\mu_k^{l-1}$. This cancels out the normalization of the previous layer.
To formalize, let
$D^{l-1} \equiv \begin{bmatrix} \mu_1^{l-1} & 0 & \dots & 0 \\ 0 & \mu_2^{l-1} & \dots & 0 \\\vdots & & \ddots & \\ 0 & \dots & 0 & \mu_c^{l-1} \end{bmatrix} $ be the diagonal $c \times c$ matrix constructed using all $c$ mean activations from layer $l-1$.
Then, $\mathbb{E}_{X, j} max(0,\ \frac{W_i^l{D^{l-1}}}{\mu_i^l} \bullet P_j^{l-1} + \frac{b_i^l}{\mu_i^l}) = 1$. (And this is the reason we reshaped weights to 2D, so that we can multiply matrices instead of tensors, for the sake of clarity.)
Also note that max and average pooling layers will not interfere with this scheme, because they don't alter scale.
The above probably looks more complex than it is in actual code. I pushed a GitHub repo with a short Keras implementation: https://github.com/corleypc/vgg-normalize. Looking at the sample code will likely elucidate things further.
|
Weight normalization technique used in Image Style Transfer
You are correct that once we have the mean feature activations over a set of images, we normalize the network sequentially, layer by layer. There is a subtlety involved, though. You can't rescale laye
|
43,370
|
how to sample data for regression that is the most informative?
|
I think this can be answered by drawing from sequential Monte-Carlo, and quasi Monte-Carlo methods.
The key concept that underlies your problem is the exploration-exploitation dilemma:
Exploration: you want to cover as much as possible of the space where $f$ is defined;
Exploitation: but ideally you would rather spend time sampling places where the value of $f$ varies a lot, rather than where it is flat.
For the exploration part, quasi Monte-Carlo methods tell us to choose low-discrepancy sequences in order to cover the space as efficiently as possible. In 2D the method you choose does not matter too much; you basically need a grid-like structure, see the Sobol sequence for example. If you just want to explore as much as possible, this answers your question (see the Koksma-Hlawka inequality).
For the exploitation part, we need to adopt a more dynamic perspective; somehow, we need to learn from the samples that already exist, in order to focus on places that matter to us, as we sample more and more. Here, importance sampling gives us a way of focusing on places of interest. For example if we were interested in finding the peaks of $f$, given a set of $N$ existing samples $(x_i, f(x_i))$, we would resample in the neighbourhood of $x_k$ with a probability proportional to $f(x_k)$. In your case, you may want to resample where the gradient of $f$ is large for example.
How to balance exploration and exploitation is a question without an answer; it really depends on your problem and on the resources available.
To give a concrete answer to your problem, you could consider a 3x3 grid covering your 2D space, with a sample at the centre of each cell. From that, you could estimate the "gradient" in each cell, by comparing the value obtained with the neighbours. Iteratively then:
select a subset of cells with large gradients (and possibly other cells selected at random),
divide them further with a nested 3x3 grid;
evaluate $f$ at the centre of each smaller cell obtained;
re-evaluate the "gradient" in each cell by comparing the value obtained with the neighbours.
This would be an adaptive way of sampling $f$. Obviously this is just a sketch of a solution, and many details need to be addressed (mainly how to compare values obtained between boxes of different sizes, and what is the variance to be expected on the estimate of the gradient).
|
how to sample data for regression that is the most informative?
|
I think this can be answered by drawing from sequential Monte-Carlo, and quasi Monte-Carlo methods.
The key concept that underlies your problem is the exploration-exploitation dilemma:
Exploration:
|
how to sample data for regression that is the most informative?
I think this can be answered by drawing from sequential Monte-Carlo, and quasi Monte-Carlo methods.
The key concept that underlies your problem is the exploration-exploitation dilemma:
Exploration: you want to cover as much as possible of the space where $f$ is defined;
Exploitation: but ideally you would rather spend time sampling places where the value of $f$ varies a lot, rather than where it is flat.
For the exploration part, quasi Monte-Carlo methods tell us to choose low-discrepancy sequences in order to cover the space as efficiently as possible. In 2D the method you choose does not matter too much; you basically need a grid-like structure, see the Sobol sequence for example. If you just want to explore as much as possible, this answers your question (see the Koksma-Hlawka inequality).
For the exploitation part, we need to adopt a more dynamic perspective; somehow, we need to learn from the samples that already exist, in order to focus on places that matter to us, as we sample more and more. Here, importance sampling gives us a way of focusing on places of interest. For example if we were interested in finding the peaks of $f$, given a set of $N$ existing samples $(x_i, f(x_i))$, we would resample in the neighbourhood of $x_k$ with a probability proportional to $f(x_k)$. In your case, you may want to resample where the gradient of $f$ is large for example.
How to balance exploration and exploitation is a question without an answer; it really depends on your problem and on the resources available.
To give a concrete answer to your problem, you could consider a 3x3 grid covering your 2D space, with a sample at the centre of each cell. From that, you could estimate the "gradient" in each cell, by comparing the value obtained with the neighbours. Iteratively then:
select a subset of cells with large gradients (and possibly other cells selected at random),
divide them further with a nested 3x3 grid;
evaluate $f$ at the centre of each smaller cell obtained;
re-evaluate the "gradient" in each cell by comparing the value obtained with the neighbours.
This would be an adaptive way of sampling $f$. Obviously this is just a sketch of a solution, and many details need to be addressed (mainly how to compare values obtained between boxes of different sizes, and what is the variance to be expected on the estimate of the gradient).
|
how to sample data for regression that is the most informative?
I think this can be answered by drawing from sequential Monte-Carlo, and quasi Monte-Carlo methods.
The key concept that underlies your problem is the exploration-exploitation dilemma:
Exploration:
|
43,371
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
I think the key is to keep in mind what you're really after. Is this a kaggle competition? Then sure, your approach sounds fine.
If this is for an academic paper, or medical work that will be put in the field, and you want something that will generalize well and pass peer review, then I don't think this is a good approach. Because you can't just ignore some of your samples.
Besides the 'validity' or 'correctness' of the approach, it also might not help as much as you think. Part of the problem is the pre-classifier that you're proposing. Is it 100% accurate? How do you know, if it's discarding too many to actually look through. The problem is that if it's not 100.0% accurate, than you're losing your most valuable training examples by discarding them, because they are the ones that are fooling the current algorithm.
If you will permanently use this pre-classifier, then it's valid to have this step, and it's just part of your whole 'black box'. But then you need to accurately report the false negatives that it's discarding as part of your overall assessment (and preferably your overall loss function so you can optimize it correctly)
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
I think the key is to keep in mind what you're really after. Is this a kaggle competition? Then sure, your approach sounds fine.
If this is for an academic paper, or medical work that will be put in t
|
Using ML to assist human labelling in dataset with highly unbalanced classes
I think the key is to keep in mind what you're really after. Is this a kaggle competition? Then sure, your approach sounds fine.
If this is for an academic paper, or medical work that will be put in the field, and you want something that will generalize well and pass peer review, then I don't think this is a good approach. Because you can't just ignore some of your samples.
Besides the 'validity' or 'correctness' of the approach, it also might not help as much as you think. Part of the problem is the pre-classifier that you're proposing. Is it 100% accurate? How do you know, if it's discarding too many to actually look through. The problem is that if it's not 100.0% accurate, than you're losing your most valuable training examples by discarding them, because they are the ones that are fooling the current algorithm.
If you will permanently use this pre-classifier, then it's valid to have this step, and it's just part of your whole 'black box'. But then you need to accurately report the false negatives that it's discarding as part of your overall assessment (and preferably your overall loss function so you can optimize it correctly)
|
Using ML to assist human labelling in dataset with highly unbalanced classes
I think the key is to keep in mind what you're really after. Is this a kaggle competition? Then sure, your approach sounds fine.
If this is for an academic paper, or medical work that will be put in t
|
43,372
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
If there is a model that can label your data for you, then why even train one?
I would say using another model to label data for a model is bad. First, if a better model exists that can label a dataset why not just use that good model instead. Second, if the classes are highly unbalanced that is much more the reason that you want accurate labels so your model can do it’s best. Otherwise you are just confusing it, why would you do that?
Labeling data is arduous for humans, but that is why we are trying to make machines good enough so we can at some point stop doing that.
If you want an easier way, you start by only labeling the minority class, and then labeling an equal number of the other classes and train using that, such that your dataset is no longer unbalanced. Eg say u have 100 samples 10, 40, 50 are the number of samples in each class. So you will start by labeling the 10, the sample 10 from the 40 and then the 50 and label them too; then train a model on a dataset of your 30 samples that are unbiased. This method has it’s pros and cons but I will stop here as that was not your original question.
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
If there is a model that can label your data for you, then why even train one?
I would say using another model to label data for a model is bad. First, if a better model exists that can label a datas
|
Using ML to assist human labelling in dataset with highly unbalanced classes
If there is a model that can label your data for you, then why even train one?
I would say using another model to label data for a model is bad. First, if a better model exists that can label a dataset why not just use that good model instead. Second, if the classes are highly unbalanced that is much more the reason that you want accurate labels so your model can do it’s best. Otherwise you are just confusing it, why would you do that?
Labeling data is arduous for humans, but that is why we are trying to make machines good enough so we can at some point stop doing that.
If you want an easier way, you start by only labeling the minority class, and then labeling an equal number of the other classes and train using that, such that your dataset is no longer unbalanced. Eg say u have 100 samples 10, 40, 50 are the number of samples in each class. So you will start by labeling the 10, the sample 10 from the 40 and then the 50 and label them too; then train a model on a dataset of your 30 samples that are unbiased. This method has it’s pros and cons but I will stop here as that was not your original question.
|
Using ML to assist human labelling in dataset with highly unbalanced classes
If there is a model that can label your data for you, then why even train one?
I would say using another model to label data for a model is bad. First, if a better model exists that can label a datas
|
43,373
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
It is true that usually more data lead in better decisions. In your case, what you are trying to do is accelerate the labeling process and the way you propose to do it is valid. Since the question is which examples one should manually label and it is true that using a system to discard "uninteresting" examples with high confidence makes sense. It's not about ignoring examples, it is about giving priority to some of them that are not trivial.
Having a classifier that generalizes well to the true distribution of the training data is another topic. You can ensure this by evaluating the classifier in a holdout set split in a stratified way. Since it is cheaper to obtain samples from one of the classes you can balance the training set in a later step (by over/under sampling), after having labeled the data.
|
Using ML to assist human labelling in dataset with highly unbalanced classes
|
It is true that usually more data lead in better decisions. In your case, what you are trying to do is accelerate the labeling process and the way you propose to do it is valid. Since the question is
|
Using ML to assist human labelling in dataset with highly unbalanced classes
It is true that usually more data lead in better decisions. In your case, what you are trying to do is accelerate the labeling process and the way you propose to do it is valid. Since the question is which examples one should manually label and it is true that using a system to discard "uninteresting" examples with high confidence makes sense. It's not about ignoring examples, it is about giving priority to some of them that are not trivial.
Having a classifier that generalizes well to the true distribution of the training data is another topic. You can ensure this by evaluating the classifier in a holdout set split in a stratified way. Since it is cheaper to obtain samples from one of the classes you can balance the training set in a later step (by over/under sampling), after having labeled the data.
|
Using ML to assist human labelling in dataset with highly unbalanced classes
It is true that usually more data lead in better decisions. In your case, what you are trying to do is accelerate the labeling process and the way you propose to do it is valid. Since the question is
|
43,374
|
Ridge Regression and Lasso Regression
|
Does this indicate improvement of my predictor reduction from ridge to lasso?
No, the plots don't say anything about predictive performance. If you want to estimate that, you can use cross validation.
A.K.A, 6 predictors model does a better job in fitting the data than 8 predictors model?
Compared to ordinary least squares (OLS), regularized methods like lasso and ridge regression will give greater or equal error on the training data. But, if you're interested in predictive performance, what you really care about is error on future data generated by the same underlying distribution. This is what cross validation estimates. The method (and value of $\lambda$) that will perform best depends on the problem.
If you're interested in statistical inference (i.e. accounting for uncertainty in parameter estimates, or properly identifying an underlying 'true' model), then you'd need a way to compute p values, confidence intervals, etc. The standard procedures designed for OLS won't work for lasso and ridge regression. Also, keep in mind that there are many subtleties and caveats in identifying 'important variables'.
Are the ridge regression estimates at the smallest $\lambda$ value exactly the same as the least squares estimates?
When $\lambda=0$ both ridge regression and lasso are equivalent to ordinary least squares (OLS). You can see this by writing the optimization problem for each method and setting $\lambda$ to zero:
$$\beta_{OLS} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2$$
$$\beta_{lasso} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2 + \lambda \|\beta\|_1$$
$$\beta_{ridge} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2 + \lambda \|\beta\|_2^2$$
How to interpret these two plots?
Each trajectory shows the value of an individual coefficient as $\lambda$ is changed. It looks like your x axis is mislabeled ($\lambda$ is actually decreasing from left to right).
Some general things you can notice in these plots (which are well known facts about lasso and ridge regression): Both methods shrink the coefficients more strongly toward zero as $\lambda$ increases (moving from right to left on the x axis). Lasso produces sparse solutions--as $\lambda$ increases, more and more coefficients are driven exactly to zero while others remain relatively large (which is why lasso is useful for variable selection). Ridge regression doesn't behave this way--as $\lambda$ increases, the overall magnitude of the coefficients decreases, but individual coefficients are not driven exactly to zero.
what does it mean for the ending points in red on the line or above or below
You said the red points represent the OLS coefficients. Because lasso and ridge regression shrink the coefficients toward zero, the magnitudes will be smaller than OLS when $\lambda > 0$. Your plots would intersect the red points at $\lambda=0$, where all methods are equivalent.
|
Ridge Regression and Lasso Regression
|
Does this indicate improvement of my predictor reduction from ridge to lasso?
No, the plots don't say anything about predictive performance. If you want to estimate that, you can use cross validation
|
Ridge Regression and Lasso Regression
Does this indicate improvement of my predictor reduction from ridge to lasso?
No, the plots don't say anything about predictive performance. If you want to estimate that, you can use cross validation.
A.K.A, 6 predictors model does a better job in fitting the data than 8 predictors model?
Compared to ordinary least squares (OLS), regularized methods like lasso and ridge regression will give greater or equal error on the training data. But, if you're interested in predictive performance, what you really care about is error on future data generated by the same underlying distribution. This is what cross validation estimates. The method (and value of $\lambda$) that will perform best depends on the problem.
If you're interested in statistical inference (i.e. accounting for uncertainty in parameter estimates, or properly identifying an underlying 'true' model), then you'd need a way to compute p values, confidence intervals, etc. The standard procedures designed for OLS won't work for lasso and ridge regression. Also, keep in mind that there are many subtleties and caveats in identifying 'important variables'.
Are the ridge regression estimates at the smallest $\lambda$ value exactly the same as the least squares estimates?
When $\lambda=0$ both ridge regression and lasso are equivalent to ordinary least squares (OLS). You can see this by writing the optimization problem for each method and setting $\lambda$ to zero:
$$\beta_{OLS} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2$$
$$\beta_{lasso} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2 + \lambda \|\beta\|_1$$
$$\beta_{ridge} = \underset{\beta}{\text{argmin}}
\sum_{i=1}^n (y_i - \beta \cdot x_i)^2 + \lambda \|\beta\|_2^2$$
How to interpret these two plots?
Each trajectory shows the value of an individual coefficient as $\lambda$ is changed. It looks like your x axis is mislabeled ($\lambda$ is actually decreasing from left to right).
Some general things you can notice in these plots (which are well known facts about lasso and ridge regression): Both methods shrink the coefficients more strongly toward zero as $\lambda$ increases (moving from right to left on the x axis). Lasso produces sparse solutions--as $\lambda$ increases, more and more coefficients are driven exactly to zero while others remain relatively large (which is why lasso is useful for variable selection). Ridge regression doesn't behave this way--as $\lambda$ increases, the overall magnitude of the coefficients decreases, but individual coefficients are not driven exactly to zero.
what does it mean for the ending points in red on the line or above or below
You said the red points represent the OLS coefficients. Because lasso and ridge regression shrink the coefficients toward zero, the magnitudes will be smaller than OLS when $\lambda > 0$. Your plots would intersect the red points at $\lambda=0$, where all methods are equivalent.
|
Ridge Regression and Lasso Regression
Does this indicate improvement of my predictor reduction from ridge to lasso?
No, the plots don't say anything about predictive performance. If you want to estimate that, you can use cross validation
|
43,375
|
Estimating weight of hidden coin
|
Method 1: Comparing double and single coin flips as two binomial distributed variables (biased)
Say you flip $n$ times both with $k_n$ times double heads, and you flip $m$ times the first with $k_m$ times the heads. The unknown weights $\theta_1$ and $\theta_2$ can be estimated by the maximum likelihood estimate:
The conditional probability is $$P(k_n,k_m|\theta_1,\theta_2) = {{n}\choose{k_n}} {{m}\choose{k_m}} \theta_1^{k_n}(1-\theta_1)^{n-k_n} (\theta_1\theta_2)^{k_m}(1-\theta_1\theta_2)^{n-k_m}$$
Log-likelihood (and eliminating the binomial coefficients):
$$\log \mathcal{L}(\theta_1,\theta_2) = k_n \log(\theta_1) + (n-k_n) \log(1-\theta_1)+ k_m \log(\theta_1\theta_2) + (m-k_m) \log (1-\theta_1\theta_2)$$
Derivatives
$$\frac{\partial\log \mathcal{L}(\theta_1,\theta_2)}{\partial\theta_1} = \frac{k_n}{\theta_1} - \frac{n-k_n}{1-\theta_1} + \frac{k_m}{\theta_1} - \theta_2 \frac{m-k_m}{1-\theta_1\theta_2} $$
$$\frac{\partial\log \mathcal{L}(\theta_1,\theta_2)}{\partial\theta_2} = \frac{k_m}{\theta_2} - \theta_1 \frac{m-k_m}{1-\theta_1\theta_2} $$
Which is zero for
$$\theta_1 = \frac{k_n}{n} $$ and $$\theta_2 = \frac{k_m}{m} \frac{n}{k_n} $$
This estimate does have some bias. Using simulation I found the expectation value $E(\theta_2)>\theta_2$
(and technically the expectation value is infinite due to the small possibility of $k_n=0$ but you could add some stopping rule that prevents $k_n$ from being zero. Since $k_m < k_n$ anyway I don't believe that this introduces too much bias, if at all)
Method 2: Performing double coin flips with number of trials depending on the amount of flips necessary to get k heads in single coin flips (unbiased ?)
You flip the first coin until you got $k$ success and count the number $X$ that you need to flip.
Then you flip both coins a multiple $n$ times $X$ and count the number $Y$ that both coins land heads.
Intuitively I'd say $\theta_2 = \frac{Y}{nk}$ is an unbiased estimator (with a negative aspect that $\theta_2$ can be above 1). The simulation below seems to show that there is only a small bias (also the variance/error is smaller in comparison to the first method with similar amount of coin flips). You would have to compute the conjugate distribution for the variable $Y$ to see if there is no bias.
k=50
p1=0.5
p2=0.5
n=10
X <- rnbinom(10000,k,p1)+k
Y <- rbinom(10000,X*n,p1*p2)
mean(Y/k/n-p2)
var(Y/k/n)
plot(hist(Y/k/n))
|
Estimating weight of hidden coin
|
Method 1: Comparing double and single coin flips as two binomial distributed variables (biased)
Say you flip $n$ times both with $k_n$ times double heads, and you flip $m$ times the first with $k_m$ t
|
Estimating weight of hidden coin
Method 1: Comparing double and single coin flips as two binomial distributed variables (biased)
Say you flip $n$ times both with $k_n$ times double heads, and you flip $m$ times the first with $k_m$ times the heads. The unknown weights $\theta_1$ and $\theta_2$ can be estimated by the maximum likelihood estimate:
The conditional probability is $$P(k_n,k_m|\theta_1,\theta_2) = {{n}\choose{k_n}} {{m}\choose{k_m}} \theta_1^{k_n}(1-\theta_1)^{n-k_n} (\theta_1\theta_2)^{k_m}(1-\theta_1\theta_2)^{n-k_m}$$
Log-likelihood (and eliminating the binomial coefficients):
$$\log \mathcal{L}(\theta_1,\theta_2) = k_n \log(\theta_1) + (n-k_n) \log(1-\theta_1)+ k_m \log(\theta_1\theta_2) + (m-k_m) \log (1-\theta_1\theta_2)$$
Derivatives
$$\frac{\partial\log \mathcal{L}(\theta_1,\theta_2)}{\partial\theta_1} = \frac{k_n}{\theta_1} - \frac{n-k_n}{1-\theta_1} + \frac{k_m}{\theta_1} - \theta_2 \frac{m-k_m}{1-\theta_1\theta_2} $$
$$\frac{\partial\log \mathcal{L}(\theta_1,\theta_2)}{\partial\theta_2} = \frac{k_m}{\theta_2} - \theta_1 \frac{m-k_m}{1-\theta_1\theta_2} $$
Which is zero for
$$\theta_1 = \frac{k_n}{n} $$ and $$\theta_2 = \frac{k_m}{m} \frac{n}{k_n} $$
This estimate does have some bias. Using simulation I found the expectation value $E(\theta_2)>\theta_2$
(and technically the expectation value is infinite due to the small possibility of $k_n=0$ but you could add some stopping rule that prevents $k_n$ from being zero. Since $k_m < k_n$ anyway I don't believe that this introduces too much bias, if at all)
Method 2: Performing double coin flips with number of trials depending on the amount of flips necessary to get k heads in single coin flips (unbiased ?)
You flip the first coin until you got $k$ success and count the number $X$ that you need to flip.
Then you flip both coins a multiple $n$ times $X$ and count the number $Y$ that both coins land heads.
Intuitively I'd say $\theta_2 = \frac{Y}{nk}$ is an unbiased estimator (with a negative aspect that $\theta_2$ can be above 1). The simulation below seems to show that there is only a small bias (also the variance/error is smaller in comparison to the first method with similar amount of coin flips). You would have to compute the conjugate distribution for the variable $Y$ to see if there is no bias.
k=50
p1=0.5
p2=0.5
n=10
X <- rnbinom(10000,k,p1)+k
Y <- rbinom(10000,X*n,p1*p2)
mean(Y/k/n-p2)
var(Y/k/n)
plot(hist(Y/k/n))
|
Estimating weight of hidden coin
Method 1: Comparing double and single coin flips as two binomial distributed variables (biased)
Say you flip $n$ times both with $k_n$ times double heads, and you flip $m$ times the first with $k_m$ t
|
43,376
|
Meta analysis of Multiple regression
|
Meta-analysis of regression slopes is less common but not unheard of (for methodological details, see Aloe & Becker, 2012; Peterson & Brown, 2005). The typical concern with this approach is that it's often improbable (if not impossible) to ensure model equivalency about samples--the meaning of a slope will change if different combinations of variables are included/excluded across the samples. Thus, while the computation is relatively straightforward, the meaning-making is often precarious. But as @Joe_74 correctly indicates, it doesn't make a whole lot of sense to meta-analyze estimates all coming from the same sample.
Instead, I see your question as a good case where a structural equation modelling approach could be quite useful (see this thread if you are new to SEM and want an accessible introduction). I could see at least three fruitful ways of attempting to address your question; I'm going to simplify it to an example of where you only have one predictor (instead of 10), just to make the visualizations more straightforward, but the approach could be extended to 10 predictors with a bit more coding.
Approach 1: Path Analysis of Observed Standardized Variables
If taking advantage of the latent variable modelling capacities of SEM seemed too daunting, initially, you could keep your analysis at the level of observed variables, in which you would predict your three scales by your chosen variable(s). The main issue here is that you can't compare the slopes across outcomes yet, because your outcomes might be scaled differently. Standardizing your outcome scores pre-analysis should do the trick, and then you could compare the fit of a model where the slopes are freely estimated across outcomes (Model 1a on the left [note the unique parameter labels]) against one in which they have been constrained to equality (Model 1b on the right [note the identical parameter labels]).
Approach 2: SEM of One Common Outcome Factor
By the sounds of it, your three scales represent three different ways of measuring the same underlying "thing". If so, you could specify each scale score as loading onto a common factor, and then predict that common factor by your chosen variable(s). Now, since you only have one predictor and one outcome, there are no structural pathways to constrain (and compare). But if you were interested in tackling the question of whether each scale is an equally strong indicator of the underlying construct, you could compare the fit of a model where the three factor loadings are unconstrained model (Model 2a on the right) to one where they are constrained to equality (Model 2b on the left).
Approach 3: SEM of 3 Common Factors
Finally, if you don't see your three scales as tapping into the same underlying construct, you could adopt a hybridized approach of 1. and 2., and predict the scales separately, but model them as latent constructs, once again comparing unconstrained (Model 3a) and constrained models (Model 3b). Using a fixed-factor (i.e., standardized latent factor) scale-setting approach would help to ensure that your slopes have a similar scaling/meaning. You could also estimate the correlations between the factors (not shown because it would make the figure a bit messy).
References
Aloe, A. M., & Becker, B. J. (2012). An effect size for regression predictors in meta-analysis. Journal of Educational and Behavioral Statistics, 37(2), 278-297.
Peterson, R. A., & Brown, S. P. (2005). On the use of beta coefficients in meta-analysis. Journal of Applied Psychology, 90(1), 175-181.
|
Meta analysis of Multiple regression
|
Meta-analysis of regression slopes is less common but not unheard of (for methodological details, see Aloe & Becker, 2012; Peterson & Brown, 2005). The typical concern with this approach is that it's
|
Meta analysis of Multiple regression
Meta-analysis of regression slopes is less common but not unheard of (for methodological details, see Aloe & Becker, 2012; Peterson & Brown, 2005). The typical concern with this approach is that it's often improbable (if not impossible) to ensure model equivalency about samples--the meaning of a slope will change if different combinations of variables are included/excluded across the samples. Thus, while the computation is relatively straightforward, the meaning-making is often precarious. But as @Joe_74 correctly indicates, it doesn't make a whole lot of sense to meta-analyze estimates all coming from the same sample.
Instead, I see your question as a good case where a structural equation modelling approach could be quite useful (see this thread if you are new to SEM and want an accessible introduction). I could see at least three fruitful ways of attempting to address your question; I'm going to simplify it to an example of where you only have one predictor (instead of 10), just to make the visualizations more straightforward, but the approach could be extended to 10 predictors with a bit more coding.
Approach 1: Path Analysis of Observed Standardized Variables
If taking advantage of the latent variable modelling capacities of SEM seemed too daunting, initially, you could keep your analysis at the level of observed variables, in which you would predict your three scales by your chosen variable(s). The main issue here is that you can't compare the slopes across outcomes yet, because your outcomes might be scaled differently. Standardizing your outcome scores pre-analysis should do the trick, and then you could compare the fit of a model where the slopes are freely estimated across outcomes (Model 1a on the left [note the unique parameter labels]) against one in which they have been constrained to equality (Model 1b on the right [note the identical parameter labels]).
Approach 2: SEM of One Common Outcome Factor
By the sounds of it, your three scales represent three different ways of measuring the same underlying "thing". If so, you could specify each scale score as loading onto a common factor, and then predict that common factor by your chosen variable(s). Now, since you only have one predictor and one outcome, there are no structural pathways to constrain (and compare). But if you were interested in tackling the question of whether each scale is an equally strong indicator of the underlying construct, you could compare the fit of a model where the three factor loadings are unconstrained model (Model 2a on the right) to one where they are constrained to equality (Model 2b on the left).
Approach 3: SEM of 3 Common Factors
Finally, if you don't see your three scales as tapping into the same underlying construct, you could adopt a hybridized approach of 1. and 2., and predict the scales separately, but model them as latent constructs, once again comparing unconstrained (Model 3a) and constrained models (Model 3b). Using a fixed-factor (i.e., standardized latent factor) scale-setting approach would help to ensure that your slopes have a similar scaling/meaning. You could also estimate the correlations between the factors (not shown because it would make the figure a bit messy).
References
Aloe, A. M., & Becker, B. J. (2012). An effect size for regression predictors in meta-analysis. Journal of Educational and Behavioral Statistics, 37(2), 278-297.
Peterson, R. A., & Brown, S. P. (2005). On the use of beta coefficients in meta-analysis. Journal of Applied Psychology, 90(1), 175-181.
|
Meta analysis of Multiple regression
Meta-analysis of regression slopes is less common but not unheard of (for methodological details, see Aloe & Becker, 2012; Peterson & Brown, 2005). The typical concern with this approach is that it's
|
43,377
|
Meta analysis of Multiple regression
|
Vaitsiakhovich, T., Drichel, D., Herold, C., Lacour, A., & Becker, T. (2015). METAINTER: meta-analysis of multiple regression models in genome-wide association studies. Bioinformatics, 31(2), 151-157.
This paper provides an introduction to software to carry out meta-analysis of regression models. It's made for bioinformatics/genomics where people cannot do a full OLS model fit because there are often >100k or >1M predictors (SNPs) and many fewer cases (persons) in the study. In this case, what researchers do is carry out a lot of small regressions, 1 SNP at a time along with controls if desired (e.g. age, sex, ancestry from principal components analysis) and then combine that in a meta-analysis, which they then call a genome-wide association study (GWAS). They could also just do penalized regression with the full dataset, but this is usually not possible because researchers are not legally allowed to share the case-level data with each other, hence the need to do meta-analysis on the summary statistics from regression models (this paper however developed a method (lassosum) to use the lasso (L1 penalization) on summary statistics with ~90% efficiency of case-level data).
If, on the other hand, you have a situation with a single dataset with too many variables and many models, you might instead want to run a ton of different models on that one dataset and then meta-analyze those. In this case, in economics, they use something called Bayesian Model Averaging (BMA) also called Bayesian Averaging of Classical Estimates (BACE) that allows some analyses of this situation. The classic paper on this is Sala-i-Martin et al 2004 who used it for modeling economic growth between countries where there are too many variables to model jointly.
|
Meta analysis of Multiple regression
|
Vaitsiakhovich, T., Drichel, D., Herold, C., Lacour, A., & Becker, T. (2015). METAINTER: meta-analysis of multiple regression models in genome-wide association studies. Bioinformatics, 31(2), 151-157.
|
Meta analysis of Multiple regression
Vaitsiakhovich, T., Drichel, D., Herold, C., Lacour, A., & Becker, T. (2015). METAINTER: meta-analysis of multiple regression models in genome-wide association studies. Bioinformatics, 31(2), 151-157.
This paper provides an introduction to software to carry out meta-analysis of regression models. It's made for bioinformatics/genomics where people cannot do a full OLS model fit because there are often >100k or >1M predictors (SNPs) and many fewer cases (persons) in the study. In this case, what researchers do is carry out a lot of small regressions, 1 SNP at a time along with controls if desired (e.g. age, sex, ancestry from principal components analysis) and then combine that in a meta-analysis, which they then call a genome-wide association study (GWAS). They could also just do penalized regression with the full dataset, but this is usually not possible because researchers are not legally allowed to share the case-level data with each other, hence the need to do meta-analysis on the summary statistics from regression models (this paper however developed a method (lassosum) to use the lasso (L1 penalization) on summary statistics with ~90% efficiency of case-level data).
If, on the other hand, you have a situation with a single dataset with too many variables and many models, you might instead want to run a ton of different models on that one dataset and then meta-analyze those. In this case, in economics, they use something called Bayesian Model Averaging (BMA) also called Bayesian Averaging of Classical Estimates (BACE) that allows some analyses of this situation. The classic paper on this is Sala-i-Martin et al 2004 who used it for modeling economic growth between countries where there are too many variables to model jointly.
|
Meta analysis of Multiple regression
Vaitsiakhovich, T., Drichel, D., Herold, C., Lacour, A., & Becker, T. (2015). METAINTER: meta-analysis of multiple regression models in genome-wide association studies. Bioinformatics, 31(2), 151-157.
|
43,378
|
Meta analysis of Multiple regression
|
If I understood right, there are 3 regression models (of the same study) and you wish to use the results in a meta-analysis.
To start, if we consider we have, say, 3 "studies", I gather at least 4 studies would be necessary to get minimally reasonable results in a meta-analysis. That being said, if the results differ according to the scale of the outcome, I think this is not a "meta-analytical" issue.
Instead, we should demonstrate the results are robust enough, and a sensitivity analysis seems to me the most sound strategy. As a matter of fact, there are no studies in this situation, but a single study with a subtle twist in the generation of the outcome variable.
The difference in results on account of the differences in the outcome variable prompts us to reflect about the strategies used to create such scales. By the way, they are not unveiled in the query and the core issue (as well as model's interpretation) may well be linked to the creation of the different scales.
|
Meta analysis of Multiple regression
|
If I understood right, there are 3 regression models (of the same study) and you wish to use the results in a meta-analysis.
To start, if we consider we have, say, 3 "studies", I gather at least 4 stu
|
Meta analysis of Multiple regression
If I understood right, there are 3 regression models (of the same study) and you wish to use the results in a meta-analysis.
To start, if we consider we have, say, 3 "studies", I gather at least 4 studies would be necessary to get minimally reasonable results in a meta-analysis. That being said, if the results differ according to the scale of the outcome, I think this is not a "meta-analytical" issue.
Instead, we should demonstrate the results are robust enough, and a sensitivity analysis seems to me the most sound strategy. As a matter of fact, there are no studies in this situation, but a single study with a subtle twist in the generation of the outcome variable.
The difference in results on account of the differences in the outcome variable prompts us to reflect about the strategies used to create such scales. By the way, they are not unveiled in the query and the core issue (as well as model's interpretation) may well be linked to the creation of the different scales.
|
Meta analysis of Multiple regression
If I understood right, there are 3 regression models (of the same study) and you wish to use the results in a meta-analysis.
To start, if we consider we have, say, 3 "studies", I gather at least 4 stu
|
43,379
|
GAM : smoothing splines
|
Question 1:
Why would you not want to use thin plate splines?
It is computationally costly to set up the basis functions for a thin plate spline. Typically you would need one basis function per (unique) data point; even though Simon's truncation process allows for far fewer basis functions to be used in fitting, you still need to create all the basis functions before doing the truncation/decomposition of them, which is also a costly eigendecomposition.
There are settings where thin plate splines are not optimal. Smooths on finite areas with potentially irregular shapes are one such instance. Thin plate splines do not respect boundaries of the domain over which a smooth is required. For example:
A thin plate spline would smooth through/across the boundary between the two arms of the rotated U; the low values of the lower arm of the U would leak across the boundary and vice versa, producing biased estimated values of the function as it approaches the boundary.
Question 2:
P splines are useful in several non-standard settings. For example
They are often used as the basis for adaptive splines, where the degree of wiggliness of $f(x)$ is allowed to vary as a smooth function of $x$.
Shape constrained splines, such as splines constrained to be monotonic increasing, are quite easily built from modifications of P spline bases.
|
GAM : smoothing splines
|
Question 1:
Why would you not want to use thin plate splines?
It is computationally costly to set up the basis functions for a thin plate spline. Typically you would need one basis function per (uniq
|
GAM : smoothing splines
Question 1:
Why would you not want to use thin plate splines?
It is computationally costly to set up the basis functions for a thin plate spline. Typically you would need one basis function per (unique) data point; even though Simon's truncation process allows for far fewer basis functions to be used in fitting, you still need to create all the basis functions before doing the truncation/decomposition of them, which is also a costly eigendecomposition.
There are settings where thin plate splines are not optimal. Smooths on finite areas with potentially irregular shapes are one such instance. Thin plate splines do not respect boundaries of the domain over which a smooth is required. For example:
A thin plate spline would smooth through/across the boundary between the two arms of the rotated U; the low values of the lower arm of the U would leak across the boundary and vice versa, producing biased estimated values of the function as it approaches the boundary.
Question 2:
P splines are useful in several non-standard settings. For example
They are often used as the basis for adaptive splines, where the degree of wiggliness of $f(x)$ is allowed to vary as a smooth function of $x$.
Shape constrained splines, such as splines constrained to be monotonic increasing, are quite easily built from modifications of P spline bases.
|
GAM : smoothing splines
Question 1:
Why would you not want to use thin plate splines?
It is computationally costly to set up the basis functions for a thin plate spline. Typically you would need one basis function per (uniq
|
43,380
|
Statistical test to identify enriched edges in a network
|
The type of modelling approach that you are describing looks a lot like what exponential random graph models (ERGM) are doing.
In essence, ERGMs are models that attempt to explain network structure. The idea is to understand the processes that lead to the existence of ties in an observed network. In your ERGM, you specify configurations of interest (number of edges, number of reciprocal edges, numbers of triads of a specific type) as parameters and the model estimates coefficients for these parameters given the observed network. The coefficients can be interpreted as whether one observes more (positive coefficient) or less (negative coefficient) of a specific configuration in the observed network than expected in a set of comparable random graphs. For example, if 2 nodes are more likely to be connected because they share characteristic A, you will find a positive coefficient for the homophily effect for characteristic A.
This description is voluntarily non-technical, detailed technical explanation are available in the following book:
Lusher, D., Koskinen, J. and Robins, G. eds., 2013. Exponential random graph models for social networks: Theory, methods, and applications. Cambridge University Press.
R has several packages for the estimation of ERGMs. The ergm package has well developed vignettes with example applications.
The journal Social Networks has published a number of papers using ERGMs in analysis.
|
Statistical test to identify enriched edges in a network
|
The type of modelling approach that you are describing looks a lot like what exponential random graph models (ERGM) are doing.
In essence, ERGMs are models that attempt to explain network structure.
|
Statistical test to identify enriched edges in a network
The type of modelling approach that you are describing looks a lot like what exponential random graph models (ERGM) are doing.
In essence, ERGMs are models that attempt to explain network structure. The idea is to understand the processes that lead to the existence of ties in an observed network. In your ERGM, you specify configurations of interest (number of edges, number of reciprocal edges, numbers of triads of a specific type) as parameters and the model estimates coefficients for these parameters given the observed network. The coefficients can be interpreted as whether one observes more (positive coefficient) or less (negative coefficient) of a specific configuration in the observed network than expected in a set of comparable random graphs. For example, if 2 nodes are more likely to be connected because they share characteristic A, you will find a positive coefficient for the homophily effect for characteristic A.
This description is voluntarily non-technical, detailed technical explanation are available in the following book:
Lusher, D., Koskinen, J. and Robins, G. eds., 2013. Exponential random graph models for social networks: Theory, methods, and applications. Cambridge University Press.
R has several packages for the estimation of ERGMs. The ergm package has well developed vignettes with example applications.
The journal Social Networks has published a number of papers using ERGMs in analysis.
|
Statistical test to identify enriched edges in a network
The type of modelling approach that you are describing looks a lot like what exponential random graph models (ERGM) are doing.
In essence, ERGMs are models that attempt to explain network structure.
|
43,381
|
Help understanding a paragraph in Kadane's book Principles of uncertainty
|
There is usually some equation in the book relating to these variables: s,l,A can you add that information for clarity?
I believe that A not being an element of $s_i$ means that if you were to create a ven diagram A would not fall into the category of event indicators enclosed by $s_i$
$s^′_i$ seems to just be a notation that it was produced with the pair of event indicators $s_i\ and\ A$ and not to be confused with $s_i$ or it could be a derivation, if an equation is provided it could help clarify this for me.
|
Help understanding a paragraph in Kadane's book Principles of uncertainty
|
There is usually some equation in the book relating to these variables: s,l,A can you add that information for clarity?
I believe that A not being an element of $s_i$ means that if you were to create
|
Help understanding a paragraph in Kadane's book Principles of uncertainty
There is usually some equation in the book relating to these variables: s,l,A can you add that information for clarity?
I believe that A not being an element of $s_i$ means that if you were to create a ven diagram A would not fall into the category of event indicators enclosed by $s_i$
$s^′_i$ seems to just be a notation that it was produced with the pair of event indicators $s_i\ and\ A$ and not to be confused with $s_i$ or it could be a derivation, if an equation is provided it could help clarify this for me.
|
Help understanding a paragraph in Kadane's book Principles of uncertainty
There is usually some equation in the book relating to these variables: s,l,A can you add that information for clarity?
I believe that A not being an element of $s_i$ means that if you were to create
|
43,382
|
Which is the Recommended variants of neural network for tree like data structures?
|
You might be in interested in, in contrast to a recurrent neural network, a recursive neural network, which
[applies] the same set of weights recursively over a structure, to produce a structured prediction over variable-size input structures, or a scalar prediction on it, by traversing a given structure in topological order ... introduced to learn distributed representations of structure.
You may also be interested in parsing in general, in which tree structures are inferred for sentences, for example. Each tree structure follows certain rules specified by some grammar.
One paper that might be of interest is aclweb.org/anthology/P/P13/P13-1045.pdf
I have not used them myself, but it appears that there are implementations in pytorch (https://devblogs.nvidia.com/parallelforall/recursive-neural-networks-pytorch/) and tensorflow (https://www.kdnuggets.com/2016/06/recursive-neural-networks-tensorflow.html).
|
Which is the Recommended variants of neural network for tree like data structures?
|
You might be in interested in, in contrast to a recurrent neural network, a recursive neural network, which
[applies] the same set of weights recursively over a structure, to produce a structured pre
|
Which is the Recommended variants of neural network for tree like data structures?
You might be in interested in, in contrast to a recurrent neural network, a recursive neural network, which
[applies] the same set of weights recursively over a structure, to produce a structured prediction over variable-size input structures, or a scalar prediction on it, by traversing a given structure in topological order ... introduced to learn distributed representations of structure.
You may also be interested in parsing in general, in which tree structures are inferred for sentences, for example. Each tree structure follows certain rules specified by some grammar.
One paper that might be of interest is aclweb.org/anthology/P/P13/P13-1045.pdf
I have not used them myself, but it appears that there are implementations in pytorch (https://devblogs.nvidia.com/parallelforall/recursive-neural-networks-pytorch/) and tensorflow (https://www.kdnuggets.com/2016/06/recursive-neural-networks-tensorflow.html).
|
Which is the Recommended variants of neural network for tree like data structures?
You might be in interested in, in contrast to a recurrent neural network, a recursive neural network, which
[applies] the same set of weights recursively over a structure, to produce a structured pre
|
43,383
|
Which is the Recommended variants of neural network for tree like data structures?
|
There is this paper on Neural Decision Trees. Where the decision tree is the network structure and each node is a perceptron. I also seem to call another paper by researchers in China that made headlines within the last 6 months but what I read about that one was that is was mostly hype.
|
Which is the Recommended variants of neural network for tree like data structures?
|
There is this paper on Neural Decision Trees. Where the decision tree is the network structure and each node is a perceptron. I also seem to call another paper by researchers in China that made headli
|
Which is the Recommended variants of neural network for tree like data structures?
There is this paper on Neural Decision Trees. Where the decision tree is the network structure and each node is a perceptron. I also seem to call another paper by researchers in China that made headlines within the last 6 months but what I read about that one was that is was mostly hype.
|
Which is the Recommended variants of neural network for tree like data structures?
There is this paper on Neural Decision Trees. Where the decision tree is the network structure and each node is a perceptron. I also seem to call another paper by researchers in China that made headli
|
43,384
|
Which adaptive Metropolis Hastings algorithm is implemented in R package MHadaptive?
|
Your description sounds like Haario et al (1999)'s adaptive algorithm. The idea there is indeed to update the covariance matrix of the proposal distribution using a fixed number of recent samples.
Note that the algorithm described in Haario et al (1999) performs well, but is NOT ergodic. Haario et al (2001) described an improved algorithm that's ergodic. The idea there is to update the covariance matrix of the proposal distribution using all past samples.
|
Which adaptive Metropolis Hastings algorithm is implemented in R package MHadaptive?
|
Your description sounds like Haario et al (1999)'s adaptive algorithm. The idea there is indeed to update the covariance matrix of the proposal distribution using a fixed number of recent samples.
Not
|
Which adaptive Metropolis Hastings algorithm is implemented in R package MHadaptive?
Your description sounds like Haario et al (1999)'s adaptive algorithm. The idea there is indeed to update the covariance matrix of the proposal distribution using a fixed number of recent samples.
Note that the algorithm described in Haario et al (1999) performs well, but is NOT ergodic. Haario et al (2001) described an improved algorithm that's ergodic. The idea there is to update the covariance matrix of the proposal distribution using all past samples.
|
Which adaptive Metropolis Hastings algorithm is implemented in R package MHadaptive?
Your description sounds like Haario et al (1999)'s adaptive algorithm. The idea there is indeed to update the covariance matrix of the proposal distribution using a fixed number of recent samples.
Not
|
43,385
|
Unconditional distribution of ARMA process with t-student errors
|
The ARMA model is within the general class of linear models where your observable vector is a linear function of an underlying vector of IID error terms. Consider the general linear model form with IID errors following a T-distribution:
$$Y_t = \sum_{k=0}^\infty A_k \varepsilon_{t-k} \quad \quad \quad \varepsilon_k \sim \text{IID Student T}(\text{df} = \nu). \quad \quad \quad \quad$$
One of the useful properties of the Student's T-distribution is that it can be written as a mixture of normal with a gamma-distributed precision parameter. With this representation, the above model form can be written equivalently as:
$$Y_t = \sum_{k=0}^\infty \frac{A_k \epsilon_{t-k}}{\sqrt{\lambda_k}} \quad \quad \quad \epsilon_k \sim \text{IID N}(0, 1) \quad \lambda_k \sim \text{Gamma}(\tfrac{\nu}{2}, \tfrac{\nu}{2}).$$
You can see from this form that the value $Y_t$ is a sum of independent terms which are each ratios of normal random variables and gamma random variables (giving scaled T random variables). The difference between the present model and the standard Gaussian linear model is the presence of the denominator terms in the sum. (In the standard Gaussian case we have fixed $\lambda = \lambda_k$.)
The distribution for this quantity is a complicated convolution, but the CLT ensures that it converges to normality under mild conditions. It is possible to simulate the distribution by applying the random root-gamma denominators to the summation terms, which gives a bit more variability to the quantity than occurs in the standard Gaussian linear model.
|
Unconditional distribution of ARMA process with t-student errors
|
The ARMA model is within the general class of linear models where your observable vector is a linear function of an underlying vector of IID error terms. Consider the general linear model form with I
|
Unconditional distribution of ARMA process with t-student errors
The ARMA model is within the general class of linear models where your observable vector is a linear function of an underlying vector of IID error terms. Consider the general linear model form with IID errors following a T-distribution:
$$Y_t = \sum_{k=0}^\infty A_k \varepsilon_{t-k} \quad \quad \quad \varepsilon_k \sim \text{IID Student T}(\text{df} = \nu). \quad \quad \quad \quad$$
One of the useful properties of the Student's T-distribution is that it can be written as a mixture of normal with a gamma-distributed precision parameter. With this representation, the above model form can be written equivalently as:
$$Y_t = \sum_{k=0}^\infty \frac{A_k \epsilon_{t-k}}{\sqrt{\lambda_k}} \quad \quad \quad \epsilon_k \sim \text{IID N}(0, 1) \quad \lambda_k \sim \text{Gamma}(\tfrac{\nu}{2}, \tfrac{\nu}{2}).$$
You can see from this form that the value $Y_t$ is a sum of independent terms which are each ratios of normal random variables and gamma random variables (giving scaled T random variables). The difference between the present model and the standard Gaussian linear model is the presence of the denominator terms in the sum. (In the standard Gaussian case we have fixed $\lambda = \lambda_k$.)
The distribution for this quantity is a complicated convolution, but the CLT ensures that it converges to normality under mild conditions. It is possible to simulate the distribution by applying the random root-gamma denominators to the summation terms, which gives a bit more variability to the quantity than occurs in the standard Gaussian linear model.
|
Unconditional distribution of ARMA process with t-student errors
The ARMA model is within the general class of linear models where your observable vector is a linear function of an underlying vector of IID error terms. Consider the general linear model form with I
|
43,386
|
Is this also a *necessary* condition to be a Bayes estimator, or only a sufficient one?
|
First, if the condition$$\delta_{\Lambda} = \arg\min \mathbb{E}\left[ L(\Theta, \delta(X))| X = x \right]$$ holds almost surely in $x$, the same argument applies. Hence, the Bayes estimator is defined almost surely and hence can arbitrarily vary on an arbitrary set of measure zero.
Second, there are situations where there are multiple Bayes estimators. For instance, here is an exercise from my book:
2.40 Consider $\pi(\theta) = (1/3)(\mathscr{U}_{[0,1]}(\theta)+\mathscr{U}_{[2,3]}(\theta)+\mathscr{U}_{[4,5]}(\theta))$
and $f(x|\theta) = \theta e^{-\theta x}$. Show that, under the loss
(2.5.4), for every $x$, there exist values of $k_1$ and $k_2$ such
that the Bayes estimator is not unique.
where the loss (2.5.4) is
\begin{eqnarray}
\mathrm{L}_{k_1,k_2} (\theta ,d) = \begin{cases} k_2(\theta -d) &
\text{if }\theta > d, \cr
k_1(d-\theta ) &\text{otherwise.} \cr\end{cases}
\end{eqnarray}
Third, when the Bayes risk $\min \operatorname{BR}(\Lambda,\delta)$ is infinite, any estimator is a Bayes estimator.
|
Is this also a *necessary* condition to be a Bayes estimator, or only a sufficient one?
|
First, if the condition$$\delta_{\Lambda} = \arg\min \mathbb{E}\left[ L(\Theta, \delta(X))| X = x \right]$$ holds almost surely in $x$, the same argument applies. Hence, the Bayes estimator is define
|
Is this also a *necessary* condition to be a Bayes estimator, or only a sufficient one?
First, if the condition$$\delta_{\Lambda} = \arg\min \mathbb{E}\left[ L(\Theta, \delta(X))| X = x \right]$$ holds almost surely in $x$, the same argument applies. Hence, the Bayes estimator is defined almost surely and hence can arbitrarily vary on an arbitrary set of measure zero.
Second, there are situations where there are multiple Bayes estimators. For instance, here is an exercise from my book:
2.40 Consider $\pi(\theta) = (1/3)(\mathscr{U}_{[0,1]}(\theta)+\mathscr{U}_{[2,3]}(\theta)+\mathscr{U}_{[4,5]}(\theta))$
and $f(x|\theta) = \theta e^{-\theta x}$. Show that, under the loss
(2.5.4), for every $x$, there exist values of $k_1$ and $k_2$ such
that the Bayes estimator is not unique.
where the loss (2.5.4) is
\begin{eqnarray}
\mathrm{L}_{k_1,k_2} (\theta ,d) = \begin{cases} k_2(\theta -d) &
\text{if }\theta > d, \cr
k_1(d-\theta ) &\text{otherwise.} \cr\end{cases}
\end{eqnarray}
Third, when the Bayes risk $\min \operatorname{BR}(\Lambda,\delta)$ is infinite, any estimator is a Bayes estimator.
|
Is this also a *necessary* condition to be a Bayes estimator, or only a sufficient one?
First, if the condition$$\delta_{\Lambda} = \arg\min \mathbb{E}\left[ L(\Theta, \delta(X))| X = x \right]$$ holds almost surely in $x$, the same argument applies. Hence, the Bayes estimator is define
|
43,387
|
How do bias, variance and overfitting relate to each other? [closed]
|
As for number 3:
Model with eta = 0.9 clearly shows overfitting, as the more it is trained, the more it is able to predict the training set and the more it is unable to predict the testing set. I can only think model with eta = 0.1 is underfitting because compared to other eta values, it performs the worse. Not only it shows about the same test error trend with eta 0.5, but it also shows worse training error.
Note that the small perturbation in test error is quite normal (and can be caused by and treated as randomness) as long as it does not show increasing trend like in model with eta = 0.9
As for number 5:
The judgment whether reduction 0.3% in error is worth the cost of model complexity depends on practical use. If I were to choose, given some arbitrary context that I don't really know about, I'd pick the first because personally I think reduction of 0.3% in error does not justify adding 5 more depth to the tree and therefore creating unstable prediction. Of course, "negligible" varies from one application to another.
|
How do bias, variance and overfitting relate to each other? [closed]
|
As for number 3:
Model with eta = 0.9 clearly shows overfitting, as the more it is trained, the more it is able to predict the training set and the more it is unable to predict the testing set. I can
|
How do bias, variance and overfitting relate to each other? [closed]
As for number 3:
Model with eta = 0.9 clearly shows overfitting, as the more it is trained, the more it is able to predict the training set and the more it is unable to predict the testing set. I can only think model with eta = 0.1 is underfitting because compared to other eta values, it performs the worse. Not only it shows about the same test error trend with eta 0.5, but it also shows worse training error.
Note that the small perturbation in test error is quite normal (and can be caused by and treated as randomness) as long as it does not show increasing trend like in model with eta = 0.9
As for number 5:
The judgment whether reduction 0.3% in error is worth the cost of model complexity depends on practical use. If I were to choose, given some arbitrary context that I don't really know about, I'd pick the first because personally I think reduction of 0.3% in error does not justify adding 5 more depth to the tree and therefore creating unstable prediction. Of course, "negligible" varies from one application to another.
|
How do bias, variance and overfitting relate to each other? [closed]
As for number 3:
Model with eta = 0.9 clearly shows overfitting, as the more it is trained, the more it is able to predict the training set and the more it is unable to predict the testing set. I can
|
43,388
|
How do bias, variance and overfitting relate to each other? [closed]
|
In ML we want to follow Occam's razor. Prefer low complexity over high complexity, because we assume that we will perform better on new unseen data, if we have a less complex model (less overfitting). But there is of course also underfitting! So if you can show that a more complex model can outperform a less complex model on new data, then you should go with the more complicated model.
And to clarify bias, variance and overfitting:
Bias is high if you have underfitted. You have a weak performance on train, test and validation sets.
Variance is high if you have overfitted. Performance is good on training data and drops visibly on new unseen data.
Obviously this was a pretty quick summary. It always depends what a good and bad performance is, but I hope you got my point.
|
How do bias, variance and overfitting relate to each other? [closed]
|
In ML we want to follow Occam's razor. Prefer low complexity over high complexity, because we assume that we will perform better on new unseen data, if we have a less complex model (less overfitting).
|
How do bias, variance and overfitting relate to each other? [closed]
In ML we want to follow Occam's razor. Prefer low complexity over high complexity, because we assume that we will perform better on new unseen data, if we have a less complex model (less overfitting). But there is of course also underfitting! So if you can show that a more complex model can outperform a less complex model on new data, then you should go with the more complicated model.
And to clarify bias, variance and overfitting:
Bias is high if you have underfitted. You have a weak performance on train, test and validation sets.
Variance is high if you have overfitted. Performance is good on training data and drops visibly on new unseen data.
Obviously this was a pretty quick summary. It always depends what a good and bad performance is, but I hope you got my point.
|
How do bias, variance and overfitting relate to each other? [closed]
In ML we want to follow Occam's razor. Prefer low complexity over high complexity, because we assume that we will perform better on new unseen data, if we have a less complex model (less overfitting).
|
43,389
|
How do bias, variance and overfitting relate to each other? [closed]
|
As for number 2
You are correct in your intuition in that the two concerns you raise elude to slightly different things.
In your first instance, the recommendation to choose a simpler model to avoid over-fitting, refers to the over-fitting of the models parameters - the things a model learns based on the training data. A more complex model will be more prone to 'memorising' the training data, thus lacking generalisability.
In your second instance, the recommendation to test parameters on the validation set refers to over-fitting hyper-parameters. These are the 'dials' you as a researcher can tweak to try to get the best out of the model. However, how do you know you haven't just optimised these to your test set by picking the one with the best test score? Add a validation set to see which model (i.e. set of hyper-parameters) does best, then check this against the test set. In your case the tree depth and regularisation parameters are both hyper-parameters. It's only needed if you are selecting from several models.
I found this discussion helpful when I was looking at this.
|
How do bias, variance and overfitting relate to each other? [closed]
|
As for number 2
You are correct in your intuition in that the two concerns you raise elude to slightly different things.
In your first instance, the recommendation to choose a simpler model to avoid o
|
How do bias, variance and overfitting relate to each other? [closed]
As for number 2
You are correct in your intuition in that the two concerns you raise elude to slightly different things.
In your first instance, the recommendation to choose a simpler model to avoid over-fitting, refers to the over-fitting of the models parameters - the things a model learns based on the training data. A more complex model will be more prone to 'memorising' the training data, thus lacking generalisability.
In your second instance, the recommendation to test parameters on the validation set refers to over-fitting hyper-parameters. These are the 'dials' you as a researcher can tweak to try to get the best out of the model. However, how do you know you haven't just optimised these to your test set by picking the one with the best test score? Add a validation set to see which model (i.e. set of hyper-parameters) does best, then check this against the test set. In your case the tree depth and regularisation parameters are both hyper-parameters. It's only needed if you are selecting from several models.
I found this discussion helpful when I was looking at this.
|
How do bias, variance and overfitting relate to each other? [closed]
As for number 2
You are correct in your intuition in that the two concerns you raise elude to slightly different things.
In your first instance, the recommendation to choose a simpler model to avoid o
|
43,390
|
Should random effects be included in fitted values when making a binned residual plot for a binomial GLMM?
|
In short, predictions should be made based on fixed effects only, otherwise you can get spurious patterns. This is highly reproducible and probably due to the regularisation bias of the REs.
Simulations to show this with some further comments here
p.s.: Have a look at the DHARMa residual checks for GLMMs, I think this works better than the binning option (disclaimer: I'm the developer)
|
Should random effects be included in fitted values when making a binned residual plot for a binomial
|
In short, predictions should be made based on fixed effects only, otherwise you can get spurious patterns. This is highly reproducible and probably due to the regularisation bias of the REs.
Simulati
|
Should random effects be included in fitted values when making a binned residual plot for a binomial GLMM?
In short, predictions should be made based on fixed effects only, otherwise you can get spurious patterns. This is highly reproducible and probably due to the regularisation bias of the REs.
Simulations to show this with some further comments here
p.s.: Have a look at the DHARMa residual checks for GLMMs, I think this works better than the binning option (disclaimer: I'm the developer)
|
Should random effects be included in fitted values when making a binned residual plot for a binomial
In short, predictions should be made based on fixed effects only, otherwise you can get spurious patterns. This is highly reproducible and probably due to the regularisation bias of the REs.
Simulati
|
43,391
|
Distribution of sampling without replacement
|
Assume the item weights $W = \{w(1), \dots, w(N)\}$ are nonnegative and sum to one. Let $X=\{x_1, \dots, x_N\}$ denote a particular sequence, where $x_i$ is an integer from 1 to $N$ representing the index of the $i$th item drawn. Let $X_{i:j} = \{x_i, \dots, x_j\}$ denote a particular subsequnce. The probability of a sequence can be written as:
$$p(X \mid W) = p(x_1 \mid W) \prod_{i=2}^N p(x_i \mid X_{1:i-1}, W)$$
$p(x_1 \mid W)$ is the probability for the first item drawn. This is simply the item's weight:
$$p(x_1 \mid W) = w(x_1)$$
For subsequent draws ($i \ge 2$), $p(x_i \mid X_{1:i-1}, W)$ is the conditional probability of the $i$th item drawn, given all previously drawn items. It can be expressed as follows. The probability of drawing an item is zero if it has already been drawn. Otherwise, it's equal to the item's weight, divided by the sum of weights for all remaining items. This sum is equal to one minus the sum of weights for previously drawn items. Therefore:
$$p(x_i \mid X_{1:i-1}, W) =
\frac{w(x_i)}{1 - \sum_{j=1}^{i-1} w(x_j)}
\prod_{j=1}^{i-1} \mathcal{I}(x_i \ne x_j)$$
where $\mathcal{I}(\cdot)$ is the indicator function, which returns 1 if its argument is true, otherwise 0. Note that the product of indicator functions evaluates to one if and only if $x_i$ isn't a duplicate of previous items.
Final answer
Combine everything above to obtain the following. Sequences containing duplicate items have probability 0. Otherwise, if there are no duplicates:
$$p(X \mid W) = w(x_1) \prod_{i=2}^N \frac{w(x_i)}{1 - \sum_{j=1}^{i-1} w(x_j)}$$
|
Distribution of sampling without replacement
|
Assume the item weights $W = \{w(1), \dots, w(N)\}$ are nonnegative and sum to one. Let $X=\{x_1, \dots, x_N\}$ denote a particular sequence, where $x_i$ is an integer from 1 to $N$ representing the i
|
Distribution of sampling without replacement
Assume the item weights $W = \{w(1), \dots, w(N)\}$ are nonnegative and sum to one. Let $X=\{x_1, \dots, x_N\}$ denote a particular sequence, where $x_i$ is an integer from 1 to $N$ representing the index of the $i$th item drawn. Let $X_{i:j} = \{x_i, \dots, x_j\}$ denote a particular subsequnce. The probability of a sequence can be written as:
$$p(X \mid W) = p(x_1 \mid W) \prod_{i=2}^N p(x_i \mid X_{1:i-1}, W)$$
$p(x_1 \mid W)$ is the probability for the first item drawn. This is simply the item's weight:
$$p(x_1 \mid W) = w(x_1)$$
For subsequent draws ($i \ge 2$), $p(x_i \mid X_{1:i-1}, W)$ is the conditional probability of the $i$th item drawn, given all previously drawn items. It can be expressed as follows. The probability of drawing an item is zero if it has already been drawn. Otherwise, it's equal to the item's weight, divided by the sum of weights for all remaining items. This sum is equal to one minus the sum of weights for previously drawn items. Therefore:
$$p(x_i \mid X_{1:i-1}, W) =
\frac{w(x_i)}{1 - \sum_{j=1}^{i-1} w(x_j)}
\prod_{j=1}^{i-1} \mathcal{I}(x_i \ne x_j)$$
where $\mathcal{I}(\cdot)$ is the indicator function, which returns 1 if its argument is true, otherwise 0. Note that the product of indicator functions evaluates to one if and only if $x_i$ isn't a duplicate of previous items.
Final answer
Combine everything above to obtain the following. Sequences containing duplicate items have probability 0. Otherwise, if there are no duplicates:
$$p(X \mid W) = w(x_1) \prod_{i=2}^N \frac{w(x_i)}{1 - \sum_{j=1}^{i-1} w(x_j)}$$
|
Distribution of sampling without replacement
Assume the item weights $W = \{w(1), \dots, w(N)\}$ are nonnegative and sum to one. Let $X=\{x_1, \dots, x_N\}$ denote a particular sequence, where $x_i$ is an integer from 1 to $N$ representing the i
|
43,392
|
Distribution of sampling without replacement
|
I'm working on a similar problem. This is not a direct answer to your question but maybe it's close enough that it gives you some ideas about how to start.
My weights form an exponential (specifically, log-linear) family $w_i = \exp(\beta^\top a_i)/Z(\beta)$, where $Z(\beta) = 1 + \exp(\beta^\top a_i)$, $\beta$ is the vector of natural parameters, and $a_i$ is the $i$th column of the design matrix.
In my model, you first select $W = w$ uniformly at random from $\{0, 1, \ldots, N\}$, and then sample $w$ of the $N$ items without replacement according to the weights $w_i$ until you have collected $w$ of them. I believe the distribution of the set $x$ of items you collect this way is $\exp(\beta^\top \sum_{i \in x}a_i)/(N Z_w(\beta))$, where
$$Z_w(\beta) = \sum_{\substack{y \in \{0, 1\}^N \\ |y| = w}} \exp\left(\beta^\top \sum_{i \in y}a_i\right).$$
The marginal distribution is still $w_i$, but the samples are not independent, with that $1/N$ factor from the joint distribution turning into a
$$\frac{N - j - 1}{N - j}$$
factor in the probability of choosing the $(j+1)$th item when you condition on having already selected $j$ items. When you multiply out the successive conditional probabilities to get back to the joint probability, you end up with a factor of
$$
\frac{(N - 1)!}{N!} = \frac{1}{N}
$$
as you would want.
|
Distribution of sampling without replacement
|
I'm working on a similar problem. This is not a direct answer to your question but maybe it's close enough that it gives you some ideas about how to start.
My weights form an exponential (specifically
|
Distribution of sampling without replacement
I'm working on a similar problem. This is not a direct answer to your question but maybe it's close enough that it gives you some ideas about how to start.
My weights form an exponential (specifically, log-linear) family $w_i = \exp(\beta^\top a_i)/Z(\beta)$, where $Z(\beta) = 1 + \exp(\beta^\top a_i)$, $\beta$ is the vector of natural parameters, and $a_i$ is the $i$th column of the design matrix.
In my model, you first select $W = w$ uniformly at random from $\{0, 1, \ldots, N\}$, and then sample $w$ of the $N$ items without replacement according to the weights $w_i$ until you have collected $w$ of them. I believe the distribution of the set $x$ of items you collect this way is $\exp(\beta^\top \sum_{i \in x}a_i)/(N Z_w(\beta))$, where
$$Z_w(\beta) = \sum_{\substack{y \in \{0, 1\}^N \\ |y| = w}} \exp\left(\beta^\top \sum_{i \in y}a_i\right).$$
The marginal distribution is still $w_i$, but the samples are not independent, with that $1/N$ factor from the joint distribution turning into a
$$\frac{N - j - 1}{N - j}$$
factor in the probability of choosing the $(j+1)$th item when you condition on having already selected $j$ items. When you multiply out the successive conditional probabilities to get back to the joint probability, you end up with a factor of
$$
\frac{(N - 1)!}{N!} = \frac{1}{N}
$$
as you would want.
|
Distribution of sampling without replacement
I'm working on a similar problem. This is not a direct answer to your question but maybe it's close enough that it gives you some ideas about how to start.
My weights form an exponential (specifically
|
43,393
|
P-values and likelihood principle
|
Your intuition seems reasonable here, but it is worth stating things more precisely. So long as the p-value for the test is not a function of a sufficient statistic, the sufficiency principle is breached. For the conditionality principle, things are a bit trickier. The conditionality principle was originally described by Birnbaum as follows:
...the evidential meaning of any outcome of any experiment is the same as that of the corresponding outcome of the corresponding component experiment, ignoring the overall structure of the mixture experiment. [This] may be described informally as asserting the "irrelevance of (component) experiments not actually performed." (Birnbaum 1962, p. 271).
Whether or not this principle is breached by a classical hypothesis test (using a p-value as its evidentiary measure) really depends on whether or not the experiment leading to the test can be framed as a mixture of smaller component experiments, which occur conditionally on some initial results. If the experiment can be framed in this way, the p-value will depend on component experiments not performed, through the fact that it will include the probability of outcomes in these experiments that are at least as conducive to the alternative as the actual outcome of the experimental component that was performed. This would be a breach of the conditionality principle, often in addition to breaching the sufficiency condition.
|
P-values and likelihood principle
|
Your intuition seems reasonable here, but it is worth stating things more precisely. So long as the p-value for the test is not a function of a sufficient statistic, the sufficiency principle is brea
|
P-values and likelihood principle
Your intuition seems reasonable here, but it is worth stating things more precisely. So long as the p-value for the test is not a function of a sufficient statistic, the sufficiency principle is breached. For the conditionality principle, things are a bit trickier. The conditionality principle was originally described by Birnbaum as follows:
...the evidential meaning of any outcome of any experiment is the same as that of the corresponding outcome of the corresponding component experiment, ignoring the overall structure of the mixture experiment. [This] may be described informally as asserting the "irrelevance of (component) experiments not actually performed." (Birnbaum 1962, p. 271).
Whether or not this principle is breached by a classical hypothesis test (using a p-value as its evidentiary measure) really depends on whether or not the experiment leading to the test can be framed as a mixture of smaller component experiments, which occur conditionally on some initial results. If the experiment can be framed in this way, the p-value will depend on component experiments not performed, through the fact that it will include the probability of outcomes in these experiments that are at least as conducive to the alternative as the actual outcome of the experimental component that was performed. This would be a breach of the conditionality principle, often in addition to breaching the sufficiency condition.
|
P-values and likelihood principle
Your intuition seems reasonable here, but it is worth stating things more precisely. So long as the p-value for the test is not a function of a sufficient statistic, the sufficiency principle is brea
|
43,394
|
CNN + LSTM in tensorflow
|
CNN + RNN possible. To understand let me try to post commented code. CNN running of chars of sentences and output of CNN merged with word embedding is feed to LSTM
N - number of batches
M - number of examples
L - number of sentence length
W - max length of characters in any word
coz - cnn char output size
Consider x = [N, M, L] - Word level
Consider cnnx = [N, M, L, W] - character level
Aim is to use character and word embedding in LSTM
CNNx = tf.nn.embedding_lookup(emb_mat, cnnx) [N, M, L, W, dc]
filter_sizes = [100]
heights = [5]
outs = []
for filter_size, height in zip(filter_sizes, heights):
num_channels = 3
filter_ = [1, height, num_channels, filter_size]
strides = [1, 1, 1, 1]
xxc = tf.nn.conv2d(Acx, filter_, strides, "VALID") # [N*M, L, W/stride, d]
out = tf.reduce_max(tf.nn.relu(xxc), 2) # [-1, L, d]
outs.append(xxc)
concat_out = tf.concat(2, outs)
xx = tf.reshape(concat_out, [-1, M, L, coz])
Ax = tf.nn.embedding_lookup(emb_mat, x)
xx = tf.concat(3, [xx, Ax]) # [N, M, L, di]
This xx we can feed to RNN with LSTM
|
CNN + LSTM in tensorflow
|
CNN + RNN possible. To understand let me try to post commented code. CNN running of chars of sentences and output of CNN merged with word embedding is feed to LSTM
N - number of batches
M - number o
|
CNN + LSTM in tensorflow
CNN + RNN possible. To understand let me try to post commented code. CNN running of chars of sentences and output of CNN merged with word embedding is feed to LSTM
N - number of batches
M - number of examples
L - number of sentence length
W - max length of characters in any word
coz - cnn char output size
Consider x = [N, M, L] - Word level
Consider cnnx = [N, M, L, W] - character level
Aim is to use character and word embedding in LSTM
CNNx = tf.nn.embedding_lookup(emb_mat, cnnx) [N, M, L, W, dc]
filter_sizes = [100]
heights = [5]
outs = []
for filter_size, height in zip(filter_sizes, heights):
num_channels = 3
filter_ = [1, height, num_channels, filter_size]
strides = [1, 1, 1, 1]
xxc = tf.nn.conv2d(Acx, filter_, strides, "VALID") # [N*M, L, W/stride, d]
out = tf.reduce_max(tf.nn.relu(xxc), 2) # [-1, L, d]
outs.append(xxc)
concat_out = tf.concat(2, outs)
xx = tf.reshape(concat_out, [-1, M, L, coz])
Ax = tf.nn.embedding_lookup(emb_mat, x)
xx = tf.concat(3, [xx, Ax]) # [N, M, L, di]
This xx we can feed to RNN with LSTM
|
CNN + LSTM in tensorflow
CNN + RNN possible. To understand let me try to post commented code. CNN running of chars of sentences and output of CNN merged with word embedding is feed to LSTM
N - number of batches
M - number o
|
43,395
|
CNN + LSTM in tensorflow
|
Check out https://github.com/NLeSC/mcfly, it helps to search and configure best architecture for deep cnn+lstm. You may check the source to learn.
|
CNN + LSTM in tensorflow
|
Check out https://github.com/NLeSC/mcfly, it helps to search and configure best architecture for deep cnn+lstm. You may check the source to learn.
|
CNN + LSTM in tensorflow
Check out https://github.com/NLeSC/mcfly, it helps to search and configure best architecture for deep cnn+lstm. You may check the source to learn.
|
CNN + LSTM in tensorflow
Check out https://github.com/NLeSC/mcfly, it helps to search and configure best architecture for deep cnn+lstm. You may check the source to learn.
|
43,396
|
What is the difference between Online Learning Algorithms and Streaming Learning Algorithms?
|
An example of an online algorithm application would be investing, where you have to reconsider the investment decision upon the arrival of new data. You cannot defer this decision and you cannot revise old decisions. I am not familiar with streaming algorithms, but it seems (based on your professor's slides) that data compression is a fair example where a file can be scanned multiple times to determine an approximately optimal compression codebook, but it is still infeasible (because of memory requirements) to analyze the entire file offline.
|
What is the difference between Online Learning Algorithms and Streaming Learning Algorithms?
|
An example of an online algorithm application would be investing, where you have to reconsider the investment decision upon the arrival of new data. You cannot defer this decision and you cannot revis
|
What is the difference between Online Learning Algorithms and Streaming Learning Algorithms?
An example of an online algorithm application would be investing, where you have to reconsider the investment decision upon the arrival of new data. You cannot defer this decision and you cannot revise old decisions. I am not familiar with streaming algorithms, but it seems (based on your professor's slides) that data compression is a fair example where a file can be scanned multiple times to determine an approximately optimal compression codebook, but it is still infeasible (because of memory requirements) to analyze the entire file offline.
|
What is the difference between Online Learning Algorithms and Streaming Learning Algorithms?
An example of an online algorithm application would be investing, where you have to reconsider the investment decision upon the arrival of new data. You cannot defer this decision and you cannot revis
|
43,397
|
Comparing two multinomial distributions
|
I believe the best test for your data is the multinomial test, which you already estimated.
For a "measure" of the difference between the expected and observed distributions, consider the Kullback-Leibler Divergence. For your first experiment:
require(entropy)
cv <- d[1:4,]
set.seed(42)
probs <- cv$freq_pred/20
cv$freq_exp <- table(sample(c(1:4), 10000, prob=probs, replace=T))
KL.empirical(cv$freq_exp, cv$freq_obs)
The KL Divergence is 0.072. If 0, the 2nd distribution is similar to the 1st distribution. If 1, the 2nd distribution is less related to the 1st distribution. More here for a finer interpretation based in information theory.
|
Comparing two multinomial distributions
|
I believe the best test for your data is the multinomial test, which you already estimated.
For a "measure" of the difference between the expected and observed distributions, consider the Kullback-Lei
|
Comparing two multinomial distributions
I believe the best test for your data is the multinomial test, which you already estimated.
For a "measure" of the difference between the expected and observed distributions, consider the Kullback-Leibler Divergence. For your first experiment:
require(entropy)
cv <- d[1:4,]
set.seed(42)
probs <- cv$freq_pred/20
cv$freq_exp <- table(sample(c(1:4), 10000, prob=probs, replace=T))
KL.empirical(cv$freq_exp, cv$freq_obs)
The KL Divergence is 0.072. If 0, the 2nd distribution is similar to the 1st distribution. If 1, the 2nd distribution is less related to the 1st distribution. More here for a finer interpretation based in information theory.
|
Comparing two multinomial distributions
I believe the best test for your data is the multinomial test, which you already estimated.
For a "measure" of the difference between the expected and observed distributions, consider the Kullback-Lei
|
43,398
|
Expected squared distance from origin of training points vs. test points
|
The relevant quote from page 23 of Elements of Statistics: "Hence most data points are closer to the boundary
of the sample space than to any other data point. The reason that this
presents a problem is that prediction is much more difficult near the edges
of the training sample. One must extrapolate from neighboring sample
points rather than interpolate between them."
If $x_0$ is > 3 standard deviations from the origin, that means that on average well under 1% of sample points will be further from the origin in the direction of $x_0$. So the sample size would have to be very large to avoid the problem of $x_0$ being at the edge of the sample.
|
Expected squared distance from origin of training points vs. test points
|
The relevant quote from page 23 of Elements of Statistics: "Hence most data points are closer to the boundary
of the sample space than to any other data point. The reason that this
presents a problem
|
Expected squared distance from origin of training points vs. test points
The relevant quote from page 23 of Elements of Statistics: "Hence most data points are closer to the boundary
of the sample space than to any other data point. The reason that this
presents a problem is that prediction is much more difficult near the edges
of the training sample. One must extrapolate from neighboring sample
points rather than interpolate between them."
If $x_0$ is > 3 standard deviations from the origin, that means that on average well under 1% of sample points will be further from the origin in the direction of $x_0$. So the sample size would have to be very large to avoid the problem of $x_0$ being at the edge of the sample.
|
Expected squared distance from origin of training points vs. test points
The relevant quote from page 23 of Elements of Statistics: "Hence most data points are closer to the boundary
of the sample space than to any other data point. The reason that this
presents a problem
|
43,399
|
Expected squared distance from origin of training points vs. test points
|
For the question "Why we are taking the unit vector projection of one point onto all the training points", it is easy to figure it out because when you make a prediction, the neighbors are chosen from training data which are close to the prediction point $x_0$. And the unit vector projection is the distance of training point $x_i$ to the prediction point $x_0$. So you can see that the training data in that direction have a much closer expected squared distance than the prediction point. So most prediction points see themselves as lying on the edge.
|
Expected squared distance from origin of training points vs. test points
|
For the question "Why we are taking the unit vector projection of one point onto all the training points", it is easy to figure it out because when you make a prediction, the neighbors are chosen from
|
Expected squared distance from origin of training points vs. test points
For the question "Why we are taking the unit vector projection of one point onto all the training points", it is easy to figure it out because when you make a prediction, the neighbors are chosen from training data which are close to the prediction point $x_0$. And the unit vector projection is the distance of training point $x_i$ to the prediction point $x_0$. So you can see that the training data in that direction have a much closer expected squared distance than the prediction point. So most prediction points see themselves as lying on the edge.
|
Expected squared distance from origin of training points vs. test points
For the question "Why we are taking the unit vector projection of one point onto all the training points", it is easy to figure it out because when you make a prediction, the neighbors are chosen from
|
43,400
|
Which binomial confidence interval is correct?
|
The Wilson score interval is a simple and accurate confidence interval for the binomial proportion parameter, that automatically adjusts near the boundaries of the range. The coverage properties of various intervals have been examined in Brown, Cai and DasGupta (2001) and this is one of the intervals they recommend as having good coverage properties.
The interval is constructed as follows. Suppose you observe $N_1$ "successes" and $N_0$ "failures" giving a total of $n=N_0+N_1$ data points. The Wilson score interval uses the normal approximation to give the following pivotal quantity:
$$\frac{(N_1 - n \theta)^2}{n\theta (1-\theta)} \overset{\text{Approx}}{\sim} \text{ChiSq}(1),$$
Letting $\chi_{\alpha}^2$ denote the critical point (upper tail area of $\alpha$) of the chi-squared distribution with one degree-of-freedom, and solving the resulting quadratic inequality for $\theta$, then gives the probability interval:
$$\begin{align}
1-\alpha
&\approx \mathbb{P} \Bigg( (N_1 - n \theta)^2 \leqslant n \theta (1-\theta) \cdot \chi_{\alpha}^2 \Bigg) \\[6pt]
&= \mathbb{P} \Bigg( \theta \in \Bigg[ \frac{2N_1 + \chi_{\alpha}^2}{2n + \chi_{\alpha}^2} \pm \frac{n \chi_{\alpha}}{n + \chi_{\alpha}^2} \sqrt{\frac{N_0 N_1}{n} + \frac{\chi_{\alpha}^2}{4}} \Bigg] \Bigg). \\[6pt]
\end{align}$$
Substitution of the observed values of $n_0$ and $n_1$ then gives the resulting confidence interval. This confidence interval is implemented in various functions. You can implement this interval in R using the CONF.prop function from the stat.extend package. Here is the interval you get with your data:
#Compute confidence interval using Wilson-score method
library(stat.extend)
CONF.prop(alpha = 0.05, sample.prop = 123/9876, n = 9876)
Confidence Interval (CI)
95.00% CI for proportion parameter for infinite population
Interval uses 9876 binary data points with sample proportion = 0.0125
[0.0104489771546811, 0.0148390256803883]
|
Which binomial confidence interval is correct?
|
The Wilson score interval is a simple and accurate confidence interval for the binomial proportion parameter, that automatically adjusts near the boundaries of the range. The coverage properties of v
|
Which binomial confidence interval is correct?
The Wilson score interval is a simple and accurate confidence interval for the binomial proportion parameter, that automatically adjusts near the boundaries of the range. The coverage properties of various intervals have been examined in Brown, Cai and DasGupta (2001) and this is one of the intervals they recommend as having good coverage properties.
The interval is constructed as follows. Suppose you observe $N_1$ "successes" and $N_0$ "failures" giving a total of $n=N_0+N_1$ data points. The Wilson score interval uses the normal approximation to give the following pivotal quantity:
$$\frac{(N_1 - n \theta)^2}{n\theta (1-\theta)} \overset{\text{Approx}}{\sim} \text{ChiSq}(1),$$
Letting $\chi_{\alpha}^2$ denote the critical point (upper tail area of $\alpha$) of the chi-squared distribution with one degree-of-freedom, and solving the resulting quadratic inequality for $\theta$, then gives the probability interval:
$$\begin{align}
1-\alpha
&\approx \mathbb{P} \Bigg( (N_1 - n \theta)^2 \leqslant n \theta (1-\theta) \cdot \chi_{\alpha}^2 \Bigg) \\[6pt]
&= \mathbb{P} \Bigg( \theta \in \Bigg[ \frac{2N_1 + \chi_{\alpha}^2}{2n + \chi_{\alpha}^2} \pm \frac{n \chi_{\alpha}}{n + \chi_{\alpha}^2} \sqrt{\frac{N_0 N_1}{n} + \frac{\chi_{\alpha}^2}{4}} \Bigg] \Bigg). \\[6pt]
\end{align}$$
Substitution of the observed values of $n_0$ and $n_1$ then gives the resulting confidence interval. This confidence interval is implemented in various functions. You can implement this interval in R using the CONF.prop function from the stat.extend package. Here is the interval you get with your data:
#Compute confidence interval using Wilson-score method
library(stat.extend)
CONF.prop(alpha = 0.05, sample.prop = 123/9876, n = 9876)
Confidence Interval (CI)
95.00% CI for proportion parameter for infinite population
Interval uses 9876 binary data points with sample proportion = 0.0125
[0.0104489771546811, 0.0148390256803883]
|
Which binomial confidence interval is correct?
The Wilson score interval is a simple and accurate confidence interval for the binomial proportion parameter, that automatically adjusts near the boundaries of the range. The coverage properties of v
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.