idx
int64
1
56k
question
stringlengths
15
155
answer
stringlengths
2
29.2k
question_cut
stringlengths
15
100
answer_cut
stringlengths
2
200
conversation
stringlengths
47
29.3k
conversation_cut
stringlengths
47
301
46,801
How to construct an interaction plot
I'm not sure that I completely understand your supervisor's suggestion, but the principle that I use when choosing how to create a graph is the make sure that the graph represents the analysis that I'm reporting in my paper. Based on this principle, I would use whatever model to create your graph that you're reporting...
How to construct an interaction plot
I'm not sure that I completely understand your supervisor's suggestion, but the principle that I use when choosing how to create a graph is the make sure that the graph represents the analysis that I'
How to construct an interaction plot I'm not sure that I completely understand your supervisor's suggestion, but the principle that I use when choosing how to create a graph is the make sure that the graph represents the analysis that I'm reporting in my paper. Based on this principle, I would use whatever model to cr...
How to construct an interaction plot I'm not sure that I completely understand your supervisor's suggestion, but the principle that I use when choosing how to create a graph is the make sure that the graph represents the analysis that I'
46,802
How to construct an interaction plot
Might be worth saying explicitly what's wrong with your proposal & why you should follow the advice given in @Patrick's answer: First, if the model you're using involves other predictors besides the two involved in the interaction, you clearly need to specify values for all of them to make a prediction using the model....
How to construct an interaction plot
Might be worth saying explicitly what's wrong with your proposal & why you should follow the advice given in @Patrick's answer: First, if the model you're using involves other predictors besides the t
How to construct an interaction plot Might be worth saying explicitly what's wrong with your proposal & why you should follow the advice given in @Patrick's answer: First, if the model you're using involves other predictors besides the two involved in the interaction, you clearly need to specify values for all of them ...
How to construct an interaction plot Might be worth saying explicitly what's wrong with your proposal & why you should follow the advice given in @Patrick's answer: First, if the model you're using involves other predictors besides the t
46,803
A Reference for PAC-Bayesian?
Here are a few quick Google hits... PAC-Bayes Analysis: Background and Applications Probably Approximately Correct Learning and Vapnik-Chervonenkis Dimension Probably approximately correct learning on Wikipedia Overview of the Probably Approximately Correct (PAC) Learning Framework From this last one, a quote: A mor...
A Reference for PAC-Bayesian?
Here are a few quick Google hits... PAC-Bayes Analysis: Background and Applications Probably Approximately Correct Learning and Vapnik-Chervonenkis Dimension Probably approximately correct learning o
A Reference for PAC-Bayesian? Here are a few quick Google hits... PAC-Bayes Analysis: Background and Applications Probably Approximately Correct Learning and Vapnik-Chervonenkis Dimension Probably approximately correct learning on Wikipedia Overview of the Probably Approximately Correct (PAC) Learning Framework From ...
A Reference for PAC-Bayesian? Here are a few quick Google hits... PAC-Bayes Analysis: Background and Applications Probably Approximately Correct Learning and Vapnik-Chervonenkis Dimension Probably approximately correct learning o
46,804
A Reference for PAC-Bayesian?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. This paper is a good way to start : https://arxiv.org/...
A Reference for PAC-Bayesian?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
A Reference for PAC-Bayesian? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. This paper is a good way...
A Reference for PAC-Bayesian? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
46,805
A Reference for PAC-Bayesian?
A more recent elementary introduction to PAC-Bayes User-friendly introduction to PAC-Bayes bounds by Pierre Alquier. It is an 80 page study of this topic.
A Reference for PAC-Bayesian?
A more recent elementary introduction to PAC-Bayes User-friendly introduction to PAC-Bayes bounds by Pierre Alquier. It is an 80 page study of this topic.
A Reference for PAC-Bayesian? A more recent elementary introduction to PAC-Bayes User-friendly introduction to PAC-Bayes bounds by Pierre Alquier. It is an 80 page study of this topic.
A Reference for PAC-Bayesian? A more recent elementary introduction to PAC-Bayes User-friendly introduction to PAC-Bayes bounds by Pierre Alquier. It is an 80 page study of this topic.
46,806
Classification problem using imbalanced dataset
Removing samples from the majority class may cause the classifier to miss important concepts/features pertaining to the majority class. One strategy called informed undersampling demonstrated good results. Unsupervised learning algorithm is used to perform independent random sampling from majority class. Multiple class...
Classification problem using imbalanced dataset
Removing samples from the majority class may cause the classifier to miss important concepts/features pertaining to the majority class. One strategy called informed undersampling demonstrated good res
Classification problem using imbalanced dataset Removing samples from the majority class may cause the classifier to miss important concepts/features pertaining to the majority class. One strategy called informed undersampling demonstrated good results. Unsupervised learning algorithm is used to perform independent ran...
Classification problem using imbalanced dataset Removing samples from the majority class may cause the classifier to miss important concepts/features pertaining to the majority class. One strategy called informed undersampling demonstrated good res
46,807
Classification problem using imbalanced dataset
First of all, you don't need to down-sample, unless you don't have enough computing power to fit the model to the full dataset. An alternative approach is to assign target observations a weight of 99 and the non-target observations a weight of 1. This will mean the model considers 1 target mis-classification equal to...
Classification problem using imbalanced dataset
First of all, you don't need to down-sample, unless you don't have enough computing power to fit the model to the full dataset. An alternative approach is to assign target observations a weight of 99
Classification problem using imbalanced dataset First of all, you don't need to down-sample, unless you don't have enough computing power to fit the model to the full dataset. An alternative approach is to assign target observations a weight of 99 and the non-target observations a weight of 1. This will mean the mode...
Classification problem using imbalanced dataset First of all, you don't need to down-sample, unless you don't have enough computing power to fit the model to the full dataset. An alternative approach is to assign target observations a weight of 99
46,808
How to handle leverage values?
I'm going to stress that, in the absence of a well-defined analysis plan or protocol for handling such values, the answer is: you leave them in. You report unadulterated results as a primary analysis: the one in which the p-value is viewed as answering the main question. If it is necessary and instructive to discuss re...
How to handle leverage values?
I'm going to stress that, in the absence of a well-defined analysis plan or protocol for handling such values, the answer is: you leave them in. You report unadulterated results as a primary analysis:
How to handle leverage values? I'm going to stress that, in the absence of a well-defined analysis plan or protocol for handling such values, the answer is: you leave them in. You report unadulterated results as a primary analysis: the one in which the p-value is viewed as answering the main question. If it is necessar...
How to handle leverage values? I'm going to stress that, in the absence of a well-defined analysis plan or protocol for handling such values, the answer is: you leave them in. You report unadulterated results as a primary analysis:
46,809
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
Your calculation is correct. You simply need to interpret it. Which distribution has an MGF identically equal to 1? Alternatively, your problem can be approached without using MGFs. Recall that $\chi^2(n)$ has the distribution of a sum of $n$ squares of $N(0,1)$ random variables. What can you say about the limiting dis...
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
Your calculation is correct. You simply need to interpret it. Which distribution has an MGF identically equal to 1? Alternatively, your problem can be approached without using MGFs. Recall that $\chi^
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ Your calculation is correct. You simply need to interpret it. Which distribution has an MGF identically equal to 1? Alternatively, your problem can be approached without using MGFs. Recall that $\chi^2(n)$ has the distribution of a sum of $n$ squar...
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ Your calculation is correct. You simply need to interpret it. Which distribution has an MGF identically equal to 1? Alternatively, your problem can be approached without using MGFs. Recall that $\chi^
46,810
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
The other answer here gives a useful hint as to what happens. I'm going to show you another aspect of the problem. Using the moment generating functions, it is simple to show that: $$n W_n = \frac{Z_n}{n} \sim \text{Ga} \bigg( \text{Shape} = \frac{n}{2}, \ \text{Rate} = \frac{n}{2} \bigg).$$ This random variable has ...
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
The other answer here gives a useful hint as to what happens. I'm going to show you another aspect of the problem. Using the moment generating functions, it is simple to show that: $$n W_n = \frac{Z
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ The other answer here gives a useful hint as to what happens. I'm going to show you another aspect of the problem. Using the moment generating functions, it is simple to show that: $$n W_n = \frac{Z_n}{n} \sim \text{Ga} \bigg( \text{Shape} = \fra...
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ The other answer here gives a useful hint as to what happens. I'm going to show you another aspect of the problem. Using the moment generating functions, it is simple to show that: $$n W_n = \frac{Z
46,811
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
The limit should be degenerate at 0. pf: Zn/n2=(Zn/n)(1/n) ; Zn/n → 1 in probability, 1/n → 0 in probability ; Thus (Zn/n)(1/n) → 0 in probability and that equals (Zn/n)(1/n) → 0 in distribution such that Zn/n2 is degenerate at 0
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$
The limit should be degenerate at 0. pf: Zn/n2=(Zn/n)(1/n) ; Zn/n → 1 in probability, 1/n → 0 in probability ; Thus (Zn/n)(1/n) → 0 in probability and that equals (Zn/n)(1/n) → 0 in distribution such
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ The limit should be degenerate at 0. pf: Zn/n2=(Zn/n)(1/n) ; Zn/n → 1 in probability, 1/n → 0 in probability ; Thus (Zn/n)(1/n) → 0 in probability and that equals (Zn/n)(1/n) → 0 in distribution such that Zn/n2 is degenerate at 0
Limiting Distribution of $W_n=\frac{Z_n}{n^2}$ , $Z_n \sim \chi ^2 (n)$ The limit should be degenerate at 0. pf: Zn/n2=(Zn/n)(1/n) ; Zn/n → 1 in probability, 1/n → 0 in probability ; Thus (Zn/n)(1/n) → 0 in probability and that equals (Zn/n)(1/n) → 0 in distribution such
46,812
Metropolis algorithm, what is the target distribution and how to compose it?
MCMC is a strategy for generating samples $x(i)$ while exploring the state space $X $using a Markov chain mechanism. These are irreducible and aperiodic Markov chains that have $P_{target}(\theta)$ as the invariant distribution. This mechanism is constructed so that the chain spends more time in the most important reg...
Metropolis algorithm, what is the target distribution and how to compose it?
MCMC is a strategy for generating samples $x(i)$ while exploring the state space $X $using a Markov chain mechanism. These are irreducible and aperiodic Markov chains that have $P_{target}(\theta)$ as
Metropolis algorithm, what is the target distribution and how to compose it? MCMC is a strategy for generating samples $x(i)$ while exploring the state space $X $using a Markov chain mechanism. These are irreducible and aperiodic Markov chains that have $P_{target}(\theta)$ as the invariant distribution. This mechanis...
Metropolis algorithm, what is the target distribution and how to compose it? MCMC is a strategy for generating samples $x(i)$ while exploring the state space $X $using a Markov chain mechanism. These are irreducible and aperiodic Markov chains that have $P_{target}(\theta)$ as
46,813
Metropolis algorithm, what is the target distribution and how to compose it?
I guess that the missing "concept" is the one of "curse of dimensionality" (http://en.wikipedia.org/wiki/Curse_of_dimensionality) that would make your attempt to investigate your posterior by brute force griding irrelevant when the dimension of your posterior is not very small.
Metropolis algorithm, what is the target distribution and how to compose it?
I guess that the missing "concept" is the one of "curse of dimensionality" (http://en.wikipedia.org/wiki/Curse_of_dimensionality) that would make your attempt to investigate your posterior by brute fo
Metropolis algorithm, what is the target distribution and how to compose it? I guess that the missing "concept" is the one of "curse of dimensionality" (http://en.wikipedia.org/wiki/Curse_of_dimensionality) that would make your attempt to investigate your posterior by brute force griding irrelevant when the dimension o...
Metropolis algorithm, what is the target distribution and how to compose it? I guess that the missing "concept" is the one of "curse of dimensionality" (http://en.wikipedia.org/wiki/Curse_of_dimensionality) that would make your attempt to investigate your posterior by brute fo
46,814
Metropolis algorithm, what is the target distribution and how to compose it?
My problem is, we should know Ptarget(θ) before we doing this Metropolis process, right? Yes. The whole purpose of MCMC is to sample from the (known) target distribution, because handling it with other methods is difficult. For example, the target distribution might be multi-dimensional and maybe you only need the ma...
Metropolis algorithm, what is the target distribution and how to compose it?
My problem is, we should know Ptarget(θ) before we doing this Metropolis process, right? Yes. The whole purpose of MCMC is to sample from the (known) target distribution, because handling it with ot
Metropolis algorithm, what is the target distribution and how to compose it? My problem is, we should know Ptarget(θ) before we doing this Metropolis process, right? Yes. The whole purpose of MCMC is to sample from the (known) target distribution, because handling it with other methods is difficult. For example, the ...
Metropolis algorithm, what is the target distribution and how to compose it? My problem is, we should know Ptarget(θ) before we doing this Metropolis process, right? Yes. The whole purpose of MCMC is to sample from the (known) target distribution, because handling it with ot
46,815
How many zeros in an independent variable are too many for regression?
Regression methods do not make assumptions about the distribution of your independent variable. Strictly speaking, you would have too many zeros for linear regression when all of your data are zeros. Instead the issue here is lower statistical power and reduced ability to check your assumptions. Although it is discu...
How many zeros in an independent variable are too many for regression?
Regression methods do not make assumptions about the distribution of your independent variable. Strictly speaking, you would have too many zeros for linear regression when all of your data are zeros.
How many zeros in an independent variable are too many for regression? Regression methods do not make assumptions about the distribution of your independent variable. Strictly speaking, you would have too many zeros for linear regression when all of your data are zeros. Instead the issue here is lower statistical pow...
How many zeros in an independent variable are too many for regression? Regression methods do not make assumptions about the distribution of your independent variable. Strictly speaking, you would have too many zeros for linear regression when all of your data are zeros.
46,816
How many zeros in an independent variable are too many for regression?
(1) by simple regression I assume you mean linear regression. (2) zero values are not to my mind an issue for independent variables (in the same way they are for DV count data). (3) what is an issue is that you're unlikely to have a linear relationship between IV and DV. There is a whole section in most regression text...
How many zeros in an independent variable are too many for regression?
(1) by simple regression I assume you mean linear regression. (2) zero values are not to my mind an issue for independent variables (in the same way they are for DV count data). (3) what is an issue i
How many zeros in an independent variable are too many for regression? (1) by simple regression I assume you mean linear regression. (2) zero values are not to my mind an issue for independent variables (in the same way they are for DV count data). (3) what is an issue is that you're unlikely to have a linear relations...
How many zeros in an independent variable are too many for regression? (1) by simple regression I assume you mean linear regression. (2) zero values are not to my mind an issue for independent variables (in the same way they are for DV count data). (3) what is an issue i
46,817
Statistical comparison of 2 independent Cohen's ds
If $d$ is the observed Cohen's d value, then the sampling variance of $d$ is approximately equal to: $$v = \frac{1}{n_1} + \frac{1}{n_2} + \frac{d^2}{2(n_1+n_2)}.$$ So, to test $H_0: \delta_1 = \delta_2$ (where $\delta_1$ and $\delta_2$ denote the true d values of the two studies), compute: $$z = \frac{d_1 - d_2}{\sqrt...
Statistical comparison of 2 independent Cohen's ds
If $d$ is the observed Cohen's d value, then the sampling variance of $d$ is approximately equal to: $$v = \frac{1}{n_1} + \frac{1}{n_2} + \frac{d^2}{2(n_1+n_2)}.$$ So, to test $H_0: \delta_1 = \delta
Statistical comparison of 2 independent Cohen's ds If $d$ is the observed Cohen's d value, then the sampling variance of $d$ is approximately equal to: $$v = \frac{1}{n_1} + \frac{1}{n_2} + \frac{d^2}{2(n_1+n_2)}.$$ So, to test $H_0: \delta_1 = \delta_2$ (where $\delta_1$ and $\delta_2$ denote the true d values of the ...
Statistical comparison of 2 independent Cohen's ds If $d$ is the observed Cohen's d value, then the sampling variance of $d$ is approximately equal to: $$v = \frac{1}{n_1} + \frac{1}{n_2} + \frac{d^2}{2(n_1+n_2)}.$$ So, to test $H_0: \delta_1 = \delta
46,818
Statistical comparison of 2 independent Cohen's ds
I think I have found the source of the formula in the book of Borenstein et al (2009) Introduction to meta-analysis. John, Wiley & Sons Ltd. It is on p.156 and is used to compare two subgroups. Another option could be to take a look at the other hetereogeneity metrics described in the book. Good luck.
Statistical comparison of 2 independent Cohen's ds
I think I have found the source of the formula in the book of Borenstein et al (2009) Introduction to meta-analysis. John, Wiley & Sons Ltd. It is on p.156 and is used to compare two subgroups. Anothe
Statistical comparison of 2 independent Cohen's ds I think I have found the source of the formula in the book of Borenstein et al (2009) Introduction to meta-analysis. John, Wiley & Sons Ltd. It is on p.156 and is used to compare two subgroups. Another option could be to take a look at the other hetereogeneity metrics ...
Statistical comparison of 2 independent Cohen's ds I think I have found the source of the formula in the book of Borenstein et al (2009) Introduction to meta-analysis. John, Wiley & Sons Ltd. It is on p.156 and is used to compare two subgroups. Anothe
46,819
Hazard Function - Survival Analysis
Before obtaining the hazard function of $T=\min\{T_1,...,T_n\}$, let's first derive its distribution and its density function, i.e. the CFD and PDF of the first-order statistic from a sample of independently but not identically distributed random variables. The distribution of the minimum of $n$ independent random va...
Hazard Function - Survival Analysis
Before obtaining the hazard function of $T=\min\{T_1,...,T_n\}$, let's first derive its distribution and its density function, i.e. the CFD and PDF of the first-order statistic from a sample of indepe
Hazard Function - Survival Analysis Before obtaining the hazard function of $T=\min\{T_1,...,T_n\}$, let's first derive its distribution and its density function, i.e. the CFD and PDF of the first-order statistic from a sample of independently but not identically distributed random variables. The distribution of the ...
Hazard Function - Survival Analysis Before obtaining the hazard function of $T=\min\{T_1,...,T_n\}$, let's first derive its distribution and its density function, i.e. the CFD and PDF of the first-order statistic from a sample of indepe
46,820
Hazard Function - Survival Analysis
Here is an informal way of looking at the matter. Let $h(t)$ denote the hazard rate of a system. Then, $h(T)\Delta T$ is (approximately) the conditional probability that the system fails in the time interval $(T, T+\Delta T]$ given that the system is working at time $T$. Hence $1-h(T)\Delta T$ is (approximately) the pr...
Hazard Function - Survival Analysis
Here is an informal way of looking at the matter. Let $h(t)$ denote the hazard rate of a system. Then, $h(T)\Delta T$ is (approximately) the conditional probability that the system fails in the time i
Hazard Function - Survival Analysis Here is an informal way of looking at the matter. Let $h(t)$ denote the hazard rate of a system. Then, $h(T)\Delta T$ is (approximately) the conditional probability that the system fails in the time interval $(T, T+\Delta T]$ given that the system is working at time $T$. Hence $1-h(T...
Hazard Function - Survival Analysis Here is an informal way of looking at the matter. Let $h(t)$ denote the hazard rate of a system. Then, $h(T)\Delta T$ is (approximately) the conditional probability that the system fails in the time i
46,821
Hazard Function - Survival Analysis
Since $T=\min(T_1,\ldots,T_n)$ and $T_1$,...,$T_n$ are independent, the survivor function $S(t)=P(T>t)$ of $T$ is $$ \begin{align} S(t) &= P(min(T_1,\ldots,T_n)>t) \\ &=P(T_1>t,\ldots,T_n>t) \\ &=P(T_1>t)\cdots P(T_n>t) \\ &=S_1(t)\cdots S_n(t), \end{align}$$ where $S_i(t)=P(T_i>t)$ is the survivor function of $T_i$. N...
Hazard Function - Survival Analysis
Since $T=\min(T_1,\ldots,T_n)$ and $T_1$,...,$T_n$ are independent, the survivor function $S(t)=P(T>t)$ of $T$ is $$ \begin{align} S(t) &= P(min(T_1,\ldots,T_n)>t) \\ &=P(T_1>t,\ldots,T_n>t) \\ &=P(T_
Hazard Function - Survival Analysis Since $T=\min(T_1,\ldots,T_n)$ and $T_1$,...,$T_n$ are independent, the survivor function $S(t)=P(T>t)$ of $T$ is $$ \begin{align} S(t) &= P(min(T_1,\ldots,T_n)>t) \\ &=P(T_1>t,\ldots,T_n>t) \\ &=P(T_1>t)\cdots P(T_n>t) \\ &=S_1(t)\cdots S_n(t), \end{align}$$ where $S_i(t)=P(T_i>t)$ ...
Hazard Function - Survival Analysis Since $T=\min(T_1,\ldots,T_n)$ and $T_1$,...,$T_n$ are independent, the survivor function $S(t)=P(T>t)$ of $T$ is $$ \begin{align} S(t) &= P(min(T_1,\ldots,T_n)>t) \\ &=P(T_1>t,\ldots,T_n>t) \\ &=P(T_
46,822
How to generate random data that conforms to a given mean and upper / lower endpoints?
If you want the distribution on the range min to max and with a given population mean: One common solution when trying to generate a distribution with specified mean and endpoints is to use a location-scale family beta distribution. The usual beta is on the range 0-1 and has two parameters, $\alpha$ and $\beta$. The me...
How to generate random data that conforms to a given mean and upper / lower endpoints?
If you want the distribution on the range min to max and with a given population mean: One common solution when trying to generate a distribution with specified mean and endpoints is to use a location
How to generate random data that conforms to a given mean and upper / lower endpoints? If you want the distribution on the range min to max and with a given population mean: One common solution when trying to generate a distribution with specified mean and endpoints is to use a location-scale family beta distribution. ...
How to generate random data that conforms to a given mean and upper / lower endpoints? If you want the distribution on the range min to max and with a given population mean: One common solution when trying to generate a distribution with specified mean and endpoints is to use a location
46,823
Binary Logistic Regression Multicollinearity Tests
I'm glad you like my answer :-) It's not that there is no valid method of detecting collinearity in logistic regression: Since collinearity is a relationship among the independent variables, the dependent variable doesn't matter. What is problematic is figuring out how much collinearity is too much for logistic regres...
Binary Logistic Regression Multicollinearity Tests
I'm glad you like my answer :-) It's not that there is no valid method of detecting collinearity in logistic regression: Since collinearity is a relationship among the independent variables, the depen
Binary Logistic Regression Multicollinearity Tests I'm glad you like my answer :-) It's not that there is no valid method of detecting collinearity in logistic regression: Since collinearity is a relationship among the independent variables, the dependent variable doesn't matter. What is problematic is figuring out ho...
Binary Logistic Regression Multicollinearity Tests I'm glad you like my answer :-) It's not that there is no valid method of detecting collinearity in logistic regression: Since collinearity is a relationship among the independent variables, the depen
46,824
How to calculate the p-value for a binomial test using pbinom?
If you do not multiply by 2, you will be evaluating the probability of having scores ranging from 18 to 25 (one-sided test). Multiplying by 2, you are evaluating the probability of having scores ranging from 0 to 7 and 18 to 25 (two-sided test). Your command results in an answer similar to this one: binom.test(18, 25,...
How to calculate the p-value for a binomial test using pbinom?
If you do not multiply by 2, you will be evaluating the probability of having scores ranging from 18 to 25 (one-sided test). Multiplying by 2, you are evaluating the probability of having scores rang
How to calculate the p-value for a binomial test using pbinom? If you do not multiply by 2, you will be evaluating the probability of having scores ranging from 18 to 25 (one-sided test). Multiplying by 2, you are evaluating the probability of having scores ranging from 0 to 7 and 18 to 25 (two-sided test). Your comma...
How to calculate the p-value for a binomial test using pbinom? If you do not multiply by 2, you will be evaluating the probability of having scores ranging from 18 to 25 (one-sided test). Multiplying by 2, you are evaluating the probability of having scores rang
46,825
Expected value of a random variable differing from arithmetic mean
In the discrete case the expected value is a weighted sum, where the possible values of the variable are weighted by their probability of occurring (the probability mass function), $EX=\sum_{i=1}^nx_iP(X=x_i)$. Since all weights are non-negative, smaller than untiy, and their sum equals unity, the expected value of a d...
Expected value of a random variable differing from arithmetic mean
In the discrete case the expected value is a weighted sum, where the possible values of the variable are weighted by their probability of occurring (the probability mass function), $EX=\sum_{i=1}^nx_i
Expected value of a random variable differing from arithmetic mean In the discrete case the expected value is a weighted sum, where the possible values of the variable are weighted by their probability of occurring (the probability mass function), $EX=\sum_{i=1}^nx_iP(X=x_i)$. Since all weights are non-negative, smalle...
Expected value of a random variable differing from arithmetic mean In the discrete case the expected value is a weighted sum, where the possible values of the variable are weighted by their probability of occurring (the probability mass function), $EX=\sum_{i=1}^nx_i
46,826
Expected value of a random variable differing from arithmetic mean
I think that an arithmetic mean approaches expected value, as the number of samples increase in number. Say, you have a die which you have rolled 10 times and the outcomes are {5,6,4,5,3,2,1,2,4,6} The mean of the above values is 3.8. But the expected value when a die is rolled 10 times ( for that matter any number of ...
Expected value of a random variable differing from arithmetic mean
I think that an arithmetic mean approaches expected value, as the number of samples increase in number. Say, you have a die which you have rolled 10 times and the outcomes are {5,6,4,5,3,2,1,2,4,6} Th
Expected value of a random variable differing from arithmetic mean I think that an arithmetic mean approaches expected value, as the number of samples increase in number. Say, you have a die which you have rolled 10 times and the outcomes are {5,6,4,5,3,2,1,2,4,6} The mean of the above values is 3.8. But the expected v...
Expected value of a random variable differing from arithmetic mean I think that an arithmetic mean approaches expected value, as the number of samples increase in number. Say, you have a die which you have rolled 10 times and the outcomes are {5,6,4,5,3,2,1,2,4,6} Th
46,827
What is fitted in a GARCH: residual or log-return?
If you use the log returns, you're essentially making the assumption that there is no conditional variation in the mean. In some circumstances you may want to explicitly model both, but other times it may be sufficient to assume a constant mean and focus on the conditional variance. Depends on what you're trying to do....
What is fitted in a GARCH: residual or log-return?
If you use the log returns, you're essentially making the assumption that there is no conditional variation in the mean. In some circumstances you may want to explicitly model both, but other times it
What is fitted in a GARCH: residual or log-return? If you use the log returns, you're essentially making the assumption that there is no conditional variation in the mean. In some circumstances you may want to explicitly model both, but other times it may be sufficient to assume a constant mean and focus on the conditi...
What is fitted in a GARCH: residual or log-return? If you use the log returns, you're essentially making the assumption that there is no conditional variation in the mean. In some circumstances you may want to explicitly model both, but other times it
46,828
Main effects and interaction in multivariate meta-analysis (network meta-analysis) in R
Given that there is a single effect size estimate from each study (see comments above), the analysis can be carried out with regular meta-regression methods. You can carry out such an analysis with the metafor package. The "trick" is to code variables that indicate what treatments have been compared within a particular...
Main effects and interaction in multivariate meta-analysis (network meta-analysis) in R
Given that there is a single effect size estimate from each study (see comments above), the analysis can be carried out with regular meta-regression methods. You can carry out such an analysis with th
Main effects and interaction in multivariate meta-analysis (network meta-analysis) in R Given that there is a single effect size estimate from each study (see comments above), the analysis can be carried out with regular meta-regression methods. You can carry out such an analysis with the metafor package. The "trick" i...
Main effects and interaction in multivariate meta-analysis (network meta-analysis) in R Given that there is a single effect size estimate from each study (see comments above), the analysis can be carried out with regular meta-regression methods. You can carry out such an analysis with th
46,829
Show that $\mathbb{E}(X)$ is finite?
Please, fill in the details marked with a $\star$. First of all, remember that to prove that $\mathrm{E}[X]$ is finite it is enough $\star$ to check that $\mathrm{E}[|X|]$ is finite. Symmetry $\star$ shows that $$ \mathrm{E}[|X|] = \int_{-\infty}^\infty \frac{|x|\, e^x}{(1+e^x)^2} \, dx = 2 \int_0^\infty \frac{x\, ...
Show that $\mathbb{E}(X)$ is finite?
Please, fill in the details marked with a $\star$. First of all, remember that to prove that $\mathrm{E}[X]$ is finite it is enough $\star$ to check that $\mathrm{E}[|X|]$ is finite. Symmetry $\star$
Show that $\mathbb{E}(X)$ is finite? Please, fill in the details marked with a $\star$. First of all, remember that to prove that $\mathrm{E}[X]$ is finite it is enough $\star$ to check that $\mathrm{E}[|X|]$ is finite. Symmetry $\star$ shows that $$ \mathrm{E}[|X|] = \int_{-\infty}^\infty \frac{|x|\, e^x}{(1+e^x)^...
Show that $\mathbb{E}(X)$ is finite? Please, fill in the details marked with a $\star$. First of all, remember that to prove that $\mathrm{E}[X]$ is finite it is enough $\star$ to check that $\mathrm{E}[|X|]$ is finite. Symmetry $\star$
46,830
how to robustly identify a floor trendline ignoring outliers?
I think linear quantile regression would be close to what you want. This fits a line so that the predicted value for each x value is close to the chosen quantile of the response conditional on x. Here's an R package: http://cran.r-project.org/web/packages/quantreg/index.html For example, you could try a 1% quantile, a...
how to robustly identify a floor trendline ignoring outliers?
I think linear quantile regression would be close to what you want. This fits a line so that the predicted value for each x value is close to the chosen quantile of the response conditional on x. Her
how to robustly identify a floor trendline ignoring outliers? I think linear quantile regression would be close to what you want. This fits a line so that the predicted value for each x value is close to the chosen quantile of the response conditional on x. Here's an R package: http://cran.r-project.org/web/packages/q...
how to robustly identify a floor trendline ignoring outliers? I think linear quantile regression would be close to what you want. This fits a line so that the predicted value for each x value is close to the chosen quantile of the response conditional on x. Her
46,831
how to robustly identify a floor trendline ignoring outliers?
Is there only 1 trend line ? Probably not . You have outlying points below the "visual trend line at the bottom" . How will these be "ignored" so as to capture the dominant floor trend line that the eye sees and not be influenced by them. To detect tehm and reduce their influence one would want to simultaneously detect...
how to robustly identify a floor trendline ignoring outliers?
Is there only 1 trend line ? Probably not . You have outlying points below the "visual trend line at the bottom" . How will these be "ignored" so as to capture the dominant floor trend line that the e
how to robustly identify a floor trendline ignoring outliers? Is there only 1 trend line ? Probably not . You have outlying points below the "visual trend line at the bottom" . How will these be "ignored" so as to capture the dominant floor trend line that the eye sees and not be influenced by them. To detect tehm and ...
how to robustly identify a floor trendline ignoring outliers? Is there only 1 trend line ? Probably not . You have outlying points below the "visual trend line at the bottom" . How will these be "ignored" so as to capture the dominant floor trend line that the e
46,832
how to robustly identify a floor trendline ignoring outliers?
perhaps try running this custom-built code in the R language..if you've never used R, check http://twotorials.com/ to get started ;) # create eight sets of a thousand random x values x1 <- rnorm( 1000 , mean = 1 ) x2 <- rnorm( 1000 , mean = 2 ) x3 <- rnorm( 1000 , mean = 3 ) x4 <- rnorm( 1000 , mean = 4 ) x5 <- rnorm( ...
how to robustly identify a floor trendline ignoring outliers?
perhaps try running this custom-built code in the R language..if you've never used R, check http://twotorials.com/ to get started ;) # create eight sets of a thousand random x values x1 <- rnorm( 1000
how to robustly identify a floor trendline ignoring outliers? perhaps try running this custom-built code in the R language..if you've never used R, check http://twotorials.com/ to get started ;) # create eight sets of a thousand random x values x1 <- rnorm( 1000 , mean = 1 ) x2 <- rnorm( 1000 , mean = 2 ) x3 <- rnorm( ...
how to robustly identify a floor trendline ignoring outliers? perhaps try running this custom-built code in the R language..if you've never used R, check http://twotorials.com/ to get started ;) # create eight sets of a thousand random x values x1 <- rnorm( 1000
46,833
Two player dice game probability
For a particular die roll the cumulative probability is $ P(X_i \leq x ) = x/6 $, for $x=1,...,6$. So, if the die rolls are independent, $$ P(\max \{ X_1, ..., X_n \} \leq m) = P(X_1 \leq m, ..., X_n \leq m) = \prod_{i=1}^{n} P(X_i \leq m ) = \left( \frac{m}{6} \right)^n $$ for $m=1,...,6$. When $m > 6$ this probabil...
Two player dice game probability
For a particular die roll the cumulative probability is $ P(X_i \leq x ) = x/6 $, for $x=1,...,6$. So, if the die rolls are independent, $$ P(\max \{ X_1, ..., X_n \} \leq m) = P(X_1 \leq m, ..., X_n
Two player dice game probability For a particular die roll the cumulative probability is $ P(X_i \leq x ) = x/6 $, for $x=1,...,6$. So, if the die rolls are independent, $$ P(\max \{ X_1, ..., X_n \} \leq m) = P(X_1 \leq m, ..., X_n \leq m) = \prod_{i=1}^{n} P(X_i \leq m ) = \left( \frac{m}{6} \right)^n $$ for $m=1,....
Two player dice game probability For a particular die roll the cumulative probability is $ P(X_i \leq x ) = x/6 $, for $x=1,...,6$. So, if the die rolls are independent, $$ P(\max \{ X_1, ..., X_n \} \leq m) = P(X_1 \leq m, ..., X_n
46,834
How to do external validation of regression models
Regarding part of #1, perhaps a better and more formal way to proceed is to put in a variable that is the logit of a published model, and add to it all of its component variables less one term. Do a chunk likelihood ratio $\chi^2$ for the added value of all the components. That is a test of lack of fit of the publish...
How to do external validation of regression models
Regarding part of #1, perhaps a better and more formal way to proceed is to put in a variable that is the logit of a published model, and add to it all of its component variables less one term. Do a
How to do external validation of regression models Regarding part of #1, perhaps a better and more formal way to proceed is to put in a variable that is the logit of a published model, and add to it all of its component variables less one term. Do a chunk likelihood ratio $\chi^2$ for the added value of all the compon...
How to do external validation of regression models Regarding part of #1, perhaps a better and more formal way to proceed is to put in a variable that is the logit of a published model, and add to it all of its component variables less one term. Do a
46,835
How to do external validation of regression models
Regarding 1. There may be, but I would guess that a formal method isn't very useful (although some journal editor or pointy haired boss may want one). Rather ask "Do the models look the same? Would anyone care about the differences?" Regarding 2. I don't understand the question. Regarding 3. Well.... what's wrong with ...
How to do external validation of regression models
Regarding 1. There may be, but I would guess that a formal method isn't very useful (although some journal editor or pointy haired boss may want one). Rather ask "Do the models look the same? Would an
How to do external validation of regression models Regarding 1. There may be, but I would guess that a formal method isn't very useful (although some journal editor or pointy haired boss may want one). Rather ask "Do the models look the same? Would anyone care about the differences?" Regarding 2. I don't understand the...
How to do external validation of regression models Regarding 1. There may be, but I would guess that a formal method isn't very useful (although some journal editor or pointy haired boss may want one). Rather ask "Do the models look the same? Would an
46,836
Is likelihood ratio test the only way to build hypothesis tests?
No, the likelihood ratio is not the only way to construct hypothesis tests, but it often is optimal. In one flavour of the frequentist paradigm you can construct a hypothesis test from any arbitrary test statistic that can generate a p value ie a probability of observing the data, given the null hypothesis. An alterna...
Is likelihood ratio test the only way to build hypothesis tests?
No, the likelihood ratio is not the only way to construct hypothesis tests, but it often is optimal. In one flavour of the frequentist paradigm you can construct a hypothesis test from any arbitrary t
Is likelihood ratio test the only way to build hypothesis tests? No, the likelihood ratio is not the only way to construct hypothesis tests, but it often is optimal. In one flavour of the frequentist paradigm you can construct a hypothesis test from any arbitrary test statistic that can generate a p value ie a probabil...
Is likelihood ratio test the only way to build hypothesis tests? No, the likelihood ratio is not the only way to construct hypothesis tests, but it often is optimal. In one flavour of the frequentist paradigm you can construct a hypothesis test from any arbitrary t
46,837
Intraclass correlation coefficient interpretation
I am struggling to find anything online which deals with interpreting this The output you present is from SPSS Reliability Analysis procedure. Here you had some variables (items) which are raters or judges for you, and 17 subjects or objects which were rated. Your focus was to assess inter-rater aggreeement by means...
Intraclass correlation coefficient interpretation
I am struggling to find anything online which deals with interpreting this The output you present is from SPSS Reliability Analysis procedure. Here you had some variables (items) which are raters o
Intraclass correlation coefficient interpretation I am struggling to find anything online which deals with interpreting this The output you present is from SPSS Reliability Analysis procedure. Here you had some variables (items) which are raters or judges for you, and 17 subjects or objects which were rated. Your fo...
Intraclass correlation coefficient interpretation I am struggling to find anything online which deals with interpreting this The output you present is from SPSS Reliability Analysis procedure. Here you had some variables (items) which are raters o
46,838
Intraclass correlation coefficient interpretation
You might want to read the article by LeBreton and Senter (2007). It's a fairly accessible overview of how to interpret ICC and related indicators of inter-rater agreement. LeBreton, J. M., & Senter, J. L. (2007). Answers to 20 questions about interrater reliability and interrater agreement. Organizational Research Met...
Intraclass correlation coefficient interpretation
You might want to read the article by LeBreton and Senter (2007). It's a fairly accessible overview of how to interpret ICC and related indicators of inter-rater agreement. LeBreton, J. M., & Senter,
Intraclass correlation coefficient interpretation You might want to read the article by LeBreton and Senter (2007). It's a fairly accessible overview of how to interpret ICC and related indicators of inter-rater agreement. LeBreton, J. M., & Senter, J. L. (2007). Answers to 20 questions about interrater reliability and...
Intraclass correlation coefficient interpretation You might want to read the article by LeBreton and Senter (2007). It's a fairly accessible overview of how to interpret ICC and related indicators of inter-rater agreement. LeBreton, J. M., & Senter,
46,839
Intraclass correlation coefficient interpretation
Let me provide a response for the first situation that you analysed because the second situation essentially parallels it, except that you have two more items in the second situation and you chose a different model (more about that below). In providing this response, in some places I have a different interpretation fr...
Intraclass correlation coefficient interpretation
Let me provide a response for the first situation that you analysed because the second situation essentially parallels it, except that you have two more items in the second situation and you chose a d
Intraclass correlation coefficient interpretation Let me provide a response for the first situation that you analysed because the second situation essentially parallels it, except that you have two more items in the second situation and you chose a different model (more about that below). In providing this response, i...
Intraclass correlation coefficient interpretation Let me provide a response for the first situation that you analysed because the second situation essentially parallels it, except that you have two more items in the second situation and you chose a d
46,840
Intraclass correlation coefficient interpretation
I have traced the answer in new Stata 13 documentation on ICC. The question remains on whether the F test in this case can be used given the data does not follow the assumptions of normal distribution.
Intraclass correlation coefficient interpretation
I have traced the answer in new Stata 13 documentation on ICC. The question remains on whether the F test in this case can be used given the data does not follow the assumptions of normal distribution
Intraclass correlation coefficient interpretation I have traced the answer in new Stata 13 documentation on ICC. The question remains on whether the F test in this case can be used given the data does not follow the assumptions of normal distribution.
Intraclass correlation coefficient interpretation I have traced the answer in new Stata 13 documentation on ICC. The question remains on whether the F test in this case can be used given the data does not follow the assumptions of normal distribution
46,841
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estimator of $\sigma^2$?
I don't work directly through your derivation, but provide a more general formulation below. For a more general formulation, let your regression model be $Y = X\beta + \epsilon$, $P_X = X(X^\prime X)^{-1} X^\prime$, and $M_X = I_N - P_X$ ($I_N$ is a $N\times N$ identity matrix). $X$ is $N\times K$ and of full column ra...
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estim
I don't work directly through your derivation, but provide a more general formulation below. For a more general formulation, let your regression model be $Y = X\beta + \epsilon$, $P_X = X(X^\prime X)^
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estimator of $\sigma^2$? I don't work directly through your derivation, but provide a more general formulation below. For a more general formulation, let your regression model be $Y = X\beta + \epsilon$, $P_X = X(X^\prime X)^...
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estim I don't work directly through your derivation, but provide a more general formulation below. For a more general formulation, let your regression model be $Y = X\beta + \epsilon$, $P_X = X(X^\prime X)^
46,842
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estimator of $\sigma^2$?
I think I figured out the version of the proof I was doing even though Charlie's proof is much better (more general I assume). First term: \begin{align} E\left[ \displaystyle\sum\limits_{i=1}^n (u_{i}^2-\bar{u})^{2} \right] &= E\left[ \displaystyle\sum\limits_{i=1}^n u_{i}^2-n(\bar{u})^{2} \right] \\ &=E(u_1^2) + \cdot...
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estim
I think I figured out the version of the proof I was doing even though Charlie's proof is much better (more general I assume). First term: \begin{align} E\left[ \displaystyle\sum\limits_{i=1}^n (u_{i}
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estimator of $\sigma^2$? I think I figured out the version of the proof I was doing even though Charlie's proof is much better (more general I assume). First term: \begin{align} E\left[ \displaystyle\sum\limits_{i=1}^n (u_{i}...
How do I use the standard regression assumptions to prove that $\hat{\sigma}^2$ is an unbiased estim I think I figured out the version of the proof I was doing even though Charlie's proof is much better (more general I assume). First term: \begin{align} E\left[ \displaystyle\sum\limits_{i=1}^n (u_{i}
46,843
Logistic Regression/Naive Bayes with highly correlated data
I disagree with discretizing to get rid of collinearity. It doesn't get rid of it, it just pushes it under a rug where it can cause problems while being less visible. "Number of guards" seems like a mediating variable. There is a lot of recent work on mediators, much of it by MacKinnon and his colleagues. E.g. this boo...
Logistic Regression/Naive Bayes with highly correlated data
I disagree with discretizing to get rid of collinearity. It doesn't get rid of it, it just pushes it under a rug where it can cause problems while being less visible. "Number of guards" seems like a m
Logistic Regression/Naive Bayes with highly correlated data I disagree with discretizing to get rid of collinearity. It doesn't get rid of it, it just pushes it under a rug where it can cause problems while being less visible. "Number of guards" seems like a mediating variable. There is a lot of recent work on mediator...
Logistic Regression/Naive Bayes with highly correlated data I disagree with discretizing to get rid of collinearity. It doesn't get rid of it, it just pushes it under a rug where it can cause problems while being less visible. "Number of guards" seems like a m
46,844
Logistic Regression/Naive Bayes with highly correlated data
Well what about a) building a model to predict the number of guards, n_act, call its output n_est. b) build model to predict violence based on inputs and (actual guards-estimated, n_act - n_est)
Logistic Regression/Naive Bayes with highly correlated data
Well what about a) building a model to predict the number of guards, n_act, call its output n_est. b) build model to predict violence based on inputs and (actual guards-estimated, n_act - n_est)
Logistic Regression/Naive Bayes with highly correlated data Well what about a) building a model to predict the number of guards, n_act, call its output n_est. b) build model to predict violence based on inputs and (actual guards-estimated, n_act - n_est)
Logistic Regression/Naive Bayes with highly correlated data Well what about a) building a model to predict the number of guards, n_act, call its output n_est. b) build model to predict violence based on inputs and (actual guards-estimated, n_act - n_est)
46,845
Student's t vs Mann-Whitney U for small equal samples
How I would approach this: I would not go for a t-test if the requirements for applying it are not (or not known to be) satisfied. This seems obvious to me and good practice for any hypothesis testing. Mere familiarity with one or other test above other one(s) is not a justification. Can you give details where you foun...
Student's t vs Mann-Whitney U for small equal samples
How I would approach this: I would not go for a t-test if the requirements for applying it are not (or not known to be) satisfied. This seems obvious to me and good practice for any hypothesis testing
Student's t vs Mann-Whitney U for small equal samples How I would approach this: I would not go for a t-test if the requirements for applying it are not (or not known to be) satisfied. This seems obvious to me and good practice for any hypothesis testing. Mere familiarity with one or other test above other one(s) is no...
Student's t vs Mann-Whitney U for small equal samples How I would approach this: I would not go for a t-test if the requirements for applying it are not (or not known to be) satisfied. This seems obvious to me and good practice for any hypothesis testing
46,846
Student's t vs Mann-Whitney U for small equal samples
You should definitely consider a permutation test, as you can use the mean as test statistic and have a lot less assumptions. You will find a lot of information if you google permutation test or search it here. An implementation in R (taken from this great answer to one of my questions): a <- rnorm(5) b <- rnorm(5, 0.5...
Student's t vs Mann-Whitney U for small equal samples
You should definitely consider a permutation test, as you can use the mean as test statistic and have a lot less assumptions. You will find a lot of information if you google permutation test or searc
Student's t vs Mann-Whitney U for small equal samples You should definitely consider a permutation test, as you can use the mean as test statistic and have a lot less assumptions. You will find a lot of information if you google permutation test or search it here. An implementation in R (taken from this great answer to...
Student's t vs Mann-Whitney U for small equal samples You should definitely consider a permutation test, as you can use the mean as test statistic and have a lot less assumptions. You will find a lot of information if you google permutation test or searc
46,847
Conditional logistic regression vs GLMM in R
The conditional logistic regression applies fixed effects (in the context of econometrics), $$ logit(p_{ij})=\boldsymbol x_{ij}^{'}\boldsymbol\beta+u_i.$$ where each pair of subjects has an individual intercept ($u_i$). It can be implemented with clogit() of package survival or clogistic() of package Epi. Generalized ...
Conditional logistic regression vs GLMM in R
The conditional logistic regression applies fixed effects (in the context of econometrics), $$ logit(p_{ij})=\boldsymbol x_{ij}^{'}\boldsymbol\beta+u_i.$$ where each pair of subjects has an individual
Conditional logistic regression vs GLMM in R The conditional logistic regression applies fixed effects (in the context of econometrics), $$ logit(p_{ij})=\boldsymbol x_{ij}^{'}\boldsymbol\beta+u_i.$$ where each pair of subjects has an individual intercept ($u_i$). It can be implemented with clogit() of package surviva...
Conditional logistic regression vs GLMM in R The conditional logistic regression applies fixed effects (in the context of econometrics), $$ logit(p_{ij})=\boldsymbol x_{ij}^{'}\boldsymbol\beta+u_i.$$ where each pair of subjects has an individual
46,848
Can covariates be categorial variables?
ANOVA, ANCOVA and OLS regression are all the same model. In matrix notation they are all $Y = Xb + e$ where Y is a vector of values on the DV, X is a matrix of values on the IVs, b a vector of parameters to be estimated and e is error. The main reason these are treated so differently is, I think, historical: ANOVA and ...
Can covariates be categorial variables?
ANOVA, ANCOVA and OLS regression are all the same model. In matrix notation they are all $Y = Xb + e$ where Y is a vector of values on the DV, X is a matrix of values on the IVs, b a vector of paramet
Can covariates be categorial variables? ANOVA, ANCOVA and OLS regression are all the same model. In matrix notation they are all $Y = Xb + e$ where Y is a vector of values on the DV, X is a matrix of values on the IVs, b a vector of parameters to be estimated and e is error. The main reason these are treated so differe...
Can covariates be categorial variables? ANOVA, ANCOVA and OLS regression are all the same model. In matrix notation they are all $Y = Xb + e$ where Y is a vector of values on the DV, X is a matrix of values on the IVs, b a vector of paramet
46,849
Can covariates be categorial variables?
As a minor addition, but as I don't have enough points yet to comment it comes as an answer. Reading up on Ancova and how and when to use covariates I had the same question. If you needed a citation for being able to use a categorical covariate: Howell (2016) p593. In addition, the use of covariates also depends on wh...
Can covariates be categorial variables?
As a minor addition, but as I don't have enough points yet to comment it comes as an answer. Reading up on Ancova and how and when to use covariates I had the same question. If you needed a citation f
Can covariates be categorial variables? As a minor addition, but as I don't have enough points yet to comment it comes as an answer. Reading up on Ancova and how and when to use covariates I had the same question. If you needed a citation for being able to use a categorical covariate: Howell (2016) p593. In addition, ...
Can covariates be categorial variables? As a minor addition, but as I don't have enough points yet to comment it comes as an answer. Reading up on Ancova and how and when to use covariates I had the same question. If you needed a citation f
46,850
Weighted least squares regression on random data, giving large t-statistics more often than "expected"
I think the problem is that you are generating the weights at random, uncorrelated with the y value. In a real weighted regression the points with lower variance will have higher weights. Since the true relationship is mean and variance of 0 that means that points furthest from 0 would be consistent with higher varia...
Weighted least squares regression on random data, giving large t-statistics more often than "expecte
I think the problem is that you are generating the weights at random, uncorrelated with the y value. In a real weighted regression the points with lower variance will have higher weights. Since the
Weighted least squares regression on random data, giving large t-statistics more often than "expected" I think the problem is that you are generating the weights at random, uncorrelated with the y value. In a real weighted regression the points with lower variance will have higher weights. Since the true relationship...
Weighted least squares regression on random data, giving large t-statistics more often than "expecte I think the problem is that you are generating the weights at random, uncorrelated with the y value. In a real weighted regression the points with lower variance will have higher weights. Since the
46,851
Question about a marginal distribution
The standard way to do the calculation is to expand the argument of the $\exp$ term as a quadratic in $x$, complete the square, and get to the result that $f(y)$ is also a normal density. Or, you can use the fact that you know that $E[Y\mid X=x] = x$ and so $E[Y\mid X]$ is a random variable (it equals $X$) with mean ...
Question about a marginal distribution
The standard way to do the calculation is to expand the argument of the $\exp$ term as a quadratic in $x$, complete the square, and get to the result that $f(y)$ is also a normal density. Or, you ca
Question about a marginal distribution The standard way to do the calculation is to expand the argument of the $\exp$ term as a quadratic in $x$, complete the square, and get to the result that $f(y)$ is also a normal density. Or, you can use the fact that you know that $E[Y\mid X=x] = x$ and so $E[Y\mid X]$ is a ran...
Question about a marginal distribution The standard way to do the calculation is to expand the argument of the $\exp$ term as a quadratic in $x$, complete the square, and get to the result that $f(y)$ is also a normal density. Or, you ca
46,852
Sharing a model trained on confidential data
You could use the hashing trick. That way rather than providing a table which maps words to indices, which would reveal information about the words in your training data, you could just provide a hash function.
Sharing a model trained on confidential data
You could use the hashing trick. That way rather than providing a table which maps words to indices, which would reveal information about the words in your training data, you could just provide a hash
Sharing a model trained on confidential data You could use the hashing trick. That way rather than providing a table which maps words to indices, which would reveal information about the words in your training data, you could just provide a hash function.
Sharing a model trained on confidential data You could use the hashing trick. That way rather than providing a table which maps words to indices, which would reveal information about the words in your training data, you could just provide a hash
46,853
Sharing a model trained on confidential data
Strictly speaking, this is not a stats question but a question of regulatory compliance. You need to run this past the ethics tsar at your institution, which I assume to be in the health care area. Some tsars will say, "No way, Jose", no matter how anonymized the data. Typically, if you collect data for one purpose, an...
Sharing a model trained on confidential data
Strictly speaking, this is not a stats question but a question of regulatory compliance. You need to run this past the ethics tsar at your institution, which I assume to be in the health care area. So
Sharing a model trained on confidential data Strictly speaking, this is not a stats question but a question of regulatory compliance. You need to run this past the ethics tsar at your institution, which I assume to be in the health care area. Some tsars will say, "No way, Jose", no matter how anonymized the data. Typic...
Sharing a model trained on confidential data Strictly speaking, this is not a stats question but a question of regulatory compliance. You need to run this past the ethics tsar at your institution, which I assume to be in the health care area. So
46,854
Sharing a model trained on confidential data
You could retrain your model on a completely different set of words and then show it fully disclosed as a proof of concept, i.e. replace all the words with the names of animals, for example, and suggest to your intended audience that if they were to repeat your training steps exactly with more relevant words they could...
Sharing a model trained on confidential data
You could retrain your model on a completely different set of words and then show it fully disclosed as a proof of concept, i.e. replace all the words with the names of animals, for example, and sugge
Sharing a model trained on confidential data You could retrain your model on a completely different set of words and then show it fully disclosed as a proof of concept, i.e. replace all the words with the names of animals, for example, and suggest to your intended audience that if they were to repeat your training step...
Sharing a model trained on confidential data You could retrain your model on a completely different set of words and then show it fully disclosed as a proof of concept, i.e. replace all the words with the names of animals, for example, and sugge
46,855
Behavior of $R^2$ in non-linear models
I decided to move my comment to an answer and discuss it To expand on my points a little: Your thought that the way you're calculating $R^2$ isn't sensible is right. A high correlation between residuals and arbitrary fitted values doesn't automatically imply a good fit. Indeed, forget nonlinear regression, and consider...
Behavior of $R^2$ in non-linear models
I decided to move my comment to an answer and discuss it To expand on my points a little: Your thought that the way you're calculating $R^2$ isn't sensible is right. A high correlation between residua
Behavior of $R^2$ in non-linear models I decided to move my comment to an answer and discuss it To expand on my points a little: Your thought that the way you're calculating $R^2$ isn't sensible is right. A high correlation between residuals and arbitrary fitted values doesn't automatically imply a good fit. Indeed, fo...
Behavior of $R^2$ in non-linear models I decided to move my comment to an answer and discuss it To expand on my points a little: Your thought that the way you're calculating $R^2$ isn't sensible is right. A high correlation between residua
46,856
is there something like Mann-Whitney U test that can control for a continous variable?
A generalization of the Wilcoxon-Mann-Whitney test is the proportional odds ordinal logistic model, which accepts covariates in addition to the group variable you are mainly testing. Note that the prop. odds model does not need more than one observations at each unique value of $Y$ in order to work well.
is there something like Mann-Whitney U test that can control for a continous variable?
A generalization of the Wilcoxon-Mann-Whitney test is the proportional odds ordinal logistic model, which accepts covariates in addition to the group variable you are mainly testing. Note that the pr
is there something like Mann-Whitney U test that can control for a continous variable? A generalization of the Wilcoxon-Mann-Whitney test is the proportional odds ordinal logistic model, which accepts covariates in addition to the group variable you are mainly testing. Note that the prop. odds model does not need more...
is there something like Mann-Whitney U test that can control for a continous variable? A generalization of the Wilcoxon-Mann-Whitney test is the proportional odds ordinal logistic model, which accepts covariates in addition to the group variable you are mainly testing. Note that the pr
46,857
When is it incorrect to compute factor scores by summing (or averaging) raw variable scores?
Here's how I see it. Technically, you are right. Simply adding the scores (or averaging them) weights them all equally and this may not be the optimal solution. However, it does have certain advantages: 1) It is simple. Factor analysis is not. OK, readers of this list probably understand factor analysis; but what abo...
When is it incorrect to compute factor scores by summing (or averaging) raw variable scores?
Here's how I see it. Technically, you are right. Simply adding the scores (or averaging them) weights them all equally and this may not be the optimal solution. However, it does have certain advantage
When is it incorrect to compute factor scores by summing (or averaging) raw variable scores? Here's how I see it. Technically, you are right. Simply adding the scores (or averaging them) weights them all equally and this may not be the optimal solution. However, it does have certain advantages: 1) It is simple. Factor...
When is it incorrect to compute factor scores by summing (or averaging) raw variable scores? Here's how I see it. Technically, you are right. Simply adding the scores (or averaging them) weights them all equally and this may not be the optimal solution. However, it does have certain advantage
46,858
Poisson Repeated Measures ANOVA
I guess my comments have become so extensive that I should call them an answer. If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If you want a mixed model (glmm), you could use lme4 (such as the function glmer), though there are other suitable packages ...
Poisson Repeated Measures ANOVA
I guess my comments have become so extensive that I should call them an answer. If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If y
Poisson Repeated Measures ANOVA I guess my comments have become so extensive that I should call them an answer. If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If you want a mixed model (glmm), you could use lme4 (such as the function glmer), though th...
Poisson Repeated Measures ANOVA I guess my comments have become so extensive that I should call them an answer. If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If y
46,859
Utilizing cross-validation with up-sampled data
Yes, the CV results are going to be biased. You could still use them to tune the model. Another option is to use a class weighting scheme that gives asymmetric cost values to different kinds of errors (see the reference below). This is available in some software (e.g. the R kernlab package). I think this is a better ...
Utilizing cross-validation with up-sampled data
Yes, the CV results are going to be biased. You could still use them to tune the model. Another option is to use a class weighting scheme that gives asymmetric cost values to different kinds of error
Utilizing cross-validation with up-sampled data Yes, the CV results are going to be biased. You could still use them to tune the model. Another option is to use a class weighting scheme that gives asymmetric cost values to different kinds of errors (see the reference below). This is available in some software (e.g. th...
Utilizing cross-validation with up-sampled data Yes, the CV results are going to be biased. You could still use them to tune the model. Another option is to use a class weighting scheme that gives asymmetric cost values to different kinds of error
46,860
Utilizing cross-validation with up-sampled data
Here is a related answer that might be of interest of this problem. (Sorry for the auto-citation)
Utilizing cross-validation with up-sampled data
Here is a related answer that might be of interest of this problem. (Sorry for the auto-citation)
Utilizing cross-validation with up-sampled data Here is a related answer that might be of interest of this problem. (Sorry for the auto-citation)
Utilizing cross-validation with up-sampled data Here is a related answer that might be of interest of this problem. (Sorry for the auto-citation)
46,861
Utilizing cross-validation with up-sampled data
I don't use SVM, but in Logistic Regression and ANN's I have sucessfully used k-fold with replicated training data (cut the folds, generate the proper training\test pairs, generate replicas of the less represented class only in training data), sometimes with noise. Biases were removed in the selection of the cutpoints....
Utilizing cross-validation with up-sampled data
I don't use SVM, but in Logistic Regression and ANN's I have sucessfully used k-fold with replicated training data (cut the folds, generate the proper training\test pairs, generate replicas of the les
Utilizing cross-validation with up-sampled data I don't use SVM, but in Logistic Regression and ANN's I have sucessfully used k-fold with replicated training data (cut the folds, generate the proper training\test pairs, generate replicas of the less represented class only in training data), sometimes with noise. Biases...
Utilizing cross-validation with up-sampled data I don't use SVM, but in Logistic Regression and ANN's I have sucessfully used k-fold with replicated training data (cut the folds, generate the proper training\test pairs, generate replicas of the les
46,862
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed data
Shao and Sitter 1996 demonstrate that the right approach is: Take a bootstrap sample, respecting the dependencies in the data (see below); Run one imputation on this sample, estimating the imputation model and producing one model + noise replicate; Run a complete case analysis on this; Repeat 1-3 $B$ times; Combine us...
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed d
Shao and Sitter 1996 demonstrate that the right approach is: Take a bootstrap sample, respecting the dependencies in the data (see below); Run one imputation on this sample, estimating the imputation
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed data Shao and Sitter 1996 demonstrate that the right approach is: Take a bootstrap sample, respecting the dependencies in the data (see below); Run one imputation on this sample, estimating the imputation model and produ...
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed d Shao and Sitter 1996 demonstrate that the right approach is: Take a bootstrap sample, respecting the dependencies in the data (see below); Run one imputation on this sample, estimating the imputation
46,863
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed data
Steps 2 and 3 ignore the fact that some of the data have been imputed. Hence the bootstrap estimate of the distribution of $\hat\beta$ will be too narrow. Rubin's pooling rules combine the within and between imputation uncertainty. Though this procedure assumes that $\hat\beta$ is normally distributed around the popul...
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed d
Steps 2 and 3 ignore the fact that some of the data have been imputed. Hence the bootstrap estimate of the distribution of $\hat\beta$ will be too narrow. Rubin's pooling rules combine the within and
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed data Steps 2 and 3 ignore the fact that some of the data have been imputed. Hence the bootstrap estimate of the distribution of $\hat\beta$ will be too narrow. Rubin's pooling rules combine the within and between imputat...
Bootstrapped confidence intervals for the parameters of a linear model applied to multiply imputed d Steps 2 and 3 ignore the fact that some of the data have been imputed. Hence the bootstrap estimate of the distribution of $\hat\beta$ will be too narrow. Rubin's pooling rules combine the within and
46,864
What's the difference between a component and a factor in parallel analysis?
You might wish to read Dinno's Gently Clarifying the Application of Horn’s Parallel Analysis to Principal Component Analysis Versus Factor Analysis. Here's a short distillation: Principal component analysis (PCA) involves the eigen-decomposition of the correlation matrix $\mathbf{R}$ (or less commonly, the covariance m...
What's the difference between a component and a factor in parallel analysis?
You might wish to read Dinno's Gently Clarifying the Application of Horn’s Parallel Analysis to Principal Component Analysis Versus Factor Analysis. Here's a short distillation: Principal component an
What's the difference between a component and a factor in parallel analysis? You might wish to read Dinno's Gently Clarifying the Application of Horn’s Parallel Analysis to Principal Component Analysis Versus Factor Analysis. Here's a short distillation: Principal component analysis (PCA) involves the eigen-decompositi...
What's the difference between a component and a factor in parallel analysis? You might wish to read Dinno's Gently Clarifying the Application of Horn’s Parallel Analysis to Principal Component Analysis Versus Factor Analysis. Here's a short distillation: Principal component an
46,865
What's the difference between a component and a factor in parallel analysis?
It's talking about principal components. First, it finds the eigenvalues of the correlation matrix which it takes as input. Then it decides how many of those values are "reasonably big" by doing simulations and comparing them with the simulated values. Here is the key part of the code: valuesx <- eigen(rx)$values and ...
What's the difference between a component and a factor in parallel analysis?
It's talking about principal components. First, it finds the eigenvalues of the correlation matrix which it takes as input. Then it decides how many of those values are "reasonably big" by doing simul
What's the difference between a component and a factor in parallel analysis? It's talking about principal components. First, it finds the eigenvalues of the correlation matrix which it takes as input. Then it decides how many of those values are "reasonably big" by doing simulations and comparing them with the simulate...
What's the difference between a component and a factor in parallel analysis? It's talking about principal components. First, it finds the eigenvalues of the correlation matrix which it takes as input. Then it decides how many of those values are "reasonably big" by doing simul
46,866
What's the difference between a component and a factor in parallel analysis?
Actually there are two lines, one for the pca and the other for the minres procedure (default) unless another is selected. The program uses the fa$values and the eigenvalues fa$e.values. The fa$values are the values from the common factor solution. The fa$values are less than the eigenvalues.
What's the difference between a component and a factor in parallel analysis?
Actually there are two lines, one for the pca and the other for the minres procedure (default) unless another is selected. The program uses the fa$values and the eigenvalues fa$e.values. The fa$valu
What's the difference between a component and a factor in parallel analysis? Actually there are two lines, one for the pca and the other for the minres procedure (default) unless another is selected. The program uses the fa$values and the eigenvalues fa$e.values. The fa$values are the values from the common factor so...
What's the difference between a component and a factor in parallel analysis? Actually there are two lines, one for the pca and the other for the minres procedure (default) unless another is selected. The program uses the fa$values and the eigenvalues fa$e.values. The fa$valu
46,867
How to store (and analyse) multi-answer multi-choice questionnaire data
The last answer is the best one for your situation. The basic approach is that each check-box should be stored as a 0 (unchecked) or 1 (checked). If you have logic in the questionnaire so some people do not get asked the question, you can have 0 (exposed to question, but unchecked), 1 (checked) and missing/null (not ex...
How to store (and analyse) multi-answer multi-choice questionnaire data
The last answer is the best one for your situation. The basic approach is that each check-box should be stored as a 0 (unchecked) or 1 (checked). If you have logic in the questionnaire so some people
How to store (and analyse) multi-answer multi-choice questionnaire data The last answer is the best one for your situation. The basic approach is that each check-box should be stored as a 0 (unchecked) or 1 (checked). If you have logic in the questionnaire so some people do not get asked the question, you can have 0 (e...
How to store (and analyse) multi-answer multi-choice questionnaire data The last answer is the best one for your situation. The basic approach is that each check-box should be stored as a 0 (unchecked) or 1 (checked). If you have logic in the questionnaire so some people
46,868
How to store (and analyse) multi-answer multi-choice questionnaire data
Your last option sounds the best to me. Analyzing, is just filtering on that column of the data frame.
How to store (and analyse) multi-answer multi-choice questionnaire data
Your last option sounds the best to me. Analyzing, is just filtering on that column of the data frame.
How to store (and analyse) multi-answer multi-choice questionnaire data Your last option sounds the best to me. Analyzing, is just filtering on that column of the data frame.
How to store (and analyse) multi-answer multi-choice questionnaire data Your last option sounds the best to me. Analyzing, is just filtering on that column of the data frame.
46,869
Regression in SEM programs vs regression in statistical packages such as SPSS
I think doing regression via SEM is bogus. I mean, it is cute to show that you can express a linear regression as a special case of SEM, just to show how general SEMs are, but doing regression with an SEM is a waste of time, as this approach does not utilize the many advances in regression modeling specific to linear m...
Regression in SEM programs vs regression in statistical packages such as SPSS
I think doing regression via SEM is bogus. I mean, it is cute to show that you can express a linear regression as a special case of SEM, just to show how general SEMs are, but doing regression with an
Regression in SEM programs vs regression in statistical packages such as SPSS I think doing regression via SEM is bogus. I mean, it is cute to show that you can express a linear regression as a special case of SEM, just to show how general SEMs are, but doing regression with an SEM is a waste of time, as this approach ...
Regression in SEM programs vs regression in statistical packages such as SPSS I think doing regression via SEM is bogus. I mean, it is cute to show that you can express a linear regression as a special case of SEM, just to show how general SEMs are, but doing regression with an
46,870
Given a historical disease incident rate of x per 100,000, what is the probability of y per 100,000?
Let's say each kid flips a biased coin to determine whether or not they have cancer. If we assume that the probability of heads (cancer) is 1.6/100,000, we can find the distribution of cancer counts we'd expect using a binomial distribution. In R code, we can find the distribution with the dbinom command: dbinom(x = 0...
Given a historical disease incident rate of x per 100,000, what is the probability of y per 100,000?
Let's say each kid flips a biased coin to determine whether or not they have cancer. If we assume that the probability of heads (cancer) is 1.6/100,000, we can find the distribution of cancer counts
Given a historical disease incident rate of x per 100,000, what is the probability of y per 100,000? Let's say each kid flips a biased coin to determine whether or not they have cancer. If we assume that the probability of heads (cancer) is 1.6/100,000, we can find the distribution of cancer counts we'd expect using a...
Given a historical disease incident rate of x per 100,000, what is the probability of y per 100,000? Let's say each kid flips a biased coin to determine whether or not they have cancer. If we assume that the probability of heads (cancer) is 1.6/100,000, we can find the distribution of cancer counts
46,871
What does statistical power mean when we are interested in the probability of correctly not rejecting the null hypothesis?
The probability of "correctly not rejecting the null hypothesis"--i.e., if the null hypothesis is true, we do not reject it--is controlled by the significance level at which we are doing the test. If I choose a significance level of $\alpha = .05$, so that I reject if my $p$-value is less than .05, then my probability ...
What does statistical power mean when we are interested in the probability of correctly not rejectin
The probability of "correctly not rejecting the null hypothesis"--i.e., if the null hypothesis is true, we do not reject it--is controlled by the significance level at which we are doing the test. If
What does statistical power mean when we are interested in the probability of correctly not rejecting the null hypothesis? The probability of "correctly not rejecting the null hypothesis"--i.e., if the null hypothesis is true, we do not reject it--is controlled by the significance level at which we are doing the test. ...
What does statistical power mean when we are interested in the probability of correctly not rejectin The probability of "correctly not rejecting the null hypothesis"--i.e., if the null hypothesis is true, we do not reject it--is controlled by the significance level at which we are doing the test. If
46,872
What does statistical power mean when we are interested in the probability of correctly not rejecting the null hypothesis?
I think you are interested in equivalence testing. See this other question on testing a hypothesis of no group differences. There are various approaches that can be adopted to assess whether the null hypothesis is true. In general, the absence of statistically significant effect is very week evidence for the truth of ...
What does statistical power mean when we are interested in the probability of correctly not rejectin
I think you are interested in equivalence testing. See this other question on testing a hypothesis of no group differences. There are various approaches that can be adopted to assess whether the null
What does statistical power mean when we are interested in the probability of correctly not rejecting the null hypothesis? I think you are interested in equivalence testing. See this other question on testing a hypothesis of no group differences. There are various approaches that can be adopted to assess whether the n...
What does statistical power mean when we are interested in the probability of correctly not rejectin I think you are interested in equivalence testing. See this other question on testing a hypothesis of no group differences. There are various approaches that can be adopted to assess whether the null
46,873
How concerned should I be about the appropriateness of my prior?
It's always possible to create a prior that will overwhelm your data, no matter how many observations you have. However, for any fixed prior, as the number of observations grows, the influence of the prior shrinks (except for the 0-mass case that Macro pointed out in his comment). For some prior distributions there's a...
How concerned should I be about the appropriateness of my prior?
It's always possible to create a prior that will overwhelm your data, no matter how many observations you have. However, for any fixed prior, as the number of observations grows, the influence of the
How concerned should I be about the appropriateness of my prior? It's always possible to create a prior that will overwhelm your data, no matter how many observations you have. However, for any fixed prior, as the number of observations grows, the influence of the prior shrinks (except for the 0-mass case that Macro po...
How concerned should I be about the appropriateness of my prior? It's always possible to create a prior that will overwhelm your data, no matter how many observations you have. However, for any fixed prior, as the number of observations grows, the influence of the
46,874
Regression for poisson process in R
You can still use glm in R, but you include the log of $t$ as an 'offset' to take it into account, something like: fit <- glm( k ~ 1 + offset(log(t)), data=mydata, family=poisson) This will fit an intercept that will be the estimate of $\lambda$, but you could also include covariates if needed.
Regression for poisson process in R
You can still use glm in R, but you include the log of $t$ as an 'offset' to take it into account, something like: fit <- glm( k ~ 1 + offset(log(t)), data=mydata, family=poisson) This will fit an in
Regression for poisson process in R You can still use glm in R, but you include the log of $t$ as an 'offset' to take it into account, something like: fit <- glm( k ~ 1 + offset(log(t)), data=mydata, family=poisson) This will fit an intercept that will be the estimate of $\lambda$, but you could also include covariate...
Regression for poisson process in R You can still use glm in R, but you include the log of $t$ as an 'offset' to take it into account, something like: fit <- glm( k ~ 1 + offset(log(t)), data=mydata, family=poisson) This will fit an in
46,875
Understanding the intra-class correlation coefficient
Common assumptions are that $$ \textrm{Cov}(\mathbf{u}, \mathbf{e}) = \mathbf{0} $$ $$ \textrm{Cov}(\mathbf{e}) = \sigma^2_e \mathbf{I}. $$ Let $i \neq i'$. On the one hand, we have $$\begin{align*} \textrm{Var}(y_{ij}) & = \textrm{Var}(\beta_0 + u_j + e_{ij}) \\ & = \textrm{Var}(u_j + e_{ij}) \\ & = \textrm{Var}(...
Understanding the intra-class correlation coefficient
Common assumptions are that $$ \textrm{Cov}(\mathbf{u}, \mathbf{e}) = \mathbf{0} $$ $$ \textrm{Cov}(\mathbf{e}) = \sigma^2_e \mathbf{I}. $$ Let $i \neq i'$. On the one hand, we have $$\begin{align*}
Understanding the intra-class correlation coefficient Common assumptions are that $$ \textrm{Cov}(\mathbf{u}, \mathbf{e}) = \mathbf{0} $$ $$ \textrm{Cov}(\mathbf{e}) = \sigma^2_e \mathbf{I}. $$ Let $i \neq i'$. On the one hand, we have $$\begin{align*} \textrm{Var}(y_{ij}) & = \textrm{Var}(\beta_0 + u_j + e_{ij}) \\...
Understanding the intra-class correlation coefficient Common assumptions are that $$ \textrm{Cov}(\mathbf{u}, \mathbf{e}) = \mathbf{0} $$ $$ \textrm{Cov}(\mathbf{e}) = \sigma^2_e \mathbf{I}. $$ Let $i \neq i'$. On the one hand, we have $$\begin{align*}
46,876
Looking for a OLS-Equation if one Regressor is correlated with the error
While this is not a situation that arises in practice, this is related to the so-called control function approach to dealing with endogeneity. Let me rewrite your (simple) model $$ Y_i = \beta_0 + \beta_1X_i + U_i $$ together with your assumptions $\mathbb{E}(U_i)=0$ and $\mathbb{E}(U_iX_i)=\rho$. Then $$ \mathbb{E}(X...
Looking for a OLS-Equation if one Regressor is correlated with the error
While this is not a situation that arises in practice, this is related to the so-called control function approach to dealing with endogeneity. Let me rewrite your (simple) model $$ Y_i = \beta_0 + \be
Looking for a OLS-Equation if one Regressor is correlated with the error While this is not a situation that arises in practice, this is related to the so-called control function approach to dealing with endogeneity. Let me rewrite your (simple) model $$ Y_i = \beta_0 + \beta_1X_i + U_i $$ together with your assumptions...
Looking for a OLS-Equation if one Regressor is correlated with the error While this is not a situation that arises in practice, this is related to the so-called control function approach to dealing with endogeneity. Let me rewrite your (simple) model $$ Y_i = \beta_0 + \be
46,877
Which data mining packages support anomaly detection?
Use ELKI. It not only has tons of anomaly detection algorithms (they call them "outlier detection" though), but it also is significantly faster than the others, in particular when you used indexes.
Which data mining packages support anomaly detection?
Use ELKI. It not only has tons of anomaly detection algorithms (they call them "outlier detection" though), but it also is significantly faster than the others, in particular when you used indexes.
Which data mining packages support anomaly detection? Use ELKI. It not only has tons of anomaly detection algorithms (they call them "outlier detection" though), but it also is significantly faster than the others, in particular when you used indexes.
Which data mining packages support anomaly detection? Use ELKI. It not only has tons of anomaly detection algorithms (they call them "outlier detection" though), but it also is significantly faster than the others, in particular when you used indexes.
46,878
Which data mining packages support anomaly detection?
For Venturini's (2011) outlier detection method Washer, its inventor published an R implementation here and an R package here. Venturini, A. (2011). Time Series Outlier Detection: A New Non Parametric Methodology (Washer). Statistica 71: 329-344.
Which data mining packages support anomaly detection?
For Venturini's (2011) outlier detection method Washer, its inventor published an R implementation here and an R package here. Venturini, A. (2011). Time Series Outlier Detection: A New Non Parametri
Which data mining packages support anomaly detection? For Venturini's (2011) outlier detection method Washer, its inventor published an R implementation here and an R package here. Venturini, A. (2011). Time Series Outlier Detection: A New Non Parametric Methodology (Washer). Statistica 71: 329-344.
Which data mining packages support anomaly detection? For Venturini's (2011) outlier detection method Washer, its inventor published an R implementation here and an R package here. Venturini, A. (2011). Time Series Outlier Detection: A New Non Parametri
46,879
Which data mining packages support anomaly detection?
R has a full task view listing the major implementations.
Which data mining packages support anomaly detection?
R has a full task view listing the major implementations.
Which data mining packages support anomaly detection? R has a full task view listing the major implementations.
Which data mining packages support anomaly detection? R has a full task view listing the major implementations.
46,880
Estimating specific variance for items in factor analysis - how to achieve the theoretical maximum?
Not sure my response is relevant, perhaps what I say is not news for you. It is about starting values for communalities in factor analysis. Actually, you cannot estimate the true communality (and likewise uniqueness) of a variable before you've done FA. This is because communalities are tied up with the number of facto...
Estimating specific variance for items in factor analysis - how to achieve the theoretical maximum?
Not sure my response is relevant, perhaps what I say is not news for you. It is about starting values for communalities in factor analysis. Actually, you cannot estimate the true communality (and like
Estimating specific variance for items in factor analysis - how to achieve the theoretical maximum? Not sure my response is relevant, perhaps what I say is not news for you. It is about starting values for communalities in factor analysis. Actually, you cannot estimate the true communality (and likewise uniqueness) of ...
Estimating specific variance for items in factor analysis - how to achieve the theoretical maximum? Not sure my response is relevant, perhaps what I say is not news for you. It is about starting values for communalities in factor analysis. Actually, you cannot estimate the true communality (and like
46,881
Book recommendations for biostatisticians in CRO and pharmacy
I must include the excellent "Statistical Issues in Drug Development" by Stephen Senn. Brilliant book.
Book recommendations for biostatisticians in CRO and pharmacy
I must include the excellent "Statistical Issues in Drug Development" by Stephen Senn. Brilliant book.
Book recommendations for biostatisticians in CRO and pharmacy I must include the excellent "Statistical Issues in Drug Development" by Stephen Senn. Brilliant book.
Book recommendations for biostatisticians in CRO and pharmacy I must include the excellent "Statistical Issues in Drug Development" by Stephen Senn. Brilliant book.
46,882
Book recommendations for biostatisticians in CRO and pharmacy
You might find Hahn, & Doganaksoy (2011). A Career in Statistics: Beyond the Numbers, to be helpful for your purposes.
Book recommendations for biostatisticians in CRO and pharmacy
You might find Hahn, & Doganaksoy (2011). A Career in Statistics: Beyond the Numbers, to be helpful for your purposes.
Book recommendations for biostatisticians in CRO and pharmacy You might find Hahn, & Doganaksoy (2011). A Career in Statistics: Beyond the Numbers, to be helpful for your purposes.
Book recommendations for biostatisticians in CRO and pharmacy You might find Hahn, & Doganaksoy (2011). A Career in Statistics: Beyond the Numbers, to be helpful for your purposes.
46,883
Test for equal variance
Note that all the tests for equal variances are rule out tests. They test the null hypothesis that the 2 variances (standard deviations) are equal, so if you reject the null hypothesis then you can be fairly sure that they are not equal, but if you get a non-significant result that does not mean that they are equal, ...
Test for equal variance
Note that all the tests for equal variances are rule out tests. They test the null hypothesis that the 2 variances (standard deviations) are equal, so if you reject the null hypothesis then you can b
Test for equal variance Note that all the tests for equal variances are rule out tests. They test the null hypothesis that the 2 variances (standard deviations) are equal, so if you reject the null hypothesis then you can be fairly sure that they are not equal, but if you get a non-significant result that does not mea...
Test for equal variance Note that all the tests for equal variances are rule out tests. They test the null hypothesis that the 2 variances (standard deviations) are equal, so if you reject the null hypothesis then you can b
46,884
Test for equal variance
I wonder if your lecturer was referring to a common rule of thumb: analyses like ANOVA are fairly robust to heterogeneity and can often withstand differing variances between groups by up to a ratio of four times. You can get a sense of that by just looking at the variances. Another possibility is that your lecturer wa...
Test for equal variance
I wonder if your lecturer was referring to a common rule of thumb: analyses like ANOVA are fairly robust to heterogeneity and can often withstand differing variances between groups by up to a ratio of
Test for equal variance I wonder if your lecturer was referring to a common rule of thumb: analyses like ANOVA are fairly robust to heterogeneity and can often withstand differing variances between groups by up to a ratio of four times. You can get a sense of that by just looking at the variances. Another possibility ...
Test for equal variance I wonder if your lecturer was referring to a common rule of thumb: analyses like ANOVA are fairly robust to heterogeneity and can often withstand differing variances between groups by up to a ratio of
46,885
Multivariate analysis techniques for fMRI data
A very useful text is The Statistical Analysis of Functional MRI Data by Nicole Lazar (free pdf via Springerlink with institutional access). Chapter 7 covers multivariate approaches to the analysis of fMRI data. You don't mention in your post but the analysis of resting state vs. task generally require different approa...
Multivariate analysis techniques for fMRI data
A very useful text is The Statistical Analysis of Functional MRI Data by Nicole Lazar (free pdf via Springerlink with institutional access). Chapter 7 covers multivariate approaches to the analysis of
Multivariate analysis techniques for fMRI data A very useful text is The Statistical Analysis of Functional MRI Data by Nicole Lazar (free pdf via Springerlink with institutional access). Chapter 7 covers multivariate approaches to the analysis of fMRI data. You don't mention in your post but the analysis of resting st...
Multivariate analysis techniques for fMRI data A very useful text is The Statistical Analysis of Functional MRI Data by Nicole Lazar (free pdf via Springerlink with institutional access). Chapter 7 covers multivariate approaches to the analysis of
46,886
Should I use missing value using imputation or listwise or pairwise deletion methods?
It depends on Amount of missing data (what percentage of data is missing) Type of missing data (MAR, MCAR, NMAR) According to this nice article (Tsikriktsis: A review of techniques for treating missing data in OM survey research, 2005), if more than 10% data is missing, the best solution is Maximum likelihood imputa...
Should I use missing value using imputation or listwise or pairwise deletion methods?
It depends on Amount of missing data (what percentage of data is missing) Type of missing data (MAR, MCAR, NMAR) According to this nice article (Tsikriktsis: A review of techniques for treating miss
Should I use missing value using imputation or listwise or pairwise deletion methods? It depends on Amount of missing data (what percentage of data is missing) Type of missing data (MAR, MCAR, NMAR) According to this nice article (Tsikriktsis: A review of techniques for treating missing data in OM survey research, 20...
Should I use missing value using imputation or listwise or pairwise deletion methods? It depends on Amount of missing data (what percentage of data is missing) Type of missing data (MAR, MCAR, NMAR) According to this nice article (Tsikriktsis: A review of techniques for treating miss
46,887
Should I use missing value using imputation or listwise or pairwise deletion methods?
In short: If your data is missing completely at random (MCAR), i.e., a true value of a missing value has the same distribution as an observed variable and missingness cannot be predicted from any other variables, your results will be unbiased but inefficient using listwise or pairwise deletion. Multiple imputation by c...
Should I use missing value using imputation or listwise or pairwise deletion methods?
In short: If your data is missing completely at random (MCAR), i.e., a true value of a missing value has the same distribution as an observed variable and missingness cannot be predicted from any othe
Should I use missing value using imputation or listwise or pairwise deletion methods? In short: If your data is missing completely at random (MCAR), i.e., a true value of a missing value has the same distribution as an observed variable and missingness cannot be predicted from any other variables, your results will be ...
Should I use missing value using imputation or listwise or pairwise deletion methods? In short: If your data is missing completely at random (MCAR), i.e., a true value of a missing value has the same distribution as an observed variable and missingness cannot be predicted from any othe
46,888
Problems estimating anisotropy parameters for a spatial model
In short, identifying anisotropy is hopeless with these sparse data. The two parameters in question, psiA and psiR, describe anisotropy (the angle and ratio, respectively, of a "geometric anisotropy": consult GSLIB or Journel & Huijbregts for details, because the geoR documentation in Diggle & Ribeiro Jr is indeed inad...
Problems estimating anisotropy parameters for a spatial model
In short, identifying anisotropy is hopeless with these sparse data. The two parameters in question, psiA and psiR, describe anisotropy (the angle and ratio, respectively, of a "geometric anisotropy":
Problems estimating anisotropy parameters for a spatial model In short, identifying anisotropy is hopeless with these sparse data. The two parameters in question, psiA and psiR, describe anisotropy (the angle and ratio, respectively, of a "geometric anisotropy": consult GSLIB or Journel & Huijbregts for details, becaus...
Problems estimating anisotropy parameters for a spatial model In short, identifying anisotropy is hopeless with these sparse data. The two parameters in question, psiA and psiR, describe anisotropy (the angle and ratio, respectively, of a "geometric anisotropy":
46,889
Mahalanobis distance and percentage of the distribution represented
I found this to be a very interesting question because it is very natural to ask but I have never seen the answer or thought about it before. Of course the answer should depend on the dimension of the normal. In researching this on the net I found that the Mahalanobis squared distance for a d-dimensional multivariate...
Mahalanobis distance and percentage of the distribution represented
I found this to be a very interesting question because it is very natural to ask but I have never seen the answer or thought about it before. Of course the answer should depend on the dimension of th
Mahalanobis distance and percentage of the distribution represented I found this to be a very interesting question because it is very natural to ask but I have never seen the answer or thought about it before. Of course the answer should depend on the dimension of the normal. In researching this on the net I found th...
Mahalanobis distance and percentage of the distribution represented I found this to be a very interesting question because it is very natural to ask but I have never seen the answer or thought about it before. Of course the answer should depend on the dimension of th
46,890
Mahalanobis distance and percentage of the distribution represented
In Wikipedia, there is table with one-sigma integrals through dimension 10. In the referenced source article there is a full table through $7\sigma$ (Source: Table 1 of "Confidence Analysis of Standard Deviational Ellipse and Its Extension into Higher Dimensional Euclidean Space", Bin Wang, Wenzhong Shi, Zelang Miao)
Mahalanobis distance and percentage of the distribution represented
In Wikipedia, there is table with one-sigma integrals through dimension 10. In the referenced source article there is a full table through $7\sigma$ (Source: Table 1 of "Confidence Analysis of Standar
Mahalanobis distance and percentage of the distribution represented In Wikipedia, there is table with one-sigma integrals through dimension 10. In the referenced source article there is a full table through $7\sigma$ (Source: Table 1 of "Confidence Analysis of Standard Deviational Ellipse and Its Extension into Higher ...
Mahalanobis distance and percentage of the distribution represented In Wikipedia, there is table with one-sigma integrals through dimension 10. In the referenced source article there is a full table through $7\sigma$ (Source: Table 1 of "Confidence Analysis of Standar
46,891
Hidden Markov Model segmentation of different proportions of binary data
My response is in two parts. First, by changing the input (initial) transition probabilities, you can get something similar to what you'd like. Here's some R code demonstrating this for your example: library(HMM) States <- c("0","1","2","3","4") Symbols <- c("0","1") startProbs <- rep(0.2,5) emissionProbs <- matrix(...
Hidden Markov Model segmentation of different proportions of binary data
My response is in two parts. First, by changing the input (initial) transition probabilities, you can get something similar to what you'd like. Here's some R code demonstrating this for your example
Hidden Markov Model segmentation of different proportions of binary data My response is in two parts. First, by changing the input (initial) transition probabilities, you can get something similar to what you'd like. Here's some R code demonstrating this for your example: library(HMM) States <- c("0","1","2","3","4"...
Hidden Markov Model segmentation of different proportions of binary data My response is in two parts. First, by changing the input (initial) transition probabilities, you can get something similar to what you'd like. Here's some R code demonstrating this for your example
46,892
What are speed differences beetwen ML implementations in different languages?
It depends heavily on the algorithm. There are several things for which writing code in C won't give you any benefit: matrix operations (dot products, element wise multiplications/applications of functions like sin or so, matrix inversions, QR decompositions, ...) because BLAS or LAPACK is called. This makes it possib...
What are speed differences beetwen ML implementations in different languages?
It depends heavily on the algorithm. There are several things for which writing code in C won't give you any benefit: matrix operations (dot products, element wise multiplications/applications of fun
What are speed differences beetwen ML implementations in different languages? It depends heavily on the algorithm. There are several things for which writing code in C won't give you any benefit: matrix operations (dot products, element wise multiplications/applications of functions like sin or so, matrix inversions, ...
What are speed differences beetwen ML implementations in different languages? It depends heavily on the algorithm. There are several things for which writing code in C won't give you any benefit: matrix operations (dot products, element wise multiplications/applications of fun
46,893
Interpretation of reference category in logistic regression
Setting Let $X$ be the categorical predictor and suppose it has 3 levels ($X = 1$, $X = 2$, and $X = 3$). Let the third level be the reference category. Define $X_1$ and $X_2$ as follows: $$ X_1 = \left\{ \begin{array}{ll} 1 & \textrm{if } X = 1 \\ 0 & \textrm{otherwise;} \end{array} \right. $$ $$ X_2 = \left\{ \be...
Interpretation of reference category in logistic regression
Setting Let $X$ be the categorical predictor and suppose it has 3 levels ($X = 1$, $X = 2$, and $X = 3$). Let the third level be the reference category. Define $X_1$ and $X_2$ as follows: $$ X_1 = \le
Interpretation of reference category in logistic regression Setting Let $X$ be the categorical predictor and suppose it has 3 levels ($X = 1$, $X = 2$, and $X = 3$). Let the third level be the reference category. Define $X_1$ and $X_2$ as follows: $$ X_1 = \left\{ \begin{array}{ll} 1 & \textrm{if } X = 1 \\ 0 & \tex...
Interpretation of reference category in logistic regression Setting Let $X$ be the categorical predictor and suppose it has 3 levels ($X = 1$, $X = 2$, and $X = 3$). Let the third level be the reference category. Define $X_1$ and $X_2$ as follows: $$ X_1 = \le
46,894
Interpretation of reference category in logistic regression
this is standard for a single variable. the intercept is the log odds for the reference category and the dummy variables betas are the difference in log odds compared to the reference category. so an "insignificant" dummy variable means the logs odds arent significantly different from the reference category. this is...
Interpretation of reference category in logistic regression
this is standard for a single variable. the intercept is the log odds for the reference category and the dummy variables betas are the difference in log odds compared to the reference category. so a
Interpretation of reference category in logistic regression this is standard for a single variable. the intercept is the log odds for the reference category and the dummy variables betas are the difference in log odds compared to the reference category. so an "insignificant" dummy variable means the logs odds arent s...
Interpretation of reference category in logistic regression this is standard for a single variable. the intercept is the log odds for the reference category and the dummy variables betas are the difference in log odds compared to the reference category. so a
46,895
Using Bayesian model diagrams to present both model description and results (posteriors)?
Thanks for your question. I'm glad that the style of diagram helps people "have a real moment of clarity." I concur from personal experience: For me to really understand a model, I have to make a diagram of it like these. The diagrams are intended to communicate the structure of the prior and likelihood. For that purpo...
Using Bayesian model diagrams to present both model description and results (posteriors)?
Thanks for your question. I'm glad that the style of diagram helps people "have a real moment of clarity." I concur from personal experience: For me to really understand a model, I have to make a diag
Using Bayesian model diagrams to present both model description and results (posteriors)? Thanks for your question. I'm glad that the style of diagram helps people "have a real moment of clarity." I concur from personal experience: For me to really understand a model, I have to make a diagram of it like these. The diag...
Using Bayesian model diagrams to present both model description and results (posteriors)? Thanks for your question. I'm glad that the style of diagram helps people "have a real moment of clarity." I concur from personal experience: For me to really understand a model, I have to make a diag
46,896
What are the potential functions of the cliques in Markov random field?
All potential functions can be written in a log-linear form as described in the Wikipedia article. This however may not be that useful, as it requires you to specify a weight for all possible configurations of your clique. Your choice of potential function depends on the properties of the variables you are modelling. ...
What are the potential functions of the cliques in Markov random field?
All potential functions can be written in a log-linear form as described in the Wikipedia article. This however may not be that useful, as it requires you to specify a weight for all possible configu
What are the potential functions of the cliques in Markov random field? All potential functions can be written in a log-linear form as described in the Wikipedia article. This however may not be that useful, as it requires you to specify a weight for all possible configurations of your clique. Your choice of potential...
What are the potential functions of the cliques in Markov random field? All potential functions can be written in a log-linear form as described in the Wikipedia article. This however may not be that useful, as it requires you to specify a weight for all possible configu
46,897
On-line detection of over-fitting in neural networks
Some rather disorganized thoughts on this issue (I hope there is something of use in there somewhere): Rather than having training and test data, you ought to have three partitions: (i) the training set, which is used to optimize the weights of the network (ii) a validation set, which is used to decide when to stop tra...
On-line detection of over-fitting in neural networks
Some rather disorganized thoughts on this issue (I hope there is something of use in there somewhere): Rather than having training and test data, you ought to have three partitions: (i) the training s
On-line detection of over-fitting in neural networks Some rather disorganized thoughts on this issue (I hope there is something of use in there somewhere): Rather than having training and test data, you ought to have three partitions: (i) the training set, which is used to optimize the weights of the network (ii) a val...
On-line detection of over-fitting in neural networks Some rather disorganized thoughts on this issue (I hope there is something of use in there somewhere): Rather than having training and test data, you ought to have three partitions: (i) the training s
46,898
On-line detection of over-fitting in neural networks
There is no standard method of doing it because it is wrong -- you simply overfit your model on the testing data (it is a hidden form of overfitting by parameter selection).
On-line detection of over-fitting in neural networks
There is no standard method of doing it because it is wrong -- you simply overfit your model on the testing data (it is a hidden form of overfitting by parameter selection).
On-line detection of over-fitting in neural networks There is no standard method of doing it because it is wrong -- you simply overfit your model on the testing data (it is a hidden form of overfitting by parameter selection).
On-line detection of over-fitting in neural networks There is no standard method of doing it because it is wrong -- you simply overfit your model on the testing data (it is a hidden form of overfitting by parameter selection).
46,899
Maximum entropy sampler
You can look for a discrete distribution, with the desired first four moments, and with the maximum entropy possible. You can then interpolate the cumulative distribution function to sample from it. In R, it can be done as follows. kurtosis <- 3 n <- 100 x <- seq(-5,5,length=n) dx <- mean(diff(x)) # Opposite of the E...
Maximum entropy sampler
You can look for a discrete distribution, with the desired first four moments, and with the maximum entropy possible. You can then interpolate the cumulative distribution function to sample from it.
Maximum entropy sampler You can look for a discrete distribution, with the desired first four moments, and with the maximum entropy possible. You can then interpolate the cumulative distribution function to sample from it. In R, it can be done as follows. kurtosis <- 3 n <- 100 x <- seq(-5,5,length=n) dx <- mean(diff...
Maximum entropy sampler You can look for a discrete distribution, with the desired first four moments, and with the maximum entropy possible. You can then interpolate the cumulative distribution function to sample from it.
46,900
Maximum entropy sampler
If you only have the kurtosis issue to address, you can use Student $t$-distribution with $\nu$ degrees of freedom that has kurtosis of $6/(\nu-4)$ for $\nu>4$. You would also need to normalize the variance to 1 (it is equal to $\nu/(\nu-2)$ for the original Student distribution). If you are going to be OK with discret...
Maximum entropy sampler
If you only have the kurtosis issue to address, you can use Student $t$-distribution with $\nu$ degrees of freedom that has kurtosis of $6/(\nu-4)$ for $\nu>4$. You would also need to normalize the va
Maximum entropy sampler If you only have the kurtosis issue to address, you can use Student $t$-distribution with $\nu$ degrees of freedom that has kurtosis of $6/(\nu-4)$ for $\nu>4$. You would also need to normalize the variance to 1 (it is equal to $\nu/(\nu-2)$ for the original Student distribution). If you are goi...
Maximum entropy sampler If you only have the kurtosis issue to address, you can use Student $t$-distribution with $\nu$ degrees of freedom that has kurtosis of $6/(\nu-4)$ for $\nu>4$. You would also need to normalize the va