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
53,901
Not sure if standard error of p-values makes sense in Fisher Exact Test
You have correctly computed the variance of $f$, not the variance of $\hat{p}$. To estimate the variance of $\hat{p}$ just go one step further: $$\text{var}(\hat{p})= \text{var}\left(\frac{1}{N}\sum_{i=1}^{N}f(x_{i})\right) = \frac{1}{N} \text{var}(f). $$ Moreover, your formula simplifies greatly: it's an easy algebra...
Not sure if standard error of p-values makes sense in Fisher Exact Test
You have correctly computed the variance of $f$, not the variance of $\hat{p}$. To estimate the variance of $\hat{p}$ just go one step further: $$\text{var}(\hat{p})= \text{var}\left(\frac{1}{N}\sum_
Not sure if standard error of p-values makes sense in Fisher Exact Test You have correctly computed the variance of $f$, not the variance of $\hat{p}$. To estimate the variance of $\hat{p}$ just go one step further: $$\text{var}(\hat{p})= \text{var}\left(\frac{1}{N}\sum_{i=1}^{N}f(x_{i})\right) = \frac{1}{N} \text{var...
Not sure if standard error of p-values makes sense in Fisher Exact Test You have correctly computed the variance of $f$, not the variance of $\hat{p}$. To estimate the variance of $\hat{p}$ just go one step further: $$\text{var}(\hat{p})= \text{var}\left(\frac{1}{N}\sum_
53,902
Not sure if standard error of p-values makes sense in Fisher Exact Test
In general, if you are monte-carlo-ing a p-value, the only standard error that makes sense is the monte-carlo error in estimating it, and then only to show that you have done enough permutations. Under the null hypothesis, the p-value is just Uniform(0,1). Unless the p-value is really extreme, most people will be hap...
Not sure if standard error of p-values makes sense in Fisher Exact Test
In general, if you are monte-carlo-ing a p-value, the only standard error that makes sense is the monte-carlo error in estimating it, and then only to show that you have done enough permutations. Und
Not sure if standard error of p-values makes sense in Fisher Exact Test In general, if you are monte-carlo-ing a p-value, the only standard error that makes sense is the monte-carlo error in estimating it, and then only to show that you have done enough permutations. Under the null hypothesis, the p-value is just Unif...
Not sure if standard error of p-values makes sense in Fisher Exact Test In general, if you are monte-carlo-ing a p-value, the only standard error that makes sense is the monte-carlo error in estimating it, and then only to show that you have done enough permutations. Und
53,903
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata
For logistic regression, Stata defines residuals and related quantities to be those you'd get if you grouped all the observations with the same values for all the predictor variables, counted up the successes and failures for those observations, and fitted a logistic regression model to the resulting binomial data inst...
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata
For logistic regression, Stata defines residuals and related quantities to be those you'd get if you grouped all the observations with the same values for all the predictor variables, counted up the s
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata For logistic regression, Stata defines residuals and related quantities to be those you'd get if you grouped all the observations with the same values for all the predictor variables, counted up the successes and failures for those observations,...
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata For logistic regression, Stata defines residuals and related quantities to be those you'd get if you grouped all the observations with the same values for all the predictor variables, counted up the s
53,904
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata
Pearson residuals are obtained by dividing the each observation's raw residual by the square root of the corresponding variance. The idea is to get something that has variance 1, approximately. In your example, try this; set.seed(3141) x1 <- rnorm(100) x2 <- rnorm(100) y <- rbinom(100, 1, 0.25) glm1 <- glm(y~x1+x2, fam...
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata
Pearson residuals are obtained by dividing the each observation's raw residual by the square root of the corresponding variance. The idea is to get something that has variance 1, approximately. In you
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata Pearson residuals are obtained by dividing the each observation's raw residual by the square root of the corresponding variance. The idea is to get something that has variance 1, approximately. In your example, try this; set.seed(3141) x1 <- rno...
Logistic Regression - Getting Pearson Standardized Residuals in R vs Stata Pearson residuals are obtained by dividing the each observation's raw residual by the square root of the corresponding variance. The idea is to get something that has variance 1, approximately. In you
53,905
Meta-analysis in R with multiple SNPs
The MetABEL part of GenABEL does this. For 150 SNPs, you might find coding the loop yourself quicker than ensuring it's doing exactly what you want. (Neither should take very long)
Meta-analysis in R with multiple SNPs
The MetABEL part of GenABEL does this. For 150 SNPs, you might find coding the loop yourself quicker than ensuring it's doing exactly what you want. (Neither should take very long)
Meta-analysis in R with multiple SNPs The MetABEL part of GenABEL does this. For 150 SNPs, you might find coding the loop yourself quicker than ensuring it's doing exactly what you want. (Neither should take very long)
Meta-analysis in R with multiple SNPs The MetABEL part of GenABEL does this. For 150 SNPs, you might find coding the loop yourself quicker than ensuring it's doing exactly what you want. (Neither should take very long)
53,906
Meta-analysis in R with multiple SNPs
A quicker option would be to use the built-in meta-analysis option from PLINK: old plink site: http://zzz.bwh.harvard.edu/plink/metaanal.shtml new 1.9 site: https://www.cog-genomics.org/plink/1.9/postproc#meta_analysis It is quite straightforward, and no additional coding is needed. You could then use the meta packag...
Meta-analysis in R with multiple SNPs
A quicker option would be to use the built-in meta-analysis option from PLINK: old plink site: http://zzz.bwh.harvard.edu/plink/metaanal.shtml new 1.9 site: https://www.cog-genomics.org/plink/1.9/pos
Meta-analysis in R with multiple SNPs A quicker option would be to use the built-in meta-analysis option from PLINK: old plink site: http://zzz.bwh.harvard.edu/plink/metaanal.shtml new 1.9 site: https://www.cog-genomics.org/plink/1.9/postproc#meta_analysis It is quite straightforward, and no additional coding is need...
Meta-analysis in R with multiple SNPs A quicker option would be to use the built-in meta-analysis option from PLINK: old plink site: http://zzz.bwh.harvard.edu/plink/metaanal.shtml new 1.9 site: https://www.cog-genomics.org/plink/1.9/pos
53,907
How to convert nominal dataset into numerical dataset?
Although formally you may do K-means clustering on nominal data after converting nominal variables into dummy variables, this is regarded inadequate approach. To use K-means meaningfully, you must have all variables at scale (interval or ratio) level. One of the ways to quantify a set of nominal variables is to apply m...
How to convert nominal dataset into numerical dataset?
Although formally you may do K-means clustering on nominal data after converting nominal variables into dummy variables, this is regarded inadequate approach. To use K-means meaningfully, you must hav
How to convert nominal dataset into numerical dataset? Although formally you may do K-means clustering on nominal data after converting nominal variables into dummy variables, this is regarded inadequate approach. To use K-means meaningfully, you must have all variables at scale (interval or ratio) level. One of the wa...
How to convert nominal dataset into numerical dataset? Although formally you may do K-means clustering on nominal data after converting nominal variables into dummy variables, this is regarded inadequate approach. To use K-means meaningfully, you must hav
53,908
How to convert nominal dataset into numerical dataset?
For nominal data that represents token occurrences in a text document as in RCV1v2 you can use the TF-IDF transform as a way to normalize the data.
How to convert nominal dataset into numerical dataset?
For nominal data that represents token occurrences in a text document as in RCV1v2 you can use the TF-IDF transform as a way to normalize the data.
How to convert nominal dataset into numerical dataset? For nominal data that represents token occurrences in a text document as in RCV1v2 you can use the TF-IDF transform as a way to normalize the data.
How to convert nominal dataset into numerical dataset? For nominal data that represents token occurrences in a text document as in RCV1v2 you can use the TF-IDF transform as a way to normalize the data.
53,909
How to convert nominal dataset into numerical dataset?
I'd calculate a similarity matrix using jaccard distance and then run k-means
How to convert nominal dataset into numerical dataset?
I'd calculate a similarity matrix using jaccard distance and then run k-means
How to convert nominal dataset into numerical dataset? I'd calculate a similarity matrix using jaccard distance and then run k-means
How to convert nominal dataset into numerical dataset? I'd calculate a similarity matrix using jaccard distance and then run k-means
53,910
How to convert nominal dataset into numerical dataset?
k-means is not appropriate for this kind of data, for a very simple reason. Assume you convert the data set so that value a = 1, value b = 2, value c = 3, a cluster that consists of 10 objects with label a and 10 objects with label c will have a center at the value of b. And even when you have binary data, what is an a...
How to convert nominal dataset into numerical dataset?
k-means is not appropriate for this kind of data, for a very simple reason. Assume you convert the data set so that value a = 1, value b = 2, value c = 3, a cluster that consists of 10 objects with la
How to convert nominal dataset into numerical dataset? k-means is not appropriate for this kind of data, for a very simple reason. Assume you convert the data set so that value a = 1, value b = 2, value c = 3, a cluster that consists of 10 objects with label a and 10 objects with label c will have a center at the value...
How to convert nominal dataset into numerical dataset? k-means is not appropriate for this kind of data, for a very simple reason. Assume you convert the data set so that value a = 1, value b = 2, value c = 3, a cluster that consists of 10 objects with la
53,911
Why does GBM predict different values for the same data
The factors, as always. Seems like the model is not using the actual value of the factor, but rather something like the position in the factor-levels. I was able to reproduce your error with the data OrchardSprays data(OrchardSprays) model <- gbm(decrease ~ rowpos+colpos+treatment, data=OrchardSprays, n.trees=1000, di...
Why does GBM predict different values for the same data
The factors, as always. Seems like the model is not using the actual value of the factor, but rather something like the position in the factor-levels. I was able to reproduce your error with the data
Why does GBM predict different values for the same data The factors, as always. Seems like the model is not using the actual value of the factor, but rather something like the position in the factor-levels. I was able to reproduce your error with the data OrchardSprays data(OrchardSprays) model <- gbm(decrease ~ rowpo...
Why does GBM predict different values for the same data The factors, as always. Seems like the model is not using the actual value of the factor, but rather something like the position in the factor-levels. I was able to reproduce your error with the data
53,912
How much sub-questions impact one ordinal question in a survey?
I love your question, and I'm going to answer it a little more broadly then you asked. There are four main approaches that I would use to identify opportunities to improve Net Promoter Score, in order of analytical sophistication and the maturity of the project you're using NPS to evaluate. (For those not familiar, Net...
How much sub-questions impact one ordinal question in a survey?
I love your question, and I'm going to answer it a little more broadly then you asked. There are four main approaches that I would use to identify opportunities to improve Net Promoter Score, in order
How much sub-questions impact one ordinal question in a survey? I love your question, and I'm going to answer it a little more broadly then you asked. There are four main approaches that I would use to identify opportunities to improve Net Promoter Score, in order of analytical sophistication and the maturity of the pr...
How much sub-questions impact one ordinal question in a survey? I love your question, and I'm going to answer it a little more broadly then you asked. There are four main approaches that I would use to identify opportunities to improve Net Promoter Score, in order
53,913
How much sub-questions impact one ordinal question in a survey?
The NPS works well as a performance monitoring or controlling tool. But what you want to find out is something else: You want to identify the true drivers of satisfaction. The NPS is an aggregate score. If you want to say something about drivers of satisfaction, than you have to develop a model which explains the 10-po...
How much sub-questions impact one ordinal question in a survey?
The NPS works well as a performance monitoring or controlling tool. But what you want to find out is something else: You want to identify the true drivers of satisfaction. The NPS is an aggregate scor
How much sub-questions impact one ordinal question in a survey? The NPS works well as a performance monitoring or controlling tool. But what you want to find out is something else: You want to identify the true drivers of satisfaction. The NPS is an aggregate score. If you want to say something about drivers of satisfa...
How much sub-questions impact one ordinal question in a survey? The NPS works well as a performance monitoring or controlling tool. But what you want to find out is something else: You want to identify the true drivers of satisfaction. The NPS is an aggregate scor
53,914
How much sub-questions impact one ordinal question in a survey?
Some good answers already here. Here is a much simpler one, which is really an addition to the good answers you have received, not a substitute. Ordered logistic regression is the appropriate tool for modelling an ordinal response variable. There is an implementation - polr() - in Benables & Ripley's library(MASS) i...
How much sub-questions impact one ordinal question in a survey?
Some good answers already here. Here is a much simpler one, which is really an addition to the good answers you have received, not a substitute. Ordered logistic regression is the appropriate tool f
How much sub-questions impact one ordinal question in a survey? Some good answers already here. Here is a much simpler one, which is really an addition to the good answers you have received, not a substitute. Ordered logistic regression is the appropriate tool for modelling an ordinal response variable. There is an ...
How much sub-questions impact one ordinal question in a survey? Some good answers already here. Here is a much simpler one, which is really an addition to the good answers you have received, not a substitute. Ordered logistic regression is the appropriate tool f
53,915
When will PCA be equivalent to ICA?
PCA will be equivalent to ICA if all the correlations in the data are limited to second-order correlations and no higher-order correlations are found. Said another way, when the covariance matrix of the data can explain all the redundancies present in the data, ICA and PCA should return same components.
When will PCA be equivalent to ICA?
PCA will be equivalent to ICA if all the correlations in the data are limited to second-order correlations and no higher-order correlations are found. Said another way, when the covariance matrix of t
When will PCA be equivalent to ICA? PCA will be equivalent to ICA if all the correlations in the data are limited to second-order correlations and no higher-order correlations are found. Said another way, when the covariance matrix of the data can explain all the redundancies present in the data, ICA and PCA should ret...
When will PCA be equivalent to ICA? PCA will be equivalent to ICA if all the correlations in the data are limited to second-order correlations and no higher-order correlations are found. Said another way, when the covariance matrix of t
53,916
When will PCA be equivalent to ICA?
My answer here may help you. I believe that PCA will be equivalent to ICA, only when the independent components are orthogonal to begin with. PCA gives the independent components of your data, only in so far as an orthogonal transformation might.
When will PCA be equivalent to ICA?
My answer here may help you. I believe that PCA will be equivalent to ICA, only when the independent components are orthogonal to begin with. PCA gives the independent components of your data, only i
When will PCA be equivalent to ICA? My answer here may help you. I believe that PCA will be equivalent to ICA, only when the independent components are orthogonal to begin with. PCA gives the independent components of your data, only in so far as an orthogonal transformation might.
When will PCA be equivalent to ICA? My answer here may help you. I believe that PCA will be equivalent to ICA, only when the independent components are orthogonal to begin with. PCA gives the independent components of your data, only i
53,917
When will PCA be equivalent to ICA?
Here is my understanding, gathered largely from the paper https://www.sciencedirect.com/science/article/abs/pii/0165168494900299 First, some non-rigorous reasoning. PCA produces an orthogonal matrix defined up to a +-1 scaling of the columns, while ICA (when applicable) yields a generic matrix defined up to any scaling...
When will PCA be equivalent to ICA?
Here is my understanding, gathered largely from the paper https://www.sciencedirect.com/science/article/abs/pii/0165168494900299 First, some non-rigorous reasoning. PCA produces an orthogonal matrix d
When will PCA be equivalent to ICA? Here is my understanding, gathered largely from the paper https://www.sciencedirect.com/science/article/abs/pii/0165168494900299 First, some non-rigorous reasoning. PCA produces an orthogonal matrix defined up to a +-1 scaling of the columns, while ICA (when applicable) yields a gene...
When will PCA be equivalent to ICA? Here is my understanding, gathered largely from the paper https://www.sciencedirect.com/science/article/abs/pii/0165168494900299 First, some non-rigorous reasoning. PCA produces an orthogonal matrix d
53,918
When will PCA be equivalent to ICA?
Putting aside the issue whether 'extremely similar' (please define what you mean by this; do you mean within the sampling error?) is the same as 'coincide', I believe the answer is no. To be equivalent, they must imply each other in both directions. If outputs are independent as in ICA (but not Gaussian, because ICA do...
When will PCA be equivalent to ICA?
Putting aside the issue whether 'extremely similar' (please define what you mean by this; do you mean within the sampling error?) is the same as 'coincide', I believe the answer is no. To be equivalen
When will PCA be equivalent to ICA? Putting aside the issue whether 'extremely similar' (please define what you mean by this; do you mean within the sampling error?) is the same as 'coincide', I believe the answer is no. To be equivalent, they must imply each other in both directions. If outputs are independent as in I...
When will PCA be equivalent to ICA? Putting aside the issue whether 'extremely similar' (please define what you mean by this; do you mean within the sampling error?) is the same as 'coincide', I believe the answer is no. To be equivalen
53,919
Bayesian updating using $n$ noisy observations of Brownian motion
So $X_{n-1}$ is the target of inference. Then the correct Bayesian procedure is to calculate this posterior: $$p(X_{n-1}|Y_0\dots Y_{n-1}\mu_0\sigma_0N_0DI)$$ (Note I have added the symbol $I$ to explicitly indicate the assumptions and model structure being used). Now because we also know that the other $X_i$ are imp...
Bayesian updating using $n$ noisy observations of Brownian motion
So $X_{n-1}$ is the target of inference. Then the correct Bayesian procedure is to calculate this posterior: $$p(X_{n-1}|Y_0\dots Y_{n-1}\mu_0\sigma_0N_0DI)$$ (Note I have added the symbol $I$ to exp
Bayesian updating using $n$ noisy observations of Brownian motion So $X_{n-1}$ is the target of inference. Then the correct Bayesian procedure is to calculate this posterior: $$p(X_{n-1}|Y_0\dots Y_{n-1}\mu_0\sigma_0N_0DI)$$ (Note I have added the symbol $I$ to explicitly indicate the assumptions and model structure b...
Bayesian updating using $n$ noisy observations of Brownian motion So $X_{n-1}$ is the target of inference. Then the correct Bayesian procedure is to calculate this posterior: $$p(X_{n-1}|Y_0\dots Y_{n-1}\mu_0\sigma_0N_0DI)$$ (Note I have added the symbol $I$ to exp
53,920
Bayesian updating using $n$ noisy observations of Brownian motion
I'm a bit late to the party, but if this is the sort of problem you'll be tackling then you'll want to read Chapter 2 of Rasmussen and Williams, Gaussian Processes for Machine Learning. Equations 2.22-2.24 solve a problem that includes yours as a special case.
Bayesian updating using $n$ noisy observations of Brownian motion
I'm a bit late to the party, but if this is the sort of problem you'll be tackling then you'll want to read Chapter 2 of Rasmussen and Williams, Gaussian Processes for Machine Learning. Equations 2.22
Bayesian updating using $n$ noisy observations of Brownian motion I'm a bit late to the party, but if this is the sort of problem you'll be tackling then you'll want to read Chapter 2 of Rasmussen and Williams, Gaussian Processes for Machine Learning. Equations 2.22-2.24 solve a problem that includes yours as a special...
Bayesian updating using $n$ noisy observations of Brownian motion I'm a bit late to the party, but if this is the sort of problem you'll be tackling then you'll want to read Chapter 2 of Rasmussen and Williams, Gaussian Processes for Machine Learning. Equations 2.22
53,921
Delta method and correlated variables
Yes, you can still use the delta method with correlated variables. Let us label your function $f(\theta)$, where $\theta = (\beta, \omega)^T$ and $f(\theta) = \beta / (1-\omega)$. The delta method is based upon the Taylor expansion: $f(\hat{\theta}) \approx f(\theta) + (\hat{\theta} - \theta)^Tf'(\theta)$ Rearranging ...
Delta method and correlated variables
Yes, you can still use the delta method with correlated variables. Let us label your function $f(\theta)$, where $\theta = (\beta, \omega)^T$ and $f(\theta) = \beta / (1-\omega)$. The delta method is
Delta method and correlated variables Yes, you can still use the delta method with correlated variables. Let us label your function $f(\theta)$, where $\theta = (\beta, \omega)^T$ and $f(\theta) = \beta / (1-\omega)$. The delta method is based upon the Taylor expansion: $f(\hat{\theta}) \approx f(\theta) + (\hat{\thet...
Delta method and correlated variables Yes, you can still use the delta method with correlated variables. Let us label your function $f(\theta)$, where $\theta = (\beta, \omega)^T$ and $f(\theta) = \beta / (1-\omega)$. The delta method is
53,922
Can one force randomness in a sample?
The procedure you describe here is known as quota sampling. This is a non-ramdom sampling method. The procedure is frequently used in situations when there is no sampling frame available. In such a situation it provides a convenient and cheap way to draw a sample. Stratified sampling is different. In stratified samplin...
Can one force randomness in a sample?
The procedure you describe here is known as quota sampling. This is a non-ramdom sampling method. The procedure is frequently used in situations when there is no sampling frame available. In such a si
Can one force randomness in a sample? The procedure you describe here is known as quota sampling. This is a non-ramdom sampling method. The procedure is frequently used in situations when there is no sampling frame available. In such a situation it provides a convenient and cheap way to draw a sample. Stratified sampli...
Can one force randomness in a sample? The procedure you describe here is known as quota sampling. This is a non-ramdom sampling method. The procedure is frequently used in situations when there is no sampling frame available. In such a si
53,923
Can one force randomness in a sample?
It might be easy to make the mistake (if you are careless) and interpret it as stratified sampling instead of quota sampling. As whuber pointed out in the comments below, stratified sampling requires the the partitioning of the population into groups BEFORE sampling. "This is known as stratified sampling. It does not m...
Can one force randomness in a sample?
It might be easy to make the mistake (if you are careless) and interpret it as stratified sampling instead of quota sampling. As whuber pointed out in the comments below, stratified sampling requires
Can one force randomness in a sample? It might be easy to make the mistake (if you are careless) and interpret it as stratified sampling instead of quota sampling. As whuber pointed out in the comments below, stratified sampling requires the the partitioning of the population into groups BEFORE sampling. "This is known...
Can one force randomness in a sample? It might be easy to make the mistake (if you are careless) and interpret it as stratified sampling instead of quota sampling. As whuber pointed out in the comments below, stratified sampling requires
53,924
A problem with two ways of calculating AIC
Your first way is the correct and general definition. The second and third ways assume a Gaussian likelihood. The second method ignores the constant so the two are not equivalent. It is ok to ignore the constant as it just shifts the AIC for all models, and so makes no difference to the relative ordering of models. Con...
A problem with two ways of calculating AIC
Your first way is the correct and general definition. The second and third ways assume a Gaussian likelihood. The second method ignores the constant so the two are not equivalent. It is ok to ignore t
A problem with two ways of calculating AIC Your first way is the correct and general definition. The second and third ways assume a Gaussian likelihood. The second method ignores the constant so the two are not equivalent. It is ok to ignore the constant as it just shifts the AIC for all models, and so makes no differe...
A problem with two ways of calculating AIC Your first way is the correct and general definition. The second and third ways assume a Gaussian likelihood. The second method ignores the constant so the two are not equivalent. It is ok to ignore t
53,925
For two offset sampled data series, what is the best estimate of the offset between them?
The maximum of the cross-correlation function can be used for that. http://en.wikipedia.org/wiki/Cross-correlation (at least I know that it was used successfully in EEG time-series analysis, paper by Woody). This is an example, I hacked together: The top plot shows two noisy chirp-signals, the red one is offset by som...
For two offset sampled data series, what is the best estimate of the offset between them?
The maximum of the cross-correlation function can be used for that. http://en.wikipedia.org/wiki/Cross-correlation (at least I know that it was used successfully in EEG time-series analysis, paper by
For two offset sampled data series, what is the best estimate of the offset between them? The maximum of the cross-correlation function can be used for that. http://en.wikipedia.org/wiki/Cross-correlation (at least I know that it was used successfully in EEG time-series analysis, paper by Woody). This is an example, I ...
For two offset sampled data series, what is the best estimate of the offset between them? The maximum of the cross-correlation function can be used for that. http://en.wikipedia.org/wiki/Cross-correlation (at least I know that it was used successfully in EEG time-series analysis, paper by
53,926
For two offset sampled data series, what is the best estimate of the offset between them?
The problem is known as "time delay estimation". If the delay ("tau") is assumed to be constant, the most usual techniques are based on searching a maximum on the cross correlation function. But there are several refinements, many of which corresponds to some "generalized cross-correlation" (which are conceptually simi...
For two offset sampled data series, what is the best estimate of the offset between them?
The problem is known as "time delay estimation". If the delay ("tau") is assumed to be constant, the most usual techniques are based on searching a maximum on the cross correlation function. But there
For two offset sampled data series, what is the best estimate of the offset between them? The problem is known as "time delay estimation". If the delay ("tau") is assumed to be constant, the most usual techniques are based on searching a maximum on the cross correlation function. But there are several refinements, many...
For two offset sampled data series, what is the best estimate of the offset between them? The problem is known as "time delay estimation". If the delay ("tau") is assumed to be constant, the most usual techniques are based on searching a maximum on the cross correlation function. But there
53,927
Interpretation of coefficients in polynomial regression for predictive modeling
Explanation at UCLA Another link I think the general answer is : not that easily. There are ways to interpret the derivative, talk about which way the curve opens, etc. But nothing simple and clear like in the linear model. My hunch is that you shouldn't be modeling this as a quadratic, tho. I would also chuck out...
Interpretation of coefficients in polynomial regression for predictive modeling
Explanation at UCLA Another link I think the general answer is : not that easily. There are ways to interpret the derivative, talk about which way the curve opens, etc. But nothing simple and clear
Interpretation of coefficients in polynomial regression for predictive modeling Explanation at UCLA Another link I think the general answer is : not that easily. There are ways to interpret the derivative, talk about which way the curve opens, etc. But nothing simple and clear like in the linear model. My hunch is t...
Interpretation of coefficients in polynomial regression for predictive modeling Explanation at UCLA Another link I think the general answer is : not that easily. There are ways to interpret the derivative, talk about which way the curve opens, etc. But nothing simple and clear
53,928
Interpretation of coefficients in polynomial regression for predictive modeling
Like other polynomial models, your model is likely to be worse an a linear model if you extrapolate outside the time for which you have data as the time * time term is likely to dominate and the sign of its coefficient will determine whether you predict a large positive or large negative balances, when for many people ...
Interpretation of coefficients in polynomial regression for predictive modeling
Like other polynomial models, your model is likely to be worse an a linear model if you extrapolate outside the time for which you have data as the time * time term is likely to dominate and the sign
Interpretation of coefficients in polynomial regression for predictive modeling Like other polynomial models, your model is likely to be worse an a linear model if you extrapolate outside the time for which you have data as the time * time term is likely to dominate and the sign of its coefficient will determine whethe...
Interpretation of coefficients in polynomial regression for predictive modeling Like other polynomial models, your model is likely to be worse an a linear model if you extrapolate outside the time for which you have data as the time * time term is likely to dominate and the sign
53,929
Interpretation of coefficients in polynomial regression for predictive modeling
As Henry politely/correctly said the problem with this dated approach of fitting linear, squares, cubics, et cetera is that you are forcing/fitting using potentially ( always in my opinion ) unwarranted deterministic structure onto the model. You "pay" for the fitting when you either interpolate or predict. Consider wh...
Interpretation of coefficients in polynomial regression for predictive modeling
As Henry politely/correctly said the problem with this dated approach of fitting linear, squares, cubics, et cetera is that you are forcing/fitting using potentially ( always in my opinion ) unwarrant
Interpretation of coefficients in polynomial regression for predictive modeling As Henry politely/correctly said the problem with this dated approach of fitting linear, squares, cubics, et cetera is that you are forcing/fitting using potentially ( always in my opinion ) unwarranted deterministic structure onto the mode...
Interpretation of coefficients in polynomial regression for predictive modeling As Henry politely/correctly said the problem with this dated approach of fitting linear, squares, cubics, et cetera is that you are forcing/fitting using potentially ( always in my opinion ) unwarrant
53,930
How to analyse a moderator effect in hierarchical multiple regression with covariates?
Terminology and Overview In the context of multiple regression: a moderator effect is just an interaction between two predictors, typically created by multiplying the two predictors together, often after first centering the predictors. a covariate is just a predictor that was not used in the formation of the moderator...
How to analyse a moderator effect in hierarchical multiple regression with covariates?
Terminology and Overview In the context of multiple regression: a moderator effect is just an interaction between two predictors, typically created by multiplying the two predictors together, often a
How to analyse a moderator effect in hierarchical multiple regression with covariates? Terminology and Overview In the context of multiple regression: a moderator effect is just an interaction between two predictors, typically created by multiplying the two predictors together, often after first centering the predicto...
How to analyse a moderator effect in hierarchical multiple regression with covariates? Terminology and Overview In the context of multiple regression: a moderator effect is just an interaction between two predictors, typically created by multiplying the two predictors together, often a
53,931
Logarithms and regression
By virtue of properties of logarithms, the original model, $$\log(Y/B) = \beta_0 + \beta_1\log(A/B) + \beta_2\log(A/C) + \varepsilon$$ ($\varepsilon$ is a zero - mean random variable) can be written $$\log(Y) - \log(B) = \beta_0 + \beta_1 (\log(A)-\log(B)) + \beta_2(\log(A)-\log(C)) + \varepsilon,$$ which algebraically...
Logarithms and regression
By virtue of properties of logarithms, the original model, $$\log(Y/B) = \beta_0 + \beta_1\log(A/B) + \beta_2\log(A/C) + \varepsilon$$ ($\varepsilon$ is a zero - mean random variable) can be written $
Logarithms and regression By virtue of properties of logarithms, the original model, $$\log(Y/B) = \beta_0 + \beta_1\log(A/B) + \beta_2\log(A/C) + \varepsilon$$ ($\varepsilon$ is a zero - mean random variable) can be written $$\log(Y) - \log(B) = \beta_0 + \beta_1 (\log(A)-\log(B)) + \beta_2(\log(A)-\log(C)) + \varepsi...
Logarithms and regression By virtue of properties of logarithms, the original model, $$\log(Y/B) = \beta_0 + \beta_1\log(A/B) + \beta_2\log(A/C) + \varepsilon$$ ($\varepsilon$ is a zero - mean random variable) can be written $
53,932
Logarithms and regression
Just doing $$ \log(Y) \sim \log(A) + \log(B) + \log(C) $$ would be equivalent to the model you're fitting, under the constraint that the coefficients sum to 1 (thanks whuber for making this clear). The coefficients would be changed to compensate for the redundancies in your current formulation, but the fit would be t...
Logarithms and regression
Just doing $$ \log(Y) \sim \log(A) + \log(B) + \log(C) $$ would be equivalent to the model you're fitting, under the constraint that the coefficients sum to 1 (thanks whuber for making this clear).
Logarithms and regression Just doing $$ \log(Y) \sim \log(A) + \log(B) + \log(C) $$ would be equivalent to the model you're fitting, under the constraint that the coefficients sum to 1 (thanks whuber for making this clear). The coefficients would be changed to compensate for the redundancies in your current formulati...
Logarithms and regression Just doing $$ \log(Y) \sim \log(A) + \log(B) + \log(C) $$ would be equivalent to the model you're fitting, under the constraint that the coefficients sum to 1 (thanks whuber for making this clear).
53,933
Varying group coefficients in lme4
First of all, AIC/BIC do not make sense in mixed models. I mean, if you can explain what your $n$ that goes into your BIC is (number of groups? number of observations? something in between? how about level 1 and level 2 variables that obviously have different amount information in them?)... So I wouldn't pay any attent...
Varying group coefficients in lme4
First of all, AIC/BIC do not make sense in mixed models. I mean, if you can explain what your $n$ that goes into your BIC is (number of groups? number of observations? something in between? how about
Varying group coefficients in lme4 First of all, AIC/BIC do not make sense in mixed models. I mean, if you can explain what your $n$ that goes into your BIC is (number of groups? number of observations? something in between? how about level 1 and level 2 variables that obviously have different amount information in the...
Varying group coefficients in lme4 First of all, AIC/BIC do not make sense in mixed models. I mean, if you can explain what your $n$ that goes into your BIC is (number of groups? number of observations? something in between? how about
53,934
Varying group coefficients in lme4
Its better, I think, that you write your model first, then we can get how to estimate it in R. Do you wanna the slope of your model to vary by group? And do you think that the second level predictors (ie. predictors at the group level) can be used to predict the varying slopes? If both answers are yes, here how (I thin...
Varying group coefficients in lme4
Its better, I think, that you write your model first, then we can get how to estimate it in R. Do you wanna the slope of your model to vary by group? And do you think that the second level predictors
Varying group coefficients in lme4 Its better, I think, that you write your model first, then we can get how to estimate it in R. Do you wanna the slope of your model to vary by group? And do you think that the second level predictors (ie. predictors at the group level) can be used to predict the varying slopes? If bot...
Varying group coefficients in lme4 Its better, I think, that you write your model first, then we can get how to estimate it in R. Do you wanna the slope of your model to vary by group? And do you think that the second level predictors
53,935
Text mining software (beyond R)
NLTK is free and reasonably easy to use, though it does require installing Python. It comes with a wide range of text data sets. There's an O'Reilly book for it, which is a help for students. WEKA is general machine learning software with a nice interface. There's some text classification datasets for it, though not...
Text mining software (beyond R)
NLTK is free and reasonably easy to use, though it does require installing Python. It comes with a wide range of text data sets. There's an O'Reilly book for it, which is a help for students. WEKA i
Text mining software (beyond R) NLTK is free and reasonably easy to use, though it does require installing Python. It comes with a wide range of text data sets. There's an O'Reilly book for it, which is a help for students. WEKA is general machine learning software with a nice interface. There's some text classifica...
Text mining software (beyond R) NLTK is free and reasonably easy to use, though it does require installing Python. It comes with a wide range of text data sets. There's an O'Reilly book for it, which is a help for students. WEKA i
53,936
Text mining software (beyond R)
Take a look at Rapidminer. Good documentation and a good community where people can discuss various questions. Works both on Mac and Windows. http://rapid-i.com
Text mining software (beyond R)
Take a look at Rapidminer. Good documentation and a good community where people can discuss various questions. Works both on Mac and Windows. http://rapid-i.com
Text mining software (beyond R) Take a look at Rapidminer. Good documentation and a good community where people can discuss various questions. Works both on Mac and Windows. http://rapid-i.com
Text mining software (beyond R) Take a look at Rapidminer. Good documentation and a good community where people can discuss various questions. Works both on Mac and Windows. http://rapid-i.com
53,937
Text mining software (beyond R)
DMelt is a free software package for computation, visualization and data mining. It is designed to work with large data ("big data") and perform statistical analysis and data mining. It is similar to R, but is integrated with a number of programming languages (such as Python)
Text mining software (beyond R)
DMelt is a free software package for computation, visualization and data mining. It is designed to work with large data ("big data") and perform statistical analysis and data mining. It is similar to
Text mining software (beyond R) DMelt is a free software package for computation, visualization and data mining. It is designed to work with large data ("big data") and perform statistical analysis and data mining. It is similar to R, but is integrated with a number of programming languages (such as Python)
Text mining software (beyond R) DMelt is a free software package for computation, visualization and data mining. It is designed to work with large data ("big data") and perform statistical analysis and data mining. It is similar to
53,938
Determining the reliability of weather forecast
There's certainly a huge literature on the accuracy of weather forecasts, including some work that led to widely used general techniques for evaluating predictions. A data set of historical forecasts from a particular model is available from NOAA. The project sounds very cool, but the data looks quite complex. This...
Determining the reliability of weather forecast
There's certainly a huge literature on the accuracy of weather forecasts, including some work that led to widely used general techniques for evaluating predictions. A data set of historical forecast
Determining the reliability of weather forecast There's certainly a huge literature on the accuracy of weather forecasts, including some work that led to widely used general techniques for evaluating predictions. A data set of historical forecasts from a particular model is available from NOAA. The project sounds ve...
Determining the reliability of weather forecast There's certainly a huge literature on the accuracy of weather forecasts, including some work that led to widely used general techniques for evaluating predictions. A data set of historical forecast
53,939
Determining the reliability of weather forecast
I too was after the same type of data a couple of years ago, and amazingly enough I was unable to find the forecasts themselves once the particular date has passed. It means that you'd want to collect the forecasts actively over a period of time. While you're at it, I'd also suggest collecting a few types of forecast h...
Determining the reliability of weather forecast
I too was after the same type of data a couple of years ago, and amazingly enough I was unable to find the forecasts themselves once the particular date has passed. It means that you'd want to collect
Determining the reliability of weather forecast I too was after the same type of data a couple of years ago, and amazingly enough I was unable to find the forecasts themselves once the particular date has passed. It means that you'd want to collect the forecasts actively over a period of time. While you're at it, I'd a...
Determining the reliability of weather forecast I too was after the same type of data a couple of years ago, and amazingly enough I was unable to find the forecasts themselves once the particular date has passed. It means that you'd want to collect
53,940
Present results from a multinomial model graphically
In case you are nevertheless interested in the coefficients, and your "bunch of models" is equal to each other (e.g. out of bootstrap or iterated/repeated cross validation, or model ensemble) Then you could plot the coefficients over the variate (boxplot, mean ± standard deviation, ...): Of course, if you have only f...
Present results from a multinomial model graphically
In case you are nevertheless interested in the coefficients, and your "bunch of models" is equal to each other (e.g. out of bootstrap or iterated/repeated cross validation, or model ensemble) Then yo
Present results from a multinomial model graphically In case you are nevertheless interested in the coefficients, and your "bunch of models" is equal to each other (e.g. out of bootstrap or iterated/repeated cross validation, or model ensemble) Then you could plot the coefficients over the variate (boxplot, mean ± sta...
Present results from a multinomial model graphically In case you are nevertheless interested in the coefficients, and your "bunch of models" is equal to each other (e.g. out of bootstrap or iterated/repeated cross validation, or model ensemble) Then yo
53,941
Present results from a multinomial model graphically
What you are typically interested in is not the coefficients but probably marginal effects or something similar. Here is a package that plots these for you: http://cran.r-project.org/web/packages/effects I think it was featured in R magazine, but the examples are picturesque enough.
Present results from a multinomial model graphically
What you are typically interested in is not the coefficients but probably marginal effects or something similar. Here is a package that plots these for you: http://cran.r-project.org/web/packages/effe
Present results from a multinomial model graphically What you are typically interested in is not the coefficients but probably marginal effects or something similar. Here is a package that plots these for you: http://cran.r-project.org/web/packages/effects I think it was featured in R magazine, but the examples are pic...
Present results from a multinomial model graphically What you are typically interested in is not the coefficients but probably marginal effects or something similar. Here is a package that plots these for you: http://cran.r-project.org/web/packages/effe
53,942
Meaning of the "existence" proof
Existence proofs are notoriously difficult to justify and appreciate. One reason is that they don't seem to have any consequences. Whether or not you read and understand an existence proof does not change your subsequent work with a given stochastic process because that work relies on properties of the process and not ...
Meaning of the "existence" proof
Existence proofs are notoriously difficult to justify and appreciate. One reason is that they don't seem to have any consequences. Whether or not you read and understand an existence proof does not ch
Meaning of the "existence" proof Existence proofs are notoriously difficult to justify and appreciate. One reason is that they don't seem to have any consequences. Whether or not you read and understand an existence proof does not change your subsequent work with a given stochastic process because that work relies on p...
Meaning of the "existence" proof Existence proofs are notoriously difficult to justify and appreciate. One reason is that they don't seem to have any consequences. Whether or not you read and understand an existence proof does not ch
53,943
Plotting top 5 most frequent factors using R
This seems more of a question for SO, but anyway: EDIT: reproducible, and a lot simpler f <- data.frame(c=factor(sample(rep(letters[1:8], 10),40))) t <- table(f$c) # frequency of values in f$c plot( sort(t, decreasing=TRUE)[1:5] ), type="h")
Plotting top 5 most frequent factors using R
This seems more of a question for SO, but anyway: EDIT: reproducible, and a lot simpler f <- data.frame(c=factor(sample(rep(letters[1:8], 10),40))) t <- table(f$c) # frequency of values in f$c plot( s
Plotting top 5 most frequent factors using R This seems more of a question for SO, but anyway: EDIT: reproducible, and a lot simpler f <- data.frame(c=factor(sample(rep(letters[1:8], 10),40))) t <- table(f$c) # frequency of values in f$c plot( sort(t, decreasing=TRUE)[1:5] ), type="h")
Plotting top 5 most frequent factors using R This seems more of a question for SO, but anyway: EDIT: reproducible, and a lot simpler f <- data.frame(c=factor(sample(rep(letters[1:8], 10),40))) t <- table(f$c) # frequency of values in f$c plot( s
53,944
Random effect nested under fixed effect model in R
It doesn't make sense to both include tank as a random effect and nest tank within the pop/temp fixed effect. You only need one of these, depending on how tank is coded. If tank is coded 1-8, you only need the tank random effect. Nesting it within the pop/temp fixed effect results in the same 8 units, so is not neces...
Random effect nested under fixed effect model in R
It doesn't make sense to both include tank as a random effect and nest tank within the pop/temp fixed effect. You only need one of these, depending on how tank is coded. If tank is coded 1-8, you onl
Random effect nested under fixed effect model in R It doesn't make sense to both include tank as a random effect and nest tank within the pop/temp fixed effect. You only need one of these, depending on how tank is coded. If tank is coded 1-8, you only need the tank random effect. Nesting it within the pop/temp fixed ...
Random effect nested under fixed effect model in R It doesn't make sense to both include tank as a random effect and nest tank within the pop/temp fixed effect. You only need one of these, depending on how tank is coded. If tank is coded 1-8, you onl
53,945
Random effect nested under fixed effect model in R
Because the treatment (pop*temp) does not vary within levels of the random effect (tank), this is a simple nested design (I think). Unless you are particularly interested in the amount of between-tank variation, it will be much easier just to aggregate the data to the level of tank and then run a simple (non-mixed) li...
Random effect nested under fixed effect model in R
Because the treatment (pop*temp) does not vary within levels of the random effect (tank), this is a simple nested design (I think). Unless you are particularly interested in the amount of between-tan
Random effect nested under fixed effect model in R Because the treatment (pop*temp) does not vary within levels of the random effect (tank), this is a simple nested design (I think). Unless you are particularly interested in the amount of between-tank variation, it will be much easier just to aggregate the data to the...
Random effect nested under fixed effect model in R Because the treatment (pop*temp) does not vary within levels of the random effect (tank), this is a simple nested design (I think). Unless you are particularly interested in the amount of between-tan
53,946
Random effect nested under fixed effect model in R
Did you try: lmer(growth~1+treatment+(1|tank)+(0+treatment|tank))
Random effect nested under fixed effect model in R
Did you try: lmer(growth~1+treatment+(1|tank)+(0+treatment|tank))
Random effect nested under fixed effect model in R Did you try: lmer(growth~1+treatment+(1|tank)+(0+treatment|tank))
Random effect nested under fixed effect model in R Did you try: lmer(growth~1+treatment+(1|tank)+(0+treatment|tank))
53,947
Understanding variance estimators
The idea of the unbaised variance estimate, is to have $E(s^{2})=\sigma^{2}$ where the expectation is with respect to the sampling distribution of $s^{2}$ or equivalently, with respect to the sampling distribution of $x_1,\dots,x_N$. So if we knew the true mean and the true variance, but not the value of $s^{2}$, then...
Understanding variance estimators
The idea of the unbaised variance estimate, is to have $E(s^{2})=\sigma^{2}$ where the expectation is with respect to the sampling distribution of $s^{2}$ or equivalently, with respect to the sampling
Understanding variance estimators The idea of the unbaised variance estimate, is to have $E(s^{2})=\sigma^{2}$ where the expectation is with respect to the sampling distribution of $s^{2}$ or equivalently, with respect to the sampling distribution of $x_1,\dots,x_N$. So if we knew the true mean and the true variance, ...
Understanding variance estimators The idea of the unbaised variance estimate, is to have $E(s^{2})=\sigma^{2}$ where the expectation is with respect to the sampling distribution of $s^{2}$ or equivalently, with respect to the sampling
53,948
Understanding variance estimators
What's the problem with just dividing by $N$? You don't take into account that you aren't subtracting the true population mean off of each $x_i$, but rather than estimate of it. One way that I like to think about it is, suppose that I gave you the sample mean $\bar{x}$. How many data points $N-k$ would I have to give y...
Understanding variance estimators
What's the problem with just dividing by $N$? You don't take into account that you aren't subtracting the true population mean off of each $x_i$, but rather than estimate of it. One way that I like to
Understanding variance estimators What's the problem with just dividing by $N$? You don't take into account that you aren't subtracting the true population mean off of each $x_i$, but rather than estimate of it. One way that I like to think about it is, suppose that I gave you the sample mean $\bar{x}$. How many data p...
Understanding variance estimators What's the problem with just dividing by $N$? You don't take into account that you aren't subtracting the true population mean off of each $x_i$, but rather than estimate of it. One way that I like to
53,949
Dependent variable is a function of independent variables; can I sensibly include them in a regression?
I see no problem with fitting the regression. We do regressions because we believe that the predictors may be related to the response, you just have more knowledge to begin with. But what questions are you actually trying to answer? The fact that certain coefficients are significant is not surprising, so those were n...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi
I see no problem with fitting the regression. We do regressions because we believe that the predictors may be related to the response, you just have more knowledge to begin with. But what questions a
Dependent variable is a function of independent variables; can I sensibly include them in a regression? I see no problem with fitting the regression. We do regressions because we believe that the predictors may be related to the response, you just have more knowledge to begin with. But what questions are you actually ...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi I see no problem with fitting the regression. We do regressions because we believe that the predictors may be related to the response, you just have more knowledge to begin with. But what questions a
53,950
Dependent variable is a function of independent variables; can I sensibly include them in a regression?
Another point to consider: what enables a student to do well in one course is related to what enables him/her to do well in another. There are overarching factors (cognitive, personality, circumstances) that play some role in determining each of the individual course grades. So to use regression--to see how X1 relat...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi
Another point to consider: what enables a student to do well in one course is related to what enables him/her to do well in another. There are overarching factors (cognitive, personality, circumstan
Dependent variable is a function of independent variables; can I sensibly include them in a regression? Another point to consider: what enables a student to do well in one course is related to what enables him/her to do well in another. There are overarching factors (cognitive, personality, circumstances) that play s...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi Another point to consider: what enables a student to do well in one course is related to what enables him/her to do well in another. There are overarching factors (cognitive, personality, circumstan
53,951
Dependent variable is a function of independent variables; can I sensibly include them in a regression?
Strong exogeneity is a term related to dynamic models, i.e. when there is time-series data involved. Since you are doing one-time survey, this term does not apply. What might be the problem with the regression though is omitted variable bias. Since GPA is a weighted average purely arithmetical formula applies: $$GPA = ...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi
Strong exogeneity is a term related to dynamic models, i.e. when there is time-series data involved. Since you are doing one-time survey, this term does not apply. What might be the problem with the r
Dependent variable is a function of independent variables; can I sensibly include them in a regression? Strong exogeneity is a term related to dynamic models, i.e. when there is time-series data involved. Since you are doing one-time survey, this term does not apply. What might be the problem with the regression though...
Dependent variable is a function of independent variables; can I sensibly include them in a regressi Strong exogeneity is a term related to dynamic models, i.e. when there is time-series data involved. Since you are doing one-time survey, this term does not apply. What might be the problem with the r
53,952
Online method for detecting wave amplitude
More than a complete solution this is meant to be a very rough series of "hints" on how to implement one using FFT, there are probably better methods but, if it works... First of all let's generate the wave, with varying frequency and amplitude freqs <- c(0.2, 0.05, 0.1) x <- NULL y <- NULL for (n in 1:length(f...
Online method for detecting wave amplitude
More than a complete solution this is meant to be a very rough series of "hints" on how to implement one using FFT, there are probably better methods but, if it works... First of all let's generate th
Online method for detecting wave amplitude More than a complete solution this is meant to be a very rough series of "hints" on how to implement one using FFT, there are probably better methods but, if it works... First of all let's generate the wave, with varying frequency and amplitude freqs <- c(0.2, 0.05, 0.1) x...
Online method for detecting wave amplitude More than a complete solution this is meant to be a very rough series of "hints" on how to implement one using FFT, there are probably better methods but, if it works... First of all let's generate th
53,953
Online method for detecting wave amplitude
In answer to another question on this forum I referred the OP to this site where there is open source code for a function called HT_PERIOD to measure the instantaneous period of a time series. There are also functions called HT_PHASE, HT_PHASOR and HT_SINE to respectively measure the phase, the phasor components of the...
Online method for detecting wave amplitude
In answer to another question on this forum I referred the OP to this site where there is open source code for a function called HT_PERIOD to measure the instantaneous period of a time series. There a
Online method for detecting wave amplitude In answer to another question on this forum I referred the OP to this site where there is open source code for a function called HT_PERIOD to measure the instantaneous period of a time series. There are also functions called HT_PHASE, HT_PHASOR and HT_SINE to respectively meas...
Online method for detecting wave amplitude In answer to another question on this forum I referred the OP to this site where there is open source code for a function called HT_PERIOD to measure the instantaneous period of a time series. There a
53,954
Elasticity of log-log regression
whuber has made the point in the comment. If $\log_e(Y) = B_0 + B_1\log_e(X) + U$ and $U$ is independent of $X$ then taking the partial derivative with respect to $X$ gives $\frac{\partial Y}{\partial X}\cdot\frac{1}{Y} = B_1\frac{1}{X}$, i.e. $B_1 = \frac{\partial Y}{\partial X}\cdot\frac{X}{Y}$. $E_{y,x} = \lim_{X ...
Elasticity of log-log regression
whuber has made the point in the comment. If $\log_e(Y) = B_0 + B_1\log_e(X) + U$ and $U$ is independent of $X$ then taking the partial derivative with respect to $X$ gives $\frac{\partial Y}{\partial
Elasticity of log-log regression whuber has made the point in the comment. If $\log_e(Y) = B_0 + B_1\log_e(X) + U$ and $U$ is independent of $X$ then taking the partial derivative with respect to $X$ gives $\frac{\partial Y}{\partial X}\cdot\frac{1}{Y} = B_1\frac{1}{X}$, i.e. $B_1 = \frac{\partial Y}{\partial X}\cdot\f...
Elasticity of log-log regression whuber has made the point in the comment. If $\log_e(Y) = B_0 + B_1\log_e(X) + U$ and $U$ is independent of $X$ then taking the partial derivative with respect to $X$ gives $\frac{\partial Y}{\partial
53,955
Elasticity of log-log regression
Responding 9 years later in case anyone is interested If we consider $X = e^{{\log{X}}}$ then $$\beta = \frac{d \log{Y}}{d \log X} = \frac{d \log{Y}}{d Y} \frac{d Y}{d X} \frac{dX}{d \log{X}}= \frac{1}{Y} \frac{dY}{dX} \frac{X}{1}= \frac{X}{Y} \frac{dY}{dX} = \ elasticity$$
Elasticity of log-log regression
Responding 9 years later in case anyone is interested If we consider $X = e^{{\log{X}}}$ then $$\beta = \frac{d \log{Y}}{d \log X} = \frac{d \log{Y}}{d Y} \frac{d Y}{d X} \frac{dX}{d \log{X}}= \frac
Elasticity of log-log regression Responding 9 years later in case anyone is interested If we consider $X = e^{{\log{X}}}$ then $$\beta = \frac{d \log{Y}}{d \log X} = \frac{d \log{Y}}{d Y} \frac{d Y}{d X} \frac{dX}{d \log{X}}= \frac{1}{Y} \frac{dY}{dX} \frac{X}{1}= \frac{X}{Y} \frac{dY}{dX} = \ elasticity$$
Elasticity of log-log regression Responding 9 years later in case anyone is interested If we consider $X = e^{{\log{X}}}$ then $$\beta = \frac{d \log{Y}}{d \log X} = \frac{d \log{Y}}{d Y} \frac{d Y}{d X} \frac{dX}{d \log{X}}= \frac
53,956
Statistical equivalence in the birthday paradox
In a group of 23 people, all pairs must involve just those 23 people: the pairs are thus mathematically (and statistically) dependent. On the other hand, 253 pairs chosen independently and randomly from the 366*365/2 possible pairs will typically involve around 100 separate people. This (strong) dependency means we c...
Statistical equivalence in the birthday paradox
In a group of 23 people, all pairs must involve just those 23 people: the pairs are thus mathematically (and statistically) dependent. On the other hand, 253 pairs chosen independently and randomly f
Statistical equivalence in the birthday paradox In a group of 23 people, all pairs must involve just those 23 people: the pairs are thus mathematically (and statistically) dependent. On the other hand, 253 pairs chosen independently and randomly from the 366*365/2 possible pairs will typically involve around 100 separ...
Statistical equivalence in the birthday paradox In a group of 23 people, all pairs must involve just those 23 people: the pairs are thus mathematically (and statistically) dependent. On the other hand, 253 pairs chosen independently and randomly f
53,957
Expected value of certain exponential transformation of standard normal variable
If we let $Y = -\mu X$, then $Y$ is distributed as $N(0, \mu^2)$, and $e^Y$ is a lognormal random variable with parameters $0, \mu^2$. The expected value of a lognormal with parameters $a, b^2$ is $e^{a + b^2/2}$, so $E(e^{-\mu X}) = E(e^Y) = e^{\mu^2/2}$. The given result follows immediately.
Expected value of certain exponential transformation of standard normal variable
If we let $Y = -\mu X$, then $Y$ is distributed as $N(0, \mu^2)$, and $e^Y$ is a lognormal random variable with parameters $0, \mu^2$. The expected value of a lognormal with parameters $a, b^2$ is $e^
Expected value of certain exponential transformation of standard normal variable If we let $Y = -\mu X$, then $Y$ is distributed as $N(0, \mu^2)$, and $e^Y$ is a lognormal random variable with parameters $0, \mu^2$. The expected value of a lognormal with parameters $a, b^2$ is $e^{a + b^2/2}$, so $E(e^{-\mu X}) = E(e^...
Expected value of certain exponential transformation of standard normal variable If we let $Y = -\mu X$, then $Y$ is distributed as $N(0, \mu^2)$, and $e^Y$ is a lognormal random variable with parameters $0, \mu^2$. The expected value of a lognormal with parameters $a, b^2$ is $e^
53,958
Expected value of certain exponential transformation of standard normal variable
The answer is right, but to make it even more fairly obvious. Imaginae Y = -muX -0.5mu^2, then it follows Y~N(-0.5mu^2,mu^2) as above, and thus expectation of lognormal is e^(-0.5mu^2+0.5mu^2) thus = e^0 = 1
Expected value of certain exponential transformation of standard normal variable
The answer is right, but to make it even more fairly obvious. Imaginae Y = -muX -0.5mu^2, then it follows Y~N(-0.5mu^2,mu^2) as above, and thus expectation of lognormal is e^(-0.5mu^2+0.5mu^2) thus =
Expected value of certain exponential transformation of standard normal variable The answer is right, but to make it even more fairly obvious. Imaginae Y = -muX -0.5mu^2, then it follows Y~N(-0.5mu^2,mu^2) as above, and thus expectation of lognormal is e^(-0.5mu^2+0.5mu^2) thus = e^0 = 1
Expected value of certain exponential transformation of standard normal variable The answer is right, but to make it even more fairly obvious. Imaginae Y = -muX -0.5mu^2, then it follows Y~N(-0.5mu^2,mu^2) as above, and thus expectation of lognormal is e^(-0.5mu^2+0.5mu^2) thus =
53,959
Excel's confidence interval function throws #NUM! when standard deviation is 0
This behavior is questionable but documented. The help for "confidence" states: If standard_dev ≤ 0, CONFIDENCE returns the #NUM! error value. ... If we assume alpha equals 0.05, we need to calculate the area under the standard normal curve that equals (1 - alpha), or 95 percent. This value is ± 1.96. The conf...
Excel's confidence interval function throws #NUM! when standard deviation is 0
This behavior is questionable but documented. The help for "confidence" states: If standard_dev ≤ 0, CONFIDENCE returns the #NUM! error value. ... If we assume alpha equals 0.05, we need to cal
Excel's confidence interval function throws #NUM! when standard deviation is 0 This behavior is questionable but documented. The help for "confidence" states: If standard_dev ≤ 0, CONFIDENCE returns the #NUM! error value. ... If we assume alpha equals 0.05, we need to calculate the area under the standard normal...
Excel's confidence interval function throws #NUM! when standard deviation is 0 This behavior is questionable but documented. The help for "confidence" states: If standard_dev ≤ 0, CONFIDENCE returns the #NUM! error value. ... If we assume alpha equals 0.05, we need to cal
53,960
Excel's confidence interval function throws #NUM! when standard deviation is 0
Let's assume all your 8 subjects chose to answer 3 on the (1, 2, 3, 4, 5) scale. Let's assume that their opinions were continuous in their minds, and they rounded it to the closest values of the scale. This means that the original opinion of each subject was in the range $[2.5, 3.5)$. > mean(replicate(1e5, diff(range(r...
Excel's confidence interval function throws #NUM! when standard deviation is 0
Let's assume all your 8 subjects chose to answer 3 on the (1, 2, 3, 4, 5) scale. Let's assume that their opinions were continuous in their minds, and they rounded it to the closest values of the scale
Excel's confidence interval function throws #NUM! when standard deviation is 0 Let's assume all your 8 subjects chose to answer 3 on the (1, 2, 3, 4, 5) scale. Let's assume that their opinions were continuous in their minds, and they rounded it to the closest values of the scale. This means that the original opinion of...
Excel's confidence interval function throws #NUM! when standard deviation is 0 Let's assume all your 8 subjects chose to answer 3 on the (1, 2, 3, 4, 5) scale. Let's assume that their opinions were continuous in their minds, and they rounded it to the closest values of the scale
53,961
Excel's confidence interval function throws #NUM! when standard deviation is 0
If eight samples from a distribution are exactly the same it is probably not a normal distribution or you use rounding at a higher order of magnitude than of the standard deviation. Or are you calculating means on a numerically coded ordinal scale?
Excel's confidence interval function throws #NUM! when standard deviation is 0
If eight samples from a distribution are exactly the same it is probably not a normal distribution or you use rounding at a higher order of magnitude than of the standard deviation. Or are you calcula
Excel's confidence interval function throws #NUM! when standard deviation is 0 If eight samples from a distribution are exactly the same it is probably not a normal distribution or you use rounding at a higher order of magnitude than of the standard deviation. Or are you calculating means on a numerically coded ordinal...
Excel's confidence interval function throws #NUM! when standard deviation is 0 If eight samples from a distribution are exactly the same it is probably not a normal distribution or you use rounding at a higher order of magnitude than of the standard deviation. Or are you calcula
53,962
Excel's confidence interval function throws #NUM! when standard deviation is 0
Let's suppose that you have a number of instances in which the average rating is 3. Each of these will have a variance -- if the raters all answered "3" then that variance will be zero. In such cases, why not use the average of the variances in which the average rating is 3 (including your 0 value)? This will give y...
Excel's confidence interval function throws #NUM! when standard deviation is 0
Let's suppose that you have a number of instances in which the average rating is 3. Each of these will have a variance -- if the raters all answered "3" then that variance will be zero. In such case
Excel's confidence interval function throws #NUM! when standard deviation is 0 Let's suppose that you have a number of instances in which the average rating is 3. Each of these will have a variance -- if the raters all answered "3" then that variance will be zero. In such cases, why not use the average of the varianc...
Excel's confidence interval function throws #NUM! when standard deviation is 0 Let's suppose that you have a number of instances in which the average rating is 3. Each of these will have a variance -- if the raters all answered "3" then that variance will be zero. In such case
53,963
Test for the effect of UN ratification on corruption in a set of countries
It's probably not a good idea without digging deeper into the source surveys. TI themselves note that changes in a country's index can come from either a change in corruption or just a change in methodology of the sources that they use. The sources themselves change over time as well, so comparing the index from year t...
Test for the effect of UN ratification on corruption in a set of countries
It's probably not a good idea without digging deeper into the source surveys. TI themselves note that changes in a country's index can come from either a change in corruption or just a change in metho
Test for the effect of UN ratification on corruption in a set of countries It's probably not a good idea without digging deeper into the source surveys. TI themselves note that changes in a country's index can come from either a change in corruption or just a change in methodology of the sources that they use. The sour...
Test for the effect of UN ratification on corruption in a set of countries It's probably not a good idea without digging deeper into the source surveys. TI themselves note that changes in a country's index can come from either a change in corruption or just a change in metho
53,964
Test for the effect of UN ratification on corruption in a set of countries
One problem with your pre-post paired t-test idea is that it chould give a small p-value if there's a general upward (or downward) trend in the corruption score over time regardless of ratification. You need some sort of comparison group in which the ratification status did not change between the two time points. In pr...
Test for the effect of UN ratification on corruption in a set of countries
One problem with your pre-post paired t-test idea is that it chould give a small p-value if there's a general upward (or downward) trend in the corruption score over time regardless of ratification. Y
Test for the effect of UN ratification on corruption in a set of countries One problem with your pre-post paired t-test idea is that it chould give a small p-value if there's a general upward (or downward) trend in the corruption score over time regardless of ratification. You need some sort of comparison group in whic...
Test for the effect of UN ratification on corruption in a set of countries One problem with your pre-post paired t-test idea is that it chould give a small p-value if there's a general upward (or downward) trend in the corruption score over time regardless of ratification. Y
53,965
Interpreting interactions between two treatments
If I understand you correctly, your design is: $\begin{array}{rcccl} ~ & B_{X} & B_{B} & M \\\hline A_{X} & \mu_{11} & \mu_{12} & \mu_{1.} \\ A_{A} & \mu_{21} & \mu_{22} & \mu_{2.} \\\hline M & \mu_{.1} & \mu_{.2} & \mu \end{array}$ The first part of your hypothesis (effect of treatment B within ...
Interpreting interactions between two treatments
If I understand you correctly, your design is: $\begin{array}{rcccl} ~ & B_{X} & B_{B} & M \\\hline A_{X} & \mu_{11} & \mu_{12} & \mu_{1.} \\ A_{A} & \mu_{21} & \mu_{22} & \mu_{2.} \\
Interpreting interactions between two treatments If I understand you correctly, your design is: $\begin{array}{rcccl} ~ & B_{X} & B_{B} & M \\\hline A_{X} & \mu_{11} & \mu_{12} & \mu_{1.} \\ A_{A} & \mu_{21} & \mu_{22} & \mu_{2.} \\\hline M & \mu_{.1} & \mu_{.2} & \mu \end{array}$ The first part ...
Interpreting interactions between two treatments If I understand you correctly, your design is: $\begin{array}{rcccl} ~ & B_{X} & B_{B} & M \\\hline A_{X} & \mu_{11} & \mu_{12} & \mu_{1.} \\ A_{A} & \mu_{21} & \mu_{22} & \mu_{2.} \\
53,966
Interpreting interactions between two treatments
If in post hoc testing Group 3's mean was significantly different from all the others' then you've already shown that XB is different from AB. Am I missing something? Your statement about B's effect (and its being lost when combined with A's) would be correct.
Interpreting interactions between two treatments
If in post hoc testing Group 3's mean was significantly different from all the others' then you've already shown that XB is different from AB. Am I missing something? Your statement about B's effect
Interpreting interactions between two treatments If in post hoc testing Group 3's mean was significantly different from all the others' then you've already shown that XB is different from AB. Am I missing something? Your statement about B's effect (and its being lost when combined with A's) would be correct.
Interpreting interactions between two treatments If in post hoc testing Group 3's mean was significantly different from all the others' then you've already shown that XB is different from AB. Am I missing something? Your statement about B's effect
53,967
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$
(This response picks up where @AVB, who has provided useful comments, left off by suggesting we need to figure out which differences $X_i - X_j$ ought to be included among the independent variables.) The big question here is what is an effective method to identify the model. Later we can worry about faster methods. (...
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$
(This response picks up where @AVB, who has provided useful comments, left off by suggesting we need to figure out which differences $X_i - X_j$ ought to be included among the independent variables.)
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$ (This response picks up where @AVB, who has provided useful comments, left off by suggesting we need to figure out which differences $X_i - X_j$ ought to be included among the independent variables.) The big question here is what is an effe...
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$ (This response picks up where @AVB, who has provided useful comments, left off by suggesting we need to figure out which differences $X_i - X_j$ ought to be included among the independent variables.)
53,968
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$
You can not use the 36-coefficient model, and not because it's going to be slow. Speed is the least of your worries here. The real trouble is that you've taken an already under-determined problem (because of the correlations), and converted it into a problem which is severely under-determined for any data, because of ...
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$
You can not use the 36-coefficient model, and not because it's going to be slow. Speed is the least of your worries here. The real trouble is that you've taken an already under-determined problem (be
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$ You can not use the 36-coefficient model, and not because it's going to be slow. Speed is the least of your worries here. The real trouble is that you've taken an already under-determined problem (because of the correlations), and converte...
Effectively fitting this kind of model: $y = c_1 (x_3 - x_4) + c_2 (x_1 - x_9)$ You can not use the 36-coefficient model, and not because it's going to be slow. Speed is the least of your worries here. The real trouble is that you've taken an already under-determined problem (be
53,969
Is there a limit function in R? [closed]
All links in this answer are dead. Following the advice of this answer on the r-help mailing list, you can find examples in the sympy help file in the rSymPy and in the Ryacas vignette in the Ryacas package. In general, all of the work that I do in R requires mathematical computations, and R does an excellent job of fa...
Is there a limit function in R? [closed]
All links in this answer are dead. Following the advice of this answer on the r-help mailing list, you can find examples in the sympy help file in the rSymPy and in the Ryacas vignette in the Ryacas p
Is there a limit function in R? [closed] All links in this answer are dead. Following the advice of this answer on the r-help mailing list, you can find examples in the sympy help file in the rSymPy and in the Ryacas vignette in the Ryacas package. In general, all of the work that I do in R requires mathematical comput...
Is there a limit function in R? [closed] All links in this answer are dead. Following the advice of this answer on the r-help mailing list, you can find examples in the sympy help file in the rSymPy and in the Ryacas vignette in the Ryacas p
53,970
Is there a limit function in R? [closed]
As @David mentioned, R is not doing symbolic calculations on its own, and such jobs should be done in other programs or with wrapper packages. Yet, calculating limit numerically is usually quite easy -- in most cases you just need to find argument $n$ large enough so the difference between $f(n+1)-f(n)$ is smaller than...
Is there a limit function in R? [closed]
As @David mentioned, R is not doing symbolic calculations on its own, and such jobs should be done in other programs or with wrapper packages. Yet, calculating limit numerically is usually quite easy
Is there a limit function in R? [closed] As @David mentioned, R is not doing symbolic calculations on its own, and such jobs should be done in other programs or with wrapper packages. Yet, calculating limit numerically is usually quite easy -- in most cases you just need to find argument $n$ large enough so the differe...
Is there a limit function in R? [closed] As @David mentioned, R is not doing symbolic calculations on its own, and such jobs should be done in other programs or with wrapper packages. Yet, calculating limit numerically is usually quite easy
53,971
Aggregation-Level in AB-Tests
If the treatment is randomly assigned the aggregation won't matter in determining the effect of the treatment (or the average treatment effect). I use lowercase in the following examples to refer to disaggregated items and uppercase to refer to aggregated items. Lets a priori state a model of individual decision making...
Aggregation-Level in AB-Tests
If the treatment is randomly assigned the aggregation won't matter in determining the effect of the treatment (or the average treatment effect). I use lowercase in the following examples to refer to d
Aggregation-Level in AB-Tests If the treatment is randomly assigned the aggregation won't matter in determining the effect of the treatment (or the average treatment effect). I use lowercase in the following examples to refer to disaggregated items and uppercase to refer to aggregated items. Lets a priori state a model...
Aggregation-Level in AB-Tests If the treatment is randomly assigned the aggregation won't matter in determining the effect of the treatment (or the average treatment effect). I use lowercase in the following examples to refer to d
53,972
Aggregation-Level in AB-Tests
The right level of aggregation depends on the time period over which you wish to generalize. For example, you want to deploy A during nights across several sites but are unsure about its effectiveness relative to the existing option B. Thus, you may deploy A over a small number of sites and see its effects relative to...
Aggregation-Level in AB-Tests
The right level of aggregation depends on the time period over which you wish to generalize. For example, you want to deploy A during nights across several sites but are unsure about its effectivenes
Aggregation-Level in AB-Tests The right level of aggregation depends on the time period over which you wish to generalize. For example, you want to deploy A during nights across several sites but are unsure about its effectiveness relative to the existing option B. Thus, you may deploy A over a small number of sites a...
Aggregation-Level in AB-Tests The right level of aggregation depends on the time period over which you wish to generalize. For example, you want to deploy A during nights across several sites but are unsure about its effectivenes
53,973
Aggregation-Level in AB-Tests
Raw data without aggregation is the easiest way, can conveniently handle more complex situations. with enough traffic you can make nearly anything significant within one day? Compared with most academic studies, the sample size of ab-test in tech companies is generally large. Still, most ab-test are actually under po...
Aggregation-Level in AB-Tests
Raw data without aggregation is the easiest way, can conveniently handle more complex situations. with enough traffic you can make nearly anything significant within one day? Compared with most acad
Aggregation-Level in AB-Tests Raw data without aggregation is the easiest way, can conveniently handle more complex situations. with enough traffic you can make nearly anything significant within one day? Compared with most academic studies, the sample size of ab-test in tech companies is generally large. Still, most...
Aggregation-Level in AB-Tests Raw data without aggregation is the easiest way, can conveniently handle more complex situations. with enough traffic you can make nearly anything significant within one day? Compared with most acad
53,974
How many data points do we need for mixed effects longitudinal data?
No, you don't need to remove individuals with data for only only one (or only a limited number) of timepoints. You're right to think that individuals with only one timepoint contribute nothing to estimation of the slope but they contribute to estimation of the intercept and you want to estimate both jointly. The maths ...
How many data points do we need for mixed effects longitudinal data?
No, you don't need to remove individuals with data for only only one (or only a limited number) of timepoints. You're right to think that individuals with only one timepoint contribute nothing to esti
How many data points do we need for mixed effects longitudinal data? No, you don't need to remove individuals with data for only only one (or only a limited number) of timepoints. You're right to think that individuals with only one timepoint contribute nothing to estimation of the slope but they contribute to estimati...
How many data points do we need for mixed effects longitudinal data? No, you don't need to remove individuals with data for only only one (or only a limited number) of timepoints. You're right to think that individuals with only one timepoint contribute nothing to esti
53,975
Recreating traditional null hypothesis testing with Bayesian methods
When you're computing Bayes factors, the priors matter. The influence of the priors can persist even if you have a large amount of data. When you're doing posterior inference, the effect of the prior goes away as you collect more data, but not so with Bayes factors. Also, you'll get faster convergence if your null and...
Recreating traditional null hypothesis testing with Bayesian methods
When you're computing Bayes factors, the priors matter. The influence of the priors can persist even if you have a large amount of data. When you're doing posterior inference, the effect of the prior
Recreating traditional null hypothesis testing with Bayesian methods When you're computing Bayes factors, the priors matter. The influence of the priors can persist even if you have a large amount of data. When you're doing posterior inference, the effect of the prior goes away as you collect more data, but not so wit...
Recreating traditional null hypothesis testing with Bayesian methods When you're computing Bayes factors, the priors matter. The influence of the priors can persist even if you have a large amount of data. When you're doing posterior inference, the effect of the prior
53,976
Recreating traditional null hypothesis testing with Bayesian methods
I'm note sure I follow the R-code as I have only used R once or twice, but it looks to me as if you are comparing the marginal likelihood of a model with only an intercept and no slope (hadcru.mcmc.zero) and the marginal likelihood of a model with a slope and an intercept (hadcru.mcmc). However, while hadcru.mcmc.zero...
Recreating traditional null hypothesis testing with Bayesian methods
I'm note sure I follow the R-code as I have only used R once or twice, but it looks to me as if you are comparing the marginal likelihood of a model with only an intercept and no slope (hadcru.mcmc.ze
Recreating traditional null hypothesis testing with Bayesian methods I'm note sure I follow the R-code as I have only used R once or twice, but it looks to me as if you are comparing the marginal likelihood of a model with only an intercept and no slope (hadcru.mcmc.zero) and the marginal likelihood of a model with a s...
Recreating traditional null hypothesis testing with Bayesian methods I'm note sure I follow the R-code as I have only used R once or twice, but it looks to me as if you are comparing the marginal likelihood of a model with only an intercept and no slope (hadcru.mcmc.ze
53,977
Recreating traditional null hypothesis testing with Bayesian methods
I do not know the packages you are using or their internal working but perhaps the choice of priors matter? Perhaps, you should consider using different prior structures to see how sensitive the mcmc marginal likelihoods are to your choice of priors. In particular, I suspect that the mcmc and the traditional likelihood...
Recreating traditional null hypothesis testing with Bayesian methods
I do not know the packages you are using or their internal working but perhaps the choice of priors matter? Perhaps, you should consider using different prior structures to see how sensitive the mcmc
Recreating traditional null hypothesis testing with Bayesian methods I do not know the packages you are using or their internal working but perhaps the choice of priors matter? Perhaps, you should consider using different prior structures to see how sensitive the mcmc marginal likelihoods are to your choice of priors. ...
Recreating traditional null hypothesis testing with Bayesian methods I do not know the packages you are using or their internal working but perhaps the choice of priors matter? Perhaps, you should consider using different prior structures to see how sensitive the mcmc
53,978
Elasticities Using GLM
In the usual case with a log variable, the model is \begin{align} \log(y) &= a + b\log(x) + \varepsilon\newline \text{or}\quad y &= e^a x^b e^\varepsilon, \end{align} where $\varepsilon\sim\text{N}(0,\sigma^2)$ and $b$ is the elasticity. In the situation you mention, \begin{align} y &= \exp[a + b\log(x)] + \varepsilon...
Elasticities Using GLM
In the usual case with a log variable, the model is \begin{align} \log(y) &= a + b\log(x) + \varepsilon\newline \text{or}\quad y &= e^a x^b e^\varepsilon, \end{align} where $\varepsilon\sim\text{N}(0,
Elasticities Using GLM In the usual case with a log variable, the model is \begin{align} \log(y) &= a + b\log(x) + \varepsilon\newline \text{or}\quad y &= e^a x^b e^\varepsilon, \end{align} where $\varepsilon\sim\text{N}(0,\sigma^2)$ and $b$ is the elasticity. In the situation you mention, \begin{align} y &= \exp[a + ...
Elasticities Using GLM In the usual case with a log variable, the model is \begin{align} \log(y) &= a + b\log(x) + \varepsilon\newline \text{or}\quad y &= e^a x^b e^\varepsilon, \end{align} where $\varepsilon\sim\text{N}(0,
53,979
How can I fit a distribution to a dataset while forcing it through an exact point in r?
You can fit a gamma distribution in R with optim, e.g. by minimizing the sum of squared errors for the mean and the 95th percentile, which actually sets both errors to zero: obs = c(28.744,385.714,20.595,99.350,31.864,77.713, 264.408,21.204,31.937,0.900,18.762,173.276,23.707) tail = 500.912 error = function(x)(...
How can I fit a distribution to a dataset while forcing it through an exact point in r?
You can fit a gamma distribution in R with optim, e.g. by minimizing the sum of squared errors for the mean and the 95th percentile, which actually sets both errors to zero: obs = c(28.744,385.714,20.
How can I fit a distribution to a dataset while forcing it through an exact point in r? You can fit a gamma distribution in R with optim, e.g. by minimizing the sum of squared errors for the mean and the 95th percentile, which actually sets both errors to zero: obs = c(28.744,385.714,20.595,99.350,31.864,77.713, ...
How can I fit a distribution to a dataset while forcing it through an exact point in r? You can fit a gamma distribution in R with optim, e.g. by minimizing the sum of squared errors for the mean and the 95th percentile, which actually sets both errors to zero: obs = c(28.744,385.714,20.
53,980
How can I fit a distribution to a dataset while forcing it through an exact point in r?
For distribution with a scale parameter such as the gamma and the weibull, the likelihood can be maximised numerically with respect to the remaining parameters (the shape in case of the gamma and the weibull) since for any given value of those parameters (the shape), there will be only a single value of the scale param...
How can I fit a distribution to a dataset while forcing it through an exact point in r?
For distribution with a scale parameter such as the gamma and the weibull, the likelihood can be maximised numerically with respect to the remaining parameters (the shape in case of the gamma and the
How can I fit a distribution to a dataset while forcing it through an exact point in r? For distribution with a scale parameter such as the gamma and the weibull, the likelihood can be maximised numerically with respect to the remaining parameters (the shape in case of the gamma and the weibull) since for any given val...
How can I fit a distribution to a dataset while forcing it through an exact point in r? For distribution with a scale parameter such as the gamma and the weibull, the likelihood can be maximised numerically with respect to the remaining parameters (the shape in case of the gamma and the
53,981
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to variance estimation
There's situations where you can bootstrap. If your sample size is large, then bootstrapping when possible is really convenient for a number of reasons: If it works, then it works for almost any metric you can define, while frequentist analytical solutions tend to be derived for one metric at a time (bad luck if your ...
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to varianc
There's situations where you can bootstrap. If your sample size is large, then bootstrapping when possible is really convenient for a number of reasons: If it works, then it works for almost any metr
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to variance estimation There's situations where you can bootstrap. If your sample size is large, then bootstrapping when possible is really convenient for a number of reasons: If it works, then it works for almost any metric you ...
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to varianc There's situations where you can bootstrap. If your sample size is large, then bootstrapping when possible is really convenient for a number of reasons: If it works, then it works for almost any metr
53,982
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to variance estimation
I tend to have data with inherent structure, such as multiple samples per patient, multiple measurements per sample and the like. In that situation, the statistically independent unit is typically the patient rather than the row of the data matrix. (In some cases, independence is even more complicated, with multiple to...
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to varianc
I tend to have data with inherent structure, such as multiple samples per patient, multiple measurements per sample and the like. In that situation, the statistically independent unit is typically the
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to variance estimation I tend to have data with inherent structure, such as multiple samples per patient, multiple measurements per sample and the like. In that situation, the statistically independent unit is typically the patien...
Confidence intervals for accuracy metrics: pros and cons of the bootstrap method compared to varianc I tend to have data with inherent structure, such as multiple samples per patient, multiple measurements per sample and the like. In that situation, the statistically independent unit is typically the
53,983
Central limit theorem notation
You already answered it yourself $$\bar{X}_n = \frac{X_1+...+X_i+...+X_n}{n}$$ $\bar{X}_n$ is a sample mean. The subscript here refers to the sample size. $X_i$ is a variable in the sample. The subscript here refers to the id of the variable. The id's are the integers from 1 untill n. An example is the image bel...
Central limit theorem notation
You already answered it yourself $$\bar{X}_n = \frac{X_1+...+X_i+...+X_n}{n}$$ $\bar{X}_n$ is a sample mean. The subscript here refers to the sample size. $X_i$ is a variable in the sample. The su
Central limit theorem notation You already answered it yourself $$\bar{X}_n = \frac{X_1+...+X_i+...+X_n}{n}$$ $\bar{X}_n$ is a sample mean. The subscript here refers to the sample size. $X_i$ is a variable in the sample. The subscript here refers to the id of the variable. The id's are the integers from 1 untill n....
Central limit theorem notation You already answered it yourself $$\bar{X}_n = \frac{X_1+...+X_i+...+X_n}{n}$$ $\bar{X}_n$ is a sample mean. The subscript here refers to the sample size. $X_i$ is a variable in the sample. The su
53,984
Central limit theorem notation
So I think you have a common misunderstanding. each $X_i$ is a single observation. Just as 1 throw of a dice has uniform distribution on 1-6 ( you don't need to consider throwing 1000s of dice), a single sample mean is approximately distributed normally ( with the approximation improving as the sample size increases). ...
Central limit theorem notation
So I think you have a common misunderstanding. each $X_i$ is a single observation. Just as 1 throw of a dice has uniform distribution on 1-6 ( you don't need to consider throwing 1000s of dice), a sin
Central limit theorem notation So I think you have a common misunderstanding. each $X_i$ is a single observation. Just as 1 throw of a dice has uniform distribution on 1-6 ( you don't need to consider throwing 1000s of dice), a single sample mean is approximately distributed normally ( with the approximation improving ...
Central limit theorem notation So I think you have a common misunderstanding. each $X_i$ is a single observation. Just as 1 throw of a dice has uniform distribution on 1-6 ( you don't need to consider throwing 1000s of dice), a sin
53,985
Central limit theorem notation
As extensively already discussed by others and in the comments, the Central Limit Theorem tells us about the behaviour of the distribution of standardized sample averages $\bar X_i$ as $i$ becomes large, where $X_i$ and its space play no role. In the Central Limit Theorem, the basic underlying hypothesis is For each $...
Central limit theorem notation
As extensively already discussed by others and in the comments, the Central Limit Theorem tells us about the behaviour of the distribution of standardized sample averages $\bar X_i$ as $i$ becomes lar
Central limit theorem notation As extensively already discussed by others and in the comments, the Central Limit Theorem tells us about the behaviour of the distribution of standardized sample averages $\bar X_i$ as $i$ becomes large, where $X_i$ and its space play no role. In the Central Limit Theorem, the basic under...
Central limit theorem notation As extensively already discussed by others and in the comments, the Central Limit Theorem tells us about the behaviour of the distribution of standardized sample averages $\bar X_i$ as $i$ becomes lar
53,986
Kullback–Leibler divergence between two normal distributions
Note that the Kullback-Leibler divergence, which as you rightly point out is not symmetric, is $$ \begin{align*} \text{KL}(P\vert\vert Q) & = \int p(x)\log\left(\frac{p(x)}{q(x)}\right) \,\text{d}x = \int p(x)\log \left(\frac{1}{q(x)}\right)\,\text{d}x - \int p(x)\log \left(\frac{1}{p(x)}\right)\text{d}x\\ & = H(P,Q) -...
Kullback–Leibler divergence between two normal distributions
Note that the Kullback-Leibler divergence, which as you rightly point out is not symmetric, is $$ \begin{align*} \text{KL}(P\vert\vert Q) & = \int p(x)\log\left(\frac{p(x)}{q(x)}\right) \,\text{d}x =
Kullback–Leibler divergence between two normal distributions Note that the Kullback-Leibler divergence, which as you rightly point out is not symmetric, is $$ \begin{align*} \text{KL}(P\vert\vert Q) & = \int p(x)\log\left(\frac{p(x)}{q(x)}\right) \,\text{d}x = \int p(x)\log \left(\frac{1}{q(x)}\right)\,\text{d}x - \int...
Kullback–Leibler divergence between two normal distributions Note that the Kullback-Leibler divergence, which as you rightly point out is not symmetric, is $$ \begin{align*} \text{KL}(P\vert\vert Q) & = \int p(x)\log\left(\frac{p(x)}{q(x)}\right) \,\text{d}x =
53,987
Is it a confounder on not?
As Noah points out in a comment, the unobserved confounder is indeed a confounder since it creates a back-door path between treatment and growth. However, the model as presented does not contain a causal path between treatment and growth. Dagitty, which is where I presume your figure is from, will tell you that you can...
Is it a confounder on not?
As Noah points out in a comment, the unobserved confounder is indeed a confounder since it creates a back-door path between treatment and growth. However, the model as presented does not contain a cau
Is it a confounder on not? As Noah points out in a comment, the unobserved confounder is indeed a confounder since it creates a back-door path between treatment and growth. However, the model as presented does not contain a causal path between treatment and growth. Dagitty, which is where I presume your figure is from,...
Is it a confounder on not? As Noah points out in a comment, the unobserved confounder is indeed a confounder since it creates a back-door path between treatment and growth. However, the model as presented does not contain a cau
53,988
Is there any intuitive meaning to $\beta^T A \beta=1$?
Summary: The expression $\beta^\prime A\beta$ generalizes the usual squared Euclidean distance. The set of $\beta$ for which $\beta^\prime A \beta = 1$ is often a sphere, when considered from the correct perspective; and generally it is always a linear transformation of a cylinder defined over a sphere or hyperboloid....
Is there any intuitive meaning to $\beta^T A \beta=1$?
Summary: The expression $\beta^\prime A\beta$ generalizes the usual squared Euclidean distance. The set of $\beta$ for which $\beta^\prime A \beta = 1$ is often a sphere, when considered from the cor
Is there any intuitive meaning to $\beta^T A \beta=1$? Summary: The expression $\beta^\prime A\beta$ generalizes the usual squared Euclidean distance. The set of $\beta$ for which $\beta^\prime A \beta = 1$ is often a sphere, when considered from the correct perspective; and generally it is always a linear transformat...
Is there any intuitive meaning to $\beta^T A \beta=1$? Summary: The expression $\beta^\prime A\beta$ generalizes the usual squared Euclidean distance. The set of $\beta$ for which $\beta^\prime A \beta = 1$ is often a sphere, when considered from the cor
53,989
Is there any intuitive meaning to $\beta^T A \beta=1$?
Note that, for any vectors $a$ and $b$ in an inner-product space such as $\mathbb R^d$, one possible inner-product can be defined as $$a^T b = a \cdot b = \|a\|\|b\| \cos \theta$$ where $\|\cdot\|$ is the Euclidean norm of the vector and $\theta$ is the angle between the two vectors. Therefore, \begin{align} \beta^T A\...
Is there any intuitive meaning to $\beta^T A \beta=1$?
Note that, for any vectors $a$ and $b$ in an inner-product space such as $\mathbb R^d$, one possible inner-product can be defined as $$a^T b = a \cdot b = \|a\|\|b\| \cos \theta$$ where $\|\cdot\|$ is
Is there any intuitive meaning to $\beta^T A \beta=1$? Note that, for any vectors $a$ and $b$ in an inner-product space such as $\mathbb R^d$, one possible inner-product can be defined as $$a^T b = a \cdot b = \|a\|\|b\| \cos \theta$$ where $\|\cdot\|$ is the Euclidean norm of the vector and $\theta$ is the angle betwe...
Is there any intuitive meaning to $\beta^T A \beta=1$? Note that, for any vectors $a$ and $b$ in an inner-product space such as $\mathbb R^d$, one possible inner-product can be defined as $$a^T b = a \cdot b = \|a\|\|b\| \cos \theta$$ where $\|\cdot\|$ is
53,990
XGBoost when P>>N
Data is king, so if it works in real life we can't argue with it. Having said that, I agree with you it's bad practice and will usually not end well. I can design a dataset where it would work though. Images for example are known for having correlation between close pixels, effectively reducing the number of features w...
XGBoost when P>>N
Data is king, so if it works in real life we can't argue with it. Having said that, I agree with you it's bad practice and will usually not end well. I can design a dataset where it would work though.
XGBoost when P>>N Data is king, so if it works in real life we can't argue with it. Having said that, I agree with you it's bad practice and will usually not end well. I can design a dataset where it would work though. Images for example are known for having correlation between close pixels, effectively reducing the nu...
XGBoost when P>>N Data is king, so if it works in real life we can't argue with it. Having said that, I agree with you it's bad practice and will usually not end well. I can design a dataset where it would work though.
53,991
Interpreting logistic modelling and linear modelling results for the same formula
You have quite a lot of data, and very well-behaved data. In such a case, it does happen that the model fits from an ordinary and a logistic regression are close to each other, especially in the "middle" part of fitted probabilities, as are the p-values for the coefficients. Note, though, that there are differences. Th...
Interpreting logistic modelling and linear modelling results for the same formula
You have quite a lot of data, and very well-behaved data. In such a case, it does happen that the model fits from an ordinary and a logistic regression are close to each other, especially in the "midd
Interpreting logistic modelling and linear modelling results for the same formula You have quite a lot of data, and very well-behaved data. In such a case, it does happen that the model fits from an ordinary and a logistic regression are close to each other, especially in the "middle" part of fitted probabilities, as a...
Interpreting logistic modelling and linear modelling results for the same formula You have quite a lot of data, and very well-behaved data. In such a case, it does happen that the model fits from an ordinary and a logistic regression are close to each other, especially in the "midd
53,992
Interpreting logistic modelling and linear modelling results for the same formula
why when linear modelling, which works best for continuous data gave very close results to logistic modelling even when I had a dichotomous response variable? The logistic curve can be approximated with a linear function for a small range. See in the image below a plot of the logistic curve and how in a small range (i...
Interpreting logistic modelling and linear modelling results for the same formula
why when linear modelling, which works best for continuous data gave very close results to logistic modelling even when I had a dichotomous response variable? The logistic curve can be approximated w
Interpreting logistic modelling and linear modelling results for the same formula why when linear modelling, which works best for continuous data gave very close results to logistic modelling even when I had a dichotomous response variable? The logistic curve can be approximated with a linear function for a small rang...
Interpreting logistic modelling and linear modelling results for the same formula why when linear modelling, which works best for continuous data gave very close results to logistic modelling even when I had a dichotomous response variable? The logistic curve can be approximated w
53,993
Calculate standard deviation with only the averages from a number of samples
To proceed in general, suppose we have $n$ samples that each contain $m$ values, generated as IID variables from an underlying superpopulation with mean parameter $\mu$ and standard deviation parameter $\sigma$. Now, suppose we define the quantities: $$\bar{X}_k \equiv \frac{1}{m} \sum_{j=1}^m X_{k,j} \quad \quad \qua...
Calculate standard deviation with only the averages from a number of samples
To proceed in general, suppose we have $n$ samples that each contain $m$ values, generated as IID variables from an underlying superpopulation with mean parameter $\mu$ and standard deviation paramete
Calculate standard deviation with only the averages from a number of samples To proceed in general, suppose we have $n$ samples that each contain $m$ values, generated as IID variables from an underlying superpopulation with mean parameter $\mu$ and standard deviation parameter $\sigma$. Now, suppose we define the qua...
Calculate standard deviation with only the averages from a number of samples To proceed in general, suppose we have $n$ samples that each contain $m$ values, generated as IID variables from an underlying superpopulation with mean parameter $\mu$ and standard deviation paramete
53,994
Linear relationship seems to depends from one value: would bootstraping help?
First off: If I extend this argument, would removing other value also impact the relationship? Almost certainly yes. The regression line slope depends on all observations, so removing any point will change the estimate, and therefore also the $p$ value. (It is possible, but unlikely, that there are data points with n...
Linear relationship seems to depends from one value: would bootstraping help?
First off: If I extend this argument, would removing other value also impact the relationship? Almost certainly yes. The regression line slope depends on all observations, so removing any point will
Linear relationship seems to depends from one value: would bootstraping help? First off: If I extend this argument, would removing other value also impact the relationship? Almost certainly yes. The regression line slope depends on all observations, so removing any point will change the estimate, and therefore also t...
Linear relationship seems to depends from one value: would bootstraping help? First off: If I extend this argument, would removing other value also impact the relationship? Almost certainly yes. The regression line slope depends on all observations, so removing any point will
53,995
Interpreting interaction effects for categorical reference group in regression
First, with the default R treatment coding of your categorical predictors, the individual coefficients for things like Story Vision are their associations with outcome when all other predictors are at reference (categorical predictors) or 0 levels (continuous predictors, like Brand Attitude seems to be). So the Story V...
Interpreting interaction effects for categorical reference group in regression
First, with the default R treatment coding of your categorical predictors, the individual coefficients for things like Story Vision are their associations with outcome when all other predictors are at
Interpreting interaction effects for categorical reference group in regression First, with the default R treatment coding of your categorical predictors, the individual coefficients for things like Story Vision are their associations with outcome when all other predictors are at reference (categorical predictors) or 0 ...
Interpreting interaction effects for categorical reference group in regression First, with the default R treatment coding of your categorical predictors, the individual coefficients for things like Story Vision are their associations with outcome when all other predictors are at
53,996
Interpreting interaction effects for categorical reference group in regression
@EdM makes valid points - read those first. Just for reference, you could get the effects of interest along with their confidence intervals using the emmeans package. For example: library(emmeans) # Toy data: add a dummy categorical variable to the Iris dataset iris$Style <- rep(LETTERS[1:3], 50) iris Sepal.Leng...
Interpreting interaction effects for categorical reference group in regression
@EdM makes valid points - read those first. Just for reference, you could get the effects of interest along with their confidence intervals using the emmeans package. For example: library(emmeans) #
Interpreting interaction effects for categorical reference group in regression @EdM makes valid points - read those first. Just for reference, you could get the effects of interest along with their confidence intervals using the emmeans package. For example: library(emmeans) # Toy data: add a dummy categorical variabl...
Interpreting interaction effects for categorical reference group in regression @EdM makes valid points - read those first. Just for reference, you could get the effects of interest along with their confidence intervals using the emmeans package. For example: library(emmeans) #
53,997
Can RandomForest multiplicatively combine features?
A tree can form a lot of splits of the form $A>a_i$ or $B>b_i$. Enough of such splits in a single tree can give you a step function that can then approximate just about any function of $A$ and $B$. In RF you usually limit how deep each tree gets, but instead average over lots of trees, which in combination again can gi...
Can RandomForest multiplicatively combine features?
A tree can form a lot of splits of the form $A>a_i$ or $B>b_i$. Enough of such splits in a single tree can give you a step function that can then approximate just about any function of $A$ and $B$. In
Can RandomForest multiplicatively combine features? A tree can form a lot of splits of the form $A>a_i$ or $B>b_i$. Enough of such splits in a single tree can give you a step function that can then approximate just about any function of $A$ and $B$. In RF you usually limit how deep each tree gets, but instead average o...
Can RandomForest multiplicatively combine features? A tree can form a lot of splits of the form $A>a_i$ or $B>b_i$. Enough of such splits in a single tree can give you a step function that can then approximate just about any function of $A$ and $B$. In
53,998
Mistake in Casella & Berger on page 207?
That page describes identical and independently distributed variables $X_i$. You could change that quoted piece in more ways. Probably the following would be better Change Under the random sampling model each $X_i$ is an observation on the same variable and each $X_i$ has a marginal distribution given by $f(x)$. Into...
Mistake in Casella & Berger on page 207?
That page describes identical and independently distributed variables $X_i$. You could change that quoted piece in more ways. Probably the following would be better Change Under the random sampling m
Mistake in Casella & Berger on page 207? That page describes identical and independently distributed variables $X_i$. You could change that quoted piece in more ways. Probably the following would be better Change Under the random sampling model each $X_i$ is an observation on the same variable and each $X_i$ has a mar...
Mistake in Casella & Berger on page 207? That page describes identical and independently distributed variables $X_i$. You could change that quoted piece in more ways. Probably the following would be better Change Under the random sampling m
53,999
Mistake in Casella & Berger on page 207?
I think the source of confusion comes from the word observation and it's meaning in various contexts. I have to confess that this book was not my first statistical book read and perhaps this helped me to handle that easier. The paragraph from Page 207 I understand it as: Under the random sampling model each $X_i$ is a...
Mistake in Casella & Berger on page 207?
I think the source of confusion comes from the word observation and it's meaning in various contexts. I have to confess that this book was not my first statistical book read and perhaps this helped me
Mistake in Casella & Berger on page 207? I think the source of confusion comes from the word observation and it's meaning in various contexts. I have to confess that this book was not my first statistical book read and perhaps this helped me to handle that easier. The paragraph from Page 207 I understand it as: Under ...
Mistake in Casella & Berger on page 207? I think the source of confusion comes from the word observation and it's meaning in various contexts. I have to confess that this book was not my first statistical book read and perhaps this helped me
54,000
GLM tests involving deviance and likelihood ratios
The confusion probably comes from the fact that there are three models involved, and the term "deviance" refers to twice the log or the likelihood ratio between two of them. The models are: Null model (usually a model with only an intercept term, no influence of explanatory variables on response), GLM of interest, mod...
GLM tests involving deviance and likelihood ratios
The confusion probably comes from the fact that there are three models involved, and the term "deviance" refers to twice the log or the likelihood ratio between two of them. The models are: Null mode
GLM tests involving deviance and likelihood ratios The confusion probably comes from the fact that there are three models involved, and the term "deviance" refers to twice the log or the likelihood ratio between two of them. The models are: Null model (usually a model with only an intercept term, no influence of expla...
GLM tests involving deviance and likelihood ratios The confusion probably comes from the fact that there are three models involved, and the term "deviance" refers to twice the log or the likelihood ratio between two of them. The models are: Null mode