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
38,701
Why don't discrete time survival models require a random effect?
As Richard Hardy notes, discrete-time survival models can incorporate random effects. In many typical use cases, however, they aren't necessary. This is a similar issue for counting-process data in both continuous-time and discrete-time survival models. If an individual can have at most one event and the modeling only ...
Why don't discrete time survival models require a random effect?
As Richard Hardy notes, discrete-time survival models can incorporate random effects. In many typical use cases, however, they aren't necessary. This is a similar issue for counting-process data in bo
Why don't discrete time survival models require a random effect? As Richard Hardy notes, discrete-time survival models can incorporate random effects. In many typical use cases, however, they aren't necessary. This is a similar issue for counting-process data in both continuous-time and discrete-time survival models. I...
Why don't discrete time survival models require a random effect? As Richard Hardy notes, discrete-time survival models can incorporate random effects. In many typical use cases, however, they aren't necessary. This is a similar issue for counting-process data in bo
38,702
Why don't discrete time survival models require a random effect?
I don't see people adding random effects or specifying a correlation structure in discrete time survival models. Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) Chapter 9 "Frailty Models and Heterogeneity" covers both random and fixed effects models of the exact type you are describing. The motivation for ...
Why don't discrete time survival models require a random effect?
I don't see people adding random effects or specifying a correlation structure in discrete time survival models. Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) Chapter 9 "Frailty Models
Why don't discrete time survival models require a random effect? I don't see people adding random effects or specifying a correlation structure in discrete time survival models. Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) Chapter 9 "Frailty Models and Heterogeneity" covers both random and fixed effects...
Why don't discrete time survival models require a random effect? I don't see people adding random effects or specifying a correlation structure in discrete time survival models. Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) Chapter 9 "Frailty Models
38,703
Simulation to estimate a conditional expectation
Unless the conditional density varies rapidly with the conditioning event, a brute-force rejection sample works. Let's state the general problem. You wish to study the distribution of some function $f(X,Y)$ conditional on an event $\mathscr E$ which is either extremely rare or, as in this case, has zero probability (b...
Simulation to estimate a conditional expectation
Unless the conditional density varies rapidly with the conditioning event, a brute-force rejection sample works. Let's state the general problem. You wish to study the distribution of some function $
Simulation to estimate a conditional expectation Unless the conditional density varies rapidly with the conditioning event, a brute-force rejection sample works. Let's state the general problem. You wish to study the distribution of some function $f(X,Y)$ conditional on an event $\mathscr E$ which is either extremely ...
Simulation to estimate a conditional expectation Unless the conditional density varies rapidly with the conditioning event, a brute-force rejection sample works. Let's state the general problem. You wish to study the distribution of some function $
38,704
Simulation to estimate a conditional expectation
We could approach the problem using inverse transform sampling: generate random samples from the standard uniform distribution ($U$) and, given $X+Y$ that we specify, solve for $X$ and $Y$ for each $U$ using the hypothesized CDF. Then test whether $X$ and $Y$ are iid exponential variates. Equivalently, we can reverse t...
Simulation to estimate a conditional expectation
We could approach the problem using inverse transform sampling: generate random samples from the standard uniform distribution ($U$) and, given $X+Y$ that we specify, solve for $X$ and $Y$ for each $U
Simulation to estimate a conditional expectation We could approach the problem using inverse transform sampling: generate random samples from the standard uniform distribution ($U$) and, given $X+Y$ that we specify, solve for $X$ and $Y$ for each $U$ using the hypothesized CDF. Then test whether $X$ and $Y$ are iid exp...
Simulation to estimate a conditional expectation We could approach the problem using inverse transform sampling: generate random samples from the standard uniform distribution ($U$) and, given $X+Y$ that we specify, solve for $X$ and $Y$ for each $U
38,705
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model?
First off: Bias and variance of a model are measures of how bad your model is, while over- and underfitting are possible reasons for why your model is bad. Definition of bias and variance Bias and variance are defined e.g. here. The idea is this: You want to learn some function $f(x)$. You have a lot of datasets $\{D_i...
Why do we say that the model has a high variance when variance is actually the measure of spread of
First off: Bias and variance of a model are measures of how bad your model is, while over- and underfitting are possible reasons for why your model is bad. Definition of bias and variance Bias and var
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model? First off: Bias and variance of a model are measures of how bad your model is, while over- and underfitting are possible reasons for why your model is bad. Definition of bias ...
Why do we say that the model has a high variance when variance is actually the measure of spread of First off: Bias and variance of a model are measures of how bad your model is, while over- and underfitting are possible reasons for why your model is bad. Definition of bias and variance Bias and var
38,706
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model?
When we are building a machine learning model, we have to take two factors into account: On one hand, we want the predictions given by the model to be as accurate as possible, this means that we want the model to have as little error as possible. On the other hand, we know that the observations in our data set are lik...
Why do we say that the model has a high variance when variance is actually the measure of spread of
When we are building a machine learning model, we have to take two factors into account: On one hand, we want the predictions given by the model to be as accurate as possible, this means that we want
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model? When we are building a machine learning model, we have to take two factors into account: On one hand, we want the predictions given by the model to be as accurate as possible...
Why do we say that the model has a high variance when variance is actually the measure of spread of When we are building a machine learning model, we have to take two factors into account: On one hand, we want the predictions given by the model to be as accurate as possible, this means that we want
38,707
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model?
The other answers makes a great illustration, thus I want to answer your "... when variance is not a model's property." It can be a bit confusing since a model is not "data" as such, but a "thing" that produces data. But, since a model is used to produce data, when we talk about a "model having big variance" we actuall...
Why do we say that the model has a high variance when variance is actually the measure of spread of
The other answers makes a great illustration, thus I want to answer your "... when variance is not a model's property." It can be a bit confusing since a model is not "data" as such, but a "thing" tha
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model? The other answers makes a great illustration, thus I want to answer your "... when variance is not a model's property." It can be a bit confusing since a model is not "data" a...
Why do we say that the model has a high variance when variance is actually the measure of spread of The other answers makes a great illustration, thus I want to answer your "... when variance is not a model's property." It can be a bit confusing since a model is not "data" as such, but a "thing" tha
38,708
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model?
TL;DR the variance is computed over hypothetical other randomly sampled training datasets. You can find the technical definition in the other answers, I try to give a bit of background understanding here. Bias and variance (in this usage) ultimately come from a frequentist conceptual framework, which might be a bit cou...
Why do we say that the model has a high variance when variance is actually the measure of spread of
TL;DR the variance is computed over hypothetical other randomly sampled training datasets. You can find the technical definition in the other answers, I try to give a bit of background understanding h
Why do we say that the model has a high variance when variance is actually the measure of spread of the data and not some property of the model? TL;DR the variance is computed over hypothetical other randomly sampled training datasets. You can find the technical definition in the other answers, I try to give a bit of b...
Why do we say that the model has a high variance when variance is actually the measure of spread of TL;DR the variance is computed over hypothetical other randomly sampled training datasets. You can find the technical definition in the other answers, I try to give a bit of background understanding h
38,709
Permutation feature importance on Train vs Validation set
The difference in the observed importance of some features when running the feature importance algorithm on Train and Test sets might indicate a tendency of the model to overfit using these features. This is indeed closely related to your intuition on the noise issue. In other words, your model is over-tuned w.r.t feat...
Permutation feature importance on Train vs Validation set
The difference in the observed importance of some features when running the feature importance algorithm on Train and Test sets might indicate a tendency of the model to overfit using these features.
Permutation feature importance on Train vs Validation set The difference in the observed importance of some features when running the feature importance algorithm on Train and Test sets might indicate a tendency of the model to overfit using these features. This is indeed closely related to your intuition on the noise ...
Permutation feature importance on Train vs Validation set The difference in the observed importance of some features when running the feature importance algorithm on Train and Test sets might indicate a tendency of the model to overfit using these features.
38,710
Permutation feature importance on Train vs Validation set
First: ignore the results you have for the training set, they are worthless. Who cares how good a feature is at predicting for records that built the model? Second: At this point you can’t do anything with features c,d,f,g. You’ve already built your model, yes these features are not useful in predicting the values for ...
Permutation feature importance on Train vs Validation set
First: ignore the results you have for the training set, they are worthless. Who cares how good a feature is at predicting for records that built the model? Second: At this point you can’t do anything
Permutation feature importance on Train vs Validation set First: ignore the results you have for the training set, they are worthless. Who cares how good a feature is at predicting for records that built the model? Second: At this point you can’t do anything with features c,d,f,g. You’ve already built your model, yes t...
Permutation feature importance on Train vs Validation set First: ignore the results you have for the training set, they are worthless. Who cares how good a feature is at predicting for records that built the model? Second: At this point you can’t do anything
38,711
Permutation feature importance on Train vs Validation set
Well, let's think at what those numbers actually mean. If we take feature g for example, we know that our model relies on it a bit. So much that if you shuffle its values when making predictions on train data, your model performance drops by around $0.002$ (if I am correct). However, when we do the same thing and shu...
Permutation feature importance on Train vs Validation set
Well, let's think at what those numbers actually mean. If we take feature g for example, we know that our model relies on it a bit. So much that if you shuffle its values when making predictions on t
Permutation feature importance on Train vs Validation set Well, let's think at what those numbers actually mean. If we take feature g for example, we know that our model relies on it a bit. So much that if you shuffle its values when making predictions on train data, your model performance drops by around $0.002$ (if ...
Permutation feature importance on Train vs Validation set Well, let's think at what those numbers actually mean. If we take feature g for example, we know that our model relies on it a bit. So much that if you shuffle its values when making predictions on t
38,712
Measuring Standard Error of two or more coefficients combined
1) A linear combination a of the coefficients has a standard error of $\sqrt(a'Va)$ where $V$ is the variance covariance matrix of the coefficients. (See this wikipedia link on the variance of a linear combination of random variables.) We can get $V$ using vcov in R so using fm from the reproducible code in the Note a...
Measuring Standard Error of two or more coefficients combined
1) A linear combination a of the coefficients has a standard error of $\sqrt(a'Va)$ where $V$ is the variance covariance matrix of the coefficients. (See this wikipedia link on the variance of a line
Measuring Standard Error of two or more coefficients combined 1) A linear combination a of the coefficients has a standard error of $\sqrt(a'Va)$ where $V$ is the variance covariance matrix of the coefficients. (See this wikipedia link on the variance of a linear combination of random variables.) We can get $V$ using ...
Measuring Standard Error of two or more coefficients combined 1) A linear combination a of the coefficients has a standard error of $\sqrt(a'Va)$ where $V$ is the variance covariance matrix of the coefficients. (See this wikipedia link on the variance of a line
38,713
Measuring Standard Error of two or more coefficients combined
The sum of two correlated (jointly-)normal variables, $Z=X+Y$, is itself normal, $N(\mu_{X+Y},\sigma_{X+Y})$. The expectation of the distribution is the simple sum, $\mu_{X+Y} = \mu_X+\mu_Y$. The S.D. of the distribution is not quite as simple since you need to know the covariance of the two distributions, but still st...
Measuring Standard Error of two or more coefficients combined
The sum of two correlated (jointly-)normal variables, $Z=X+Y$, is itself normal, $N(\mu_{X+Y},\sigma_{X+Y})$. The expectation of the distribution is the simple sum, $\mu_{X+Y} = \mu_X+\mu_Y$. The S.D.
Measuring Standard Error of two or more coefficients combined The sum of two correlated (jointly-)normal variables, $Z=X+Y$, is itself normal, $N(\mu_{X+Y},\sigma_{X+Y})$. The expectation of the distribution is the simple sum, $\mu_{X+Y} = \mu_X+\mu_Y$. The S.D. of the distribution is not quite as simple since you need...
Measuring Standard Error of two or more coefficients combined The sum of two correlated (jointly-)normal variables, $Z=X+Y$, is itself normal, $N(\mu_{X+Y},\sigma_{X+Y})$. The expectation of the distribution is the simple sum, $\mu_{X+Y} = \mu_X+\mu_Y$. The S.D.
38,714
Identifying the following distribution
For simulation purposes, a Weibull distribution may work well. Allow me to explain why and to say something about the limitations. A plot of the original (unexponentiated) residuals immediately suggested a Weibull distribution to me. (One reason this family comes to mind is that it includes Rayleigh distributions, w...
Identifying the following distribution
For simulation purposes, a Weibull distribution may work well. Allow me to explain why and to say something about the limitations. A plot of the original (unexponentiated) residuals immediately sugge
Identifying the following distribution For simulation purposes, a Weibull distribution may work well. Allow me to explain why and to say something about the limitations. A plot of the original (unexponentiated) residuals immediately suggested a Weibull distribution to me. (One reason this family comes to mind is that...
Identifying the following distribution For simulation purposes, a Weibull distribution may work well. Allow me to explain why and to say something about the limitations. A plot of the original (unexponentiated) residuals immediately sugge
38,715
Identifying the following distribution
I just did a hand-fit, but Weibull looks better than your Rayleigh.
Identifying the following distribution
I just did a hand-fit, but Weibull looks better than your Rayleigh.
Identifying the following distribution I just did a hand-fit, but Weibull looks better than your Rayleigh.
Identifying the following distribution I just did a hand-fit, but Weibull looks better than your Rayleigh.
38,716
Why is the intercept typed in as a 1 in stats packages (R, python)
It is logical, once you consider the matrix notation that your formula will be translated into internally. In the matrix, the non-constant predictors will be translated into (one or more) columns, and the intercept will be translated into a column consisting entirely of ones. For instance, in R you would write a very s...
Why is the intercept typed in as a 1 in stats packages (R, python)
It is logical, once you consider the matrix notation that your formula will be translated into internally. In the matrix, the non-constant predictors will be translated into (one or more) columns, and
Why is the intercept typed in as a 1 in stats packages (R, python) It is logical, once you consider the matrix notation that your formula will be translated into internally. In the matrix, the non-constant predictors will be translated into (one or more) columns, and the intercept will be translated into a column consi...
Why is the intercept typed in as a 1 in stats packages (R, python) It is logical, once you consider the matrix notation that your formula will be translated into internally. In the matrix, the non-constant predictors will be translated into (one or more) columns, and
38,717
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$
Firstly I would suggest you read an excellent book by Ben Bolker entitled Ecological Models and Data in R. Written for ecologists , I think this is one of the best books on practical data analysis regardless of background, I'm an engineer and I have used it a lot. I'm sure there are other mathematical statistics book, ...
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$
Firstly I would suggest you read an excellent book by Ben Bolker entitled Ecological Models and Data in R. Written for ecologists , I think this is one of the best books on practical data analysis reg
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$ Firstly I would suggest you read an excellent book by Ben Bolker entitled Ecological Models and Data in R. Written for ecologists , I think this is one of the best books on practical data analysis regardless of background, I'm an engineer and I ha...
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$ Firstly I would suggest you read an excellent book by Ben Bolker entitled Ecological Models and Data in R. Written for ecologists , I think this is one of the best books on practical data analysis reg
38,718
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$
Is there any standard way to do it? If you think that following is a good approximation (the model you simulate from as an example) $$y_i = x_i^\lambda +\epsilon_i, \qquad \epsilon_i\sim N(0,\sigma^2)$$ i.e., $$\log(E(y_i))=\lambda \log x_i$$ then you can use glm with family = gaussian("log") which is exactly this mo...
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$
Is there any standard way to do it? If you think that following is a good approximation (the model you simulate from as an example) $$y_i = x_i^\lambda +\epsilon_i, \qquad \epsilon_i\sim N(0,\sigma^2
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$ Is there any standard way to do it? If you think that following is a good approximation (the model you simulate from as an example) $$y_i = x_i^\lambda +\epsilon_i, \qquad \epsilon_i\sim N(0,\sigma^2)$$ i.e., $$\log(E(y_i))=\lambda \log x_i$$ th...
Estimate $\lambda$ in the fitting line $x^\lambda$, where $x \in [0, 1]$ Is there any standard way to do it? If you think that following is a good approximation (the model you simulate from as an example) $$y_i = x_i^\lambda +\epsilon_i, \qquad \epsilon_i\sim N(0,\sigma^2
38,719
What is the precise definition of "performance" in machine learning?
In the absence of any specific clarifying context, "performance" is just a synonym for "quality." The sentence "I want a model that performs better" is essentially the same as the sentence "I want a higher-quality model." Readers understand that the speaker is not satisfied with how well the model solves some particula...
What is the precise definition of "performance" in machine learning?
In the absence of any specific clarifying context, "performance" is just a synonym for "quality." The sentence "I want a model that performs better" is essentially the same as the sentence "I want a h
What is the precise definition of "performance" in machine learning? In the absence of any specific clarifying context, "performance" is just a synonym for "quality." The sentence "I want a model that performs better" is essentially the same as the sentence "I want a higher-quality model." Readers understand that the s...
What is the precise definition of "performance" in machine learning? In the absence of any specific clarifying context, "performance" is just a synonym for "quality." The sentence "I want a model that performs better" is essentially the same as the sentence "I want a h
38,720
What is the precise definition of "performance" in machine learning?
Performance does not englobe a formal definition, it is mostly dependent on, but not limited to: the context of the model you are trying to implement the metrics you are using to evaluate the model's output the objective you are pursuing The use of one metric or another will depend whether you are trying to predict...
What is the precise definition of "performance" in machine learning?
Performance does not englobe a formal definition, it is mostly dependent on, but not limited to: the context of the model you are trying to implement the metrics you are using to evaluate the model'
What is the precise definition of "performance" in machine learning? Performance does not englobe a formal definition, it is mostly dependent on, but not limited to: the context of the model you are trying to implement the metrics you are using to evaluate the model's output the objective you are pursuing The use o...
What is the precise definition of "performance" in machine learning? Performance does not englobe a formal definition, it is mostly dependent on, but not limited to: the context of the model you are trying to implement the metrics you are using to evaluate the model'
38,721
What is the precise definition of "performance" in machine learning?
As the other answer correctly points out, there is no universal definition or measurement of performance of a machine learning model. Rather, performance metrics are highly dependent on the domain and ultimate purpose of the model being built. Performance of an ML model is just "how good" it does at a particular task, ...
What is the precise definition of "performance" in machine learning?
As the other answer correctly points out, there is no universal definition or measurement of performance of a machine learning model. Rather, performance metrics are highly dependent on the domain and
What is the precise definition of "performance" in machine learning? As the other answer correctly points out, there is no universal definition or measurement of performance of a machine learning model. Rather, performance metrics are highly dependent on the domain and ultimate purpose of the model being built. Perform...
What is the precise definition of "performance" in machine learning? As the other answer correctly points out, there is no universal definition or measurement of performance of a machine learning model. Rather, performance metrics are highly dependent on the domain and
38,722
Can "cross-validation" be used to choose a prior?
Since prior etymologically signifies before: prior adjective existing or coming before in time, order, or importance. "he has a prior engagement this evening" synonyms: earlier, previous, preceding, foregoing, antecedent, advance, preparatory, preliminary, initial. using the data to build the prior is not correct ...
Can "cross-validation" be used to choose a prior?
Since prior etymologically signifies before: prior adjective existing or coming before in time, order, or importance. "he has a prior engagement this evening" synonyms: earlier, previous, precedin
Can "cross-validation" be used to choose a prior? Since prior etymologically signifies before: prior adjective existing or coming before in time, order, or importance. "he has a prior engagement this evening" synonyms: earlier, previous, preceding, foregoing, antecedent, advance, preparatory, preliminary, initial. ...
Can "cross-validation" be used to choose a prior? Since prior etymologically signifies before: prior adjective existing or coming before in time, order, or importance. "he has a prior engagement this evening" synonyms: earlier, previous, precedin
38,723
Can "cross-validation" be used to choose a prior?
In this paper Andrew Gelman used cross validation on a corpus of datasets to propose a weakly informative prior, intended for routine use. That seems a sensible approach! Gelman, Andrew, et al. "A weakly informative default prior distribution for logistic and other regression models." The annals of applied statistics 2...
Can "cross-validation" be used to choose a prior?
In this paper Andrew Gelman used cross validation on a corpus of datasets to propose a weakly informative prior, intended for routine use. That seems a sensible approach! Gelman, Andrew, et al. "A wea
Can "cross-validation" be used to choose a prior? In this paper Andrew Gelman used cross validation on a corpus of datasets to propose a weakly informative prior, intended for routine use. That seems a sensible approach! Gelman, Andrew, et al. "A weakly informative default prior distribution for logistic and other regr...
Can "cross-validation" be used to choose a prior? In this paper Andrew Gelman used cross validation on a corpus of datasets to propose a weakly informative prior, intended for routine use. That seems a sensible approach! Gelman, Andrew, et al. "A wea
38,724
Can "cross-validation" be used to choose a prior?
Firstly, I completely understand the temptation to do this. You want your model assumptions to be defensible and your model to be valid out-of-sample. The issue is: this is not Bayesian inference. This is regularization using Bayes theorem. That isn't "good" or "bad." The answer to your titular question is yes absolute...
Can "cross-validation" be used to choose a prior?
Firstly, I completely understand the temptation to do this. You want your model assumptions to be defensible and your model to be valid out-of-sample. The issue is: this is not Bayesian inference. Thi
Can "cross-validation" be used to choose a prior? Firstly, I completely understand the temptation to do this. You want your model assumptions to be defensible and your model to be valid out-of-sample. The issue is: this is not Bayesian inference. This is regularization using Bayes theorem. That isn't "good" or "bad." T...
Can "cross-validation" be used to choose a prior? Firstly, I completely understand the temptation to do this. You want your model assumptions to be defensible and your model to be valid out-of-sample. The issue is: this is not Bayesian inference. Thi
38,725
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
Simultaneous modelling of mean and variance using double generalized linear models The emphasis of gamlss is obviously on generalized additive models (GAMs). The general of idea of simultaneously modelling the mean and variance using generalized linear models (GLMs) rather than GAMs has been around much longer, and you...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
Simultaneous modelling of mean and variance using double generalized linear models The emphasis of gamlss is obviously on generalized additive models (GAMs). The general of idea of simultaneously mode
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? Simultaneous modelling of mean and variance using double generalized linear models The emphasis of gamlss is obviously on generalized additive models (GAMs). The general of idea of simultaneously modelling the mean and vari...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? Simultaneous modelling of mean and variance using double generalized linear models The emphasis of gamlss is obviously on generalized additive models (GAMs). The general of idea of simultaneously mode
38,726
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
If I understand you correctly, this can be done using the gamlss() function in the gamlss package. Given your example, you can model the scale parameter $\sigma$ as follows: fit <- gamlss(y~x, sigma.formula = ~x, data = dat, family = NO) > summary(fit) ******************************************************************...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
If I understand you correctly, this can be done using the gamlss() function in the gamlss package. Given your example, you can model the scale parameter $\sigma$ as follows: fit <- gamlss(y~x, sigma.
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? If I understand you correctly, this can be done using the gamlss() function in the gamlss package. Given your example, you can model the scale parameter $\sigma$ as follows: fit <- gamlss(y~x, sigma.formula = ~x, data = da...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? If I understand you correctly, this can be done using the gamlss() function in the gamlss package. Given your example, you can model the scale parameter $\sigma$ as follows: fit <- gamlss(y~x, sigma.
38,727
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
@Stefan gave rich family of models with the use of gamlss so my response here is more of an extended comment. For some models with non-constant variance one can just do a simple "rearrangement" of the model and use simpler functions such as lm. Suppose the model is $$y=a+b x + x \epsilon$$ with $\epsilon \sim N(0,\sigm...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors?
@Stefan gave rich family of models with the use of gamlss so my response here is more of an extended comment. For some models with non-constant variance one can just do a simple "rearrangement" of the
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? @Stefan gave rich family of models with the use of gamlss so my response here is more of an extended comment. For some models with non-constant variance one can just do a simple "rearrangement" of the model and use simpler ...
Conditionally heteroskedastic linear regression: How can I model variance from given predictors? @Stefan gave rich family of models with the use of gamlss so my response here is more of an extended comment. For some models with non-constant variance one can just do a simple "rearrangement" of the
38,728
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
To clarify terminology, a GLM with Gaussian distribution and identity link is identical to the general linear model or linear regression. So I will simply refer to it as linear regression going forward. Additionally, the normality assumption in regression is on the error term. Since the residuals are estimated errors, ...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
To clarify terminology, a GLM with Gaussian distribution and identity link is identical to the general linear model or linear regression. So I will simply refer to it as linear regression going forwar
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? To clarify terminology, a GLM with Gaussian distribution and identity link is identical to the general linear model or linear regression. So I will simply refer to it as linear regression going forward. Additionally, the normal...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? To clarify terminology, a GLM with Gaussian distribution and identity link is identical to the general linear model or linear regression. So I will simply refer to it as linear regression going forwar
38,729
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
The model that is a generalization of Wilcoxon, Kruskal-Wallis, and, to some extent, Spearman's $\rho$, is the proportional odds ordinal logistic semiparametric model. For short we call it the proportional odds (PO) model. The PO model handles the full generality of the linear model plus more, because it is invariant...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
The model that is a generalization of Wilcoxon, Kruskal-Wallis, and, to some extent, Spearman's $\rho$, is the proportional odds ordinal logistic semiparametric model. For short we call it the propor
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? The model that is a generalization of Wilcoxon, Kruskal-Wallis, and, to some extent, Spearman's $\rho$, is the proportional odds ordinal logistic semiparametric model. For short we call it the proportional odds (PO) model. Th...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? The model that is a generalization of Wilcoxon, Kruskal-Wallis, and, to some extent, Spearman's $\rho$, is the proportional odds ordinal logistic semiparametric model. For short we call it the propor
38,730
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
I think Jim's answer addresses all your points adequately, but I'll try to boil it down to the per-question points. 1) Are these two approaches appropriate and equally valid alternatives, depending on (non)normality? Definitely not. Regression, in general, seeks to describe the relationship between typical values of ...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM?
I think Jim's answer addresses all your points adequately, but I'll try to boil it down to the per-question points. 1) Are these two approaches appropriate and equally valid alternatives, depending o
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? I think Jim's answer addresses all your points adequately, but I'll try to boil it down to the per-question points. 1) Are these two approaches appropriate and equally valid alternatives, depending on (non)normality? Definite...
Validity of using a combination of Wilcoxon tests and Spearman rho as an alternative to GLM? I think Jim's answer addresses all your points adequately, but I'll try to boil it down to the per-question points. 1) Are these two approaches appropriate and equally valid alternatives, depending o
38,731
Reference book for logistic regression
Hosmer and Lemeshow's (later eds. also Sturdivant) Applied Logistic Regression http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470582472.html I cannot say that it is the best book though, because I have not read others on logistic regression. It think it is a standard work though.
Reference book for logistic regression
Hosmer and Lemeshow's (later eds. also Sturdivant) Applied Logistic Regression http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470582472.html I cannot say that it is the best book though, because I
Reference book for logistic regression Hosmer and Lemeshow's (later eds. also Sturdivant) Applied Logistic Regression http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470582472.html I cannot say that it is the best book though, because I have not read others on logistic regression. It think it is a standard work thou...
Reference book for logistic regression Hosmer and Lemeshow's (later eds. also Sturdivant) Applied Logistic Regression http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470582472.html I cannot say that it is the best book though, because I
38,732
Reference book for logistic regression
Although it is not specifically on logistic regression, Agresti's Categorical Data Analysis is recommended. Chapters 4-6 cover "Introduction to Generalized Linear Models", "Logistic Regression", and "Building, Checking, and Applying Logistic Regression Models". Previous chapters could also provide some background about...
Reference book for logistic regression
Although it is not specifically on logistic regression, Agresti's Categorical Data Analysis is recommended. Chapters 4-6 cover "Introduction to Generalized Linear Models", "Logistic Regression", and "
Reference book for logistic regression Although it is not specifically on logistic regression, Agresti's Categorical Data Analysis is recommended. Chapters 4-6 cover "Introduction to Generalized Linear Models", "Logistic Regression", and "Building, Checking, and Applying Logistic Regression Models". Previous chapters c...
Reference book for logistic regression Although it is not specifically on logistic regression, Agresti's Categorical Data Analysis is recommended. Chapters 4-6 cover "Introduction to Generalized Linear Models", "Logistic Regression", and "
38,733
Reference book for logistic regression
Possibly even better than a book, I can highly recommend Andrew Ng's coursera course on machine learning. It gives an excellent overview of several machine learning algorithms. The main advantages are that it both discusses the theory and discusses many practical things to worry about when implementing machine learning...
Reference book for logistic regression
Possibly even better than a book, I can highly recommend Andrew Ng's coursera course on machine learning. It gives an excellent overview of several machine learning algorithms. The main advantages are
Reference book for logistic regression Possibly even better than a book, I can highly recommend Andrew Ng's coursera course on machine learning. It gives an excellent overview of several machine learning algorithms. The main advantages are that it both discusses the theory and discusses many practical things to worry a...
Reference book for logistic regression Possibly even better than a book, I can highly recommend Andrew Ng's coursera course on machine learning. It gives an excellent overview of several machine learning algorithms. The main advantages are
38,734
Probability of surviving an event three times
When you write "No extra variables, each incident is isolated and does not affect the subsequent", the mathematical word for this is that they are independent. And for independent events $A$ and $B$, the probability of both events occurring is $P(A) \times P(B)$. Moreover, if there are three independent events $A$, $B$...
Probability of surviving an event three times
When you write "No extra variables, each incident is isolated and does not affect the subsequent", the mathematical word for this is that they are independent. And for independent events $A$ and $B$,
Probability of surviving an event three times When you write "No extra variables, each incident is isolated and does not affect the subsequent", the mathematical word for this is that they are independent. And for independent events $A$ and $B$, the probability of both events occurring is $P(A) \times P(B)$. Moreover, ...
Probability of surviving an event three times When you write "No extra variables, each incident is isolated and does not affect the subsequent", the mathematical word for this is that they are independent. And for independent events $A$ and $B$,
38,735
Invert a sparse covariance matrix
Could you make use of a simple block matrix inversion? $$\left[\begin{array}{cc} A & B \\C & D \end{array}\right]^{-1}$$ $$=\begin{bmatrix} (A - BD^{-1}C)^{-1} & -A^{-1}B(D - CA^{-1}B)^{-1} \\ -D^{-1}C(A - BD^{-1}C)^{-1} & (D - CA^{-1}B)^{-1} \end{bmatrix}$$ (where here "$A$" w...
Invert a sparse covariance matrix
Could you make use of a simple block matrix inversion? $$\left[\begin{array}{cc} A & B \\C & D \end{array}\right]^{-1}$$ $$=\begin{bmatrix} (A - BD^{-1}C)^{-1} & -A^{-1}B(D -
Invert a sparse covariance matrix Could you make use of a simple block matrix inversion? $$\left[\begin{array}{cc} A & B \\C & D \end{array}\right]^{-1}$$ $$=\begin{bmatrix} (A - BD^{-1}C)^{-1} & -A^{-1}B(D - CA^{-1}B)^{-1} \\ -D^{-1}C(A - BD^{-1}C)^{-1} & (D - CA^{-1}B)^{-1} \...
Invert a sparse covariance matrix Could you make use of a simple block matrix inversion? $$\left[\begin{array}{cc} A & B \\C & D \end{array}\right]^{-1}$$ $$=\begin{bmatrix} (A - BD^{-1}C)^{-1} & -A^{-1}B(D -
38,736
Invert a sparse covariance matrix
For general sparse matrices, very efficient Choleski-based inversion can be done using the SparseM package. The basic steps are to create a vector of nonzero elements and vectors of row and column numbers to which these elements correspond. SparseM takes it from there. I've used this in the R rms package orm functio...
Invert a sparse covariance matrix
For general sparse matrices, very efficient Choleski-based inversion can be done using the SparseM package. The basic steps are to create a vector of nonzero elements and vectors of row and column nu
Invert a sparse covariance matrix For general sparse matrices, very efficient Choleski-based inversion can be done using the SparseM package. The basic steps are to create a vector of nonzero elements and vectors of row and column numbers to which these elements correspond. SparseM takes it from there. I've used thi...
Invert a sparse covariance matrix For general sparse matrices, very efficient Choleski-based inversion can be done using the SparseM package. The basic steps are to create a vector of nonzero elements and vectors of row and column nu
38,737
Invert a sparse covariance matrix
Because this is a covariance matrix, $e=h$, $f=l$, $g=m$, and $A,B,C,D$ are all positive. Changing notation to handle a generalization of this problem, consider the symmetric matrix $$\mathbb{A} = \pmatrix{ \sigma_1^2 & 0 & 0 & \cdots & x_1 \sigma_1 \sigma_n \\ 0 & \sigma_2^2 & 0 & \cdots & x_2 \sigma_2 \sigma_n \\ 0 ...
Invert a sparse covariance matrix
Because this is a covariance matrix, $e=h$, $f=l$, $g=m$, and $A,B,C,D$ are all positive. Changing notation to handle a generalization of this problem, consider the symmetric matrix $$\mathbb{A} = \p
Invert a sparse covariance matrix Because this is a covariance matrix, $e=h$, $f=l$, $g=m$, and $A,B,C,D$ are all positive. Changing notation to handle a generalization of this problem, consider the symmetric matrix $$\mathbb{A} = \pmatrix{ \sigma_1^2 & 0 & 0 & \cdots & x_1 \sigma_1 \sigma_n \\ 0 & \sigma_2^2 & 0 & \c...
Invert a sparse covariance matrix Because this is a covariance matrix, $e=h$, $f=l$, $g=m$, and $A,B,C,D$ are all positive. Changing notation to handle a generalization of this problem, consider the symmetric matrix $$\mathbb{A} = \p
38,738
What is the mathematically rigorous definition of chunky data?
Data like this is often called quantized, particularly when the numbers' precision is limited by the measurement device. For example, a scale might only display integer numbers of grams or pounds. This is particularly common when an analog signal (from a microphone, strain gauge, etc) is digitized. The resulting error ...
What is the mathematically rigorous definition of chunky data?
Data like this is often called quantized, particularly when the numbers' precision is limited by the measurement device. For example, a scale might only display integer numbers of grams or pounds. Thi
What is the mathematically rigorous definition of chunky data? Data like this is often called quantized, particularly when the numbers' precision is limited by the measurement device. For example, a scale might only display integer numbers of grams or pounds. This is particularly common when an analog signal (from a mi...
What is the mathematically rigorous definition of chunky data? Data like this is often called quantized, particularly when the numbers' precision is limited by the measurement device. For example, a scale might only display integer numbers of grams or pounds. Thi
38,739
What is the mathematically rigorous definition of chunky data?
Generally, "binned data" is how this is referred to. If you think of a histogram, each bar refers to a bin. If a value is between the upper and lower ends of a given bin, that value is placed in this bin. As an example, if you have binned data due to simple rounding (i.e. a true value of 1.01 becomes represented as 1....
What is the mathematically rigorous definition of chunky data?
Generally, "binned data" is how this is referred to. If you think of a histogram, each bar refers to a bin. If a value is between the upper and lower ends of a given bin, that value is placed in this
What is the mathematically rigorous definition of chunky data? Generally, "binned data" is how this is referred to. If you think of a histogram, each bar refers to a bin. If a value is between the upper and lower ends of a given bin, that value is placed in this bin. As an example, if you have binned data due to simpl...
What is the mathematically rigorous definition of chunky data? Generally, "binned data" is how this is referred to. If you think of a histogram, each bar refers to a bin. If a value is between the upper and lower ends of a given bin, that value is placed in this
38,740
What is the mathematically rigorous definition of chunky data?
In your case it is called quantization, a common issue with signal processing. Typically you see evenly spaced data (even when you get no multiplicities). In general (is there are many points close to each other, not necessary with the same value or spacing), look at clustering. For a 1-dimensional values sort them and...
What is the mathematically rigorous definition of chunky data?
In your case it is called quantization, a common issue with signal processing. Typically you see evenly spaced data (even when you get no multiplicities). In general (is there are many points close to
What is the mathematically rigorous definition of chunky data? In your case it is called quantization, a common issue with signal processing. Typically you see evenly spaced data (even when you get no multiplicities). In general (is there are many points close to each other, not necessary with the same value or spacing...
What is the mathematically rigorous definition of chunky data? In your case it is called quantization, a common issue with signal processing. Typically you see evenly spaced data (even when you get no multiplicities). In general (is there are many points close to
38,741
What is the mathematically rigorous definition of chunky data?
To add to the other good answers, and more of a comment on the sources of the chunkiness - quantization can occur for social reasons too, e.g. if you look at a histogram of the diamond dataset in detail you will see pronounced spikes at "nice" values, 0.3, 0.4, 0.5, 0.7, 1.0, 1.2, 1.5, 2.0 etc. There are very few diam...
What is the mathematically rigorous definition of chunky data?
To add to the other good answers, and more of a comment on the sources of the chunkiness - quantization can occur for social reasons too, e.g. if you look at a histogram of the diamond dataset in deta
What is the mathematically rigorous definition of chunky data? To add to the other good answers, and more of a comment on the sources of the chunkiness - quantization can occur for social reasons too, e.g. if you look at a histogram of the diamond dataset in detail you will see pronounced spikes at "nice" values, 0.3, ...
What is the mathematically rigorous definition of chunky data? To add to the other good answers, and more of a comment on the sources of the chunkiness - quantization can occur for social reasons too, e.g. if you look at a histogram of the diamond dataset in deta
38,742
What is the origin of the term confusion matrix?
The question as I understand is not "where did the grid/matrix come from?" but rather "why is the term 'confusion' used?" I think referring back to Pearson is not likely to help. My sense, having learned the term in psychology, is that "confusion" refers to the intuition that an item can be correctly or incorrectly la...
What is the origin of the term confusion matrix?
The question as I understand is not "where did the grid/matrix come from?" but rather "why is the term 'confusion' used?" I think referring back to Pearson is not likely to help. My sense, having lea
What is the origin of the term confusion matrix? The question as I understand is not "where did the grid/matrix come from?" but rather "why is the term 'confusion' used?" I think referring back to Pearson is not likely to help. My sense, having learned the term in psychology, is that "confusion" refers to the intuitio...
What is the origin of the term confusion matrix? The question as I understand is not "where did the grid/matrix come from?" but rather "why is the term 'confusion' used?" I think referring back to Pearson is not likely to help. My sense, having lea
38,743
What is the origin of the term confusion matrix?
I think I understand the history of the term, thanks to an answer here: What is the origin of the term confusion matrix? The confusion matrix was invented at 1904 by Karl Pearson. He used the term Contingency Table. It appeared at Karl Pearson, F.R.S. (1904). Mathematical contributions to the theory of evolution (PDF)....
What is the origin of the term confusion matrix?
I think I understand the history of the term, thanks to an answer here: What is the origin of the term confusion matrix? The confusion matrix was invented at 1904 by Karl Pearson. He used the term Con
What is the origin of the term confusion matrix? I think I understand the history of the term, thanks to an answer here: What is the origin of the term confusion matrix? The confusion matrix was invented at 1904 by Karl Pearson. He used the term Contingency Table. It appeared at Karl Pearson, F.R.S. (1904). Mathematica...
What is the origin of the term confusion matrix? I think I understand the history of the term, thanks to an answer here: What is the origin of the term confusion matrix? The confusion matrix was invented at 1904 by Karl Pearson. He used the term Con
38,744
What is the origin of the term confusion matrix?
What is odd to many veterans of data science is that what is now often called a confusion matrix has been called a classification matrix in the past. Both have the same structure: predicted outcomes in the columns and actual outcomes in the rows. I've always found the term classification matrix to be less confusing t...
What is the origin of the term confusion matrix?
What is odd to many veterans of data science is that what is now often called a confusion matrix has been called a classification matrix in the past. Both have the same structure: predicted outcomes
What is the origin of the term confusion matrix? What is odd to many veterans of data science is that what is now often called a confusion matrix has been called a classification matrix in the past. Both have the same structure: predicted outcomes in the columns and actual outcomes in the rows. I've always found the ...
What is the origin of the term confusion matrix? What is odd to many veterans of data science is that what is now often called a confusion matrix has been called a classification matrix in the past. Both have the same structure: predicted outcomes
38,745
What is the origin of the term confusion matrix?
It was called a "confusion matrix" by Miller and Nicely in 1955. I don't know if this is the origin of the term "confusion matrix," but it might be. G.A. Miller and P.E. Nicely, "Analysis of Perceptual Confusions Among Some English Consonants," Journal of the Acoustical Society of America 27:338-352, 1955
What is the origin of the term confusion matrix?
It was called a "confusion matrix" by Miller and Nicely in 1955. I don't know if this is the origin of the term "confusion matrix," but it might be. G.A. Miller and P.E. Nicely, "Analysis of Perceptu
What is the origin of the term confusion matrix? It was called a "confusion matrix" by Miller and Nicely in 1955. I don't know if this is the origin of the term "confusion matrix," but it might be. G.A. Miller and P.E. Nicely, "Analysis of Perceptual Confusions Among Some English Consonants," Journal of the Acoustical...
What is the origin of the term confusion matrix? It was called a "confusion matrix" by Miller and Nicely in 1955. I don't know if this is the origin of the term "confusion matrix," but it might be. G.A. Miller and P.E. Nicely, "Analysis of Perceptu
38,746
Interpreting test results on log-transformed data
If the logs of the data are really drawn from normally distributed populations with constant variance (but possibly different means), then the original data must have come from lognormal distributions with possibly different scales (due to differences in $\mu$, where adding something to the means on the log-scale has a...
Interpreting test results on log-transformed data
If the logs of the data are really drawn from normally distributed populations with constant variance (but possibly different means), then the original data must have come from lognormal distributions
Interpreting test results on log-transformed data If the logs of the data are really drawn from normally distributed populations with constant variance (but possibly different means), then the original data must have come from lognormal distributions with possibly different scales (due to differences in $\mu$, where ad...
Interpreting test results on log-transformed data If the logs of the data are really drawn from normally distributed populations with constant variance (but possibly different means), then the original data must have come from lognormal distributions
38,747
Interpreting test results on log-transformed data
You're on the right track. You can definitely run a t-test on log-transformed data if it's well-behaved after transformation, and it definitely affects how you interpret your results. In short, you can't make statements about the difference of the means because the mean(log(x)) is not the same as the log(mean(x)) -- t...
Interpreting test results on log-transformed data
You're on the right track. You can definitely run a t-test on log-transformed data if it's well-behaved after transformation, and it definitely affects how you interpret your results. In short, you c
Interpreting test results on log-transformed data You're on the right track. You can definitely run a t-test on log-transformed data if it's well-behaved after transformation, and it definitely affects how you interpret your results. In short, you can't make statements about the difference of the means because the mea...
Interpreting test results on log-transformed data You're on the right track. You can definitely run a t-test on log-transformed data if it's well-behaved after transformation, and it definitely affects how you interpret your results. In short, you c
38,748
Any easy way to cluster GPS trajectories?
There is no easy way. there is no universally useful accepted definition of what is a cluster, so how could you do clustering? Similarity is not objective. If you use e.g. DTW then you do assume the complete series is relevant, not e.g. only parts of it. It works on the technology part, but that doesn't mean the resul...
Any easy way to cluster GPS trajectories?
There is no easy way. there is no universally useful accepted definition of what is a cluster, so how could you do clustering? Similarity is not objective. If you use e.g. DTW then you do assume the
Any easy way to cluster GPS trajectories? There is no easy way. there is no universally useful accepted definition of what is a cluster, so how could you do clustering? Similarity is not objective. If you use e.g. DTW then you do assume the complete series is relevant, not e.g. only parts of it. It works on the techno...
Any easy way to cluster GPS trajectories? There is no easy way. there is no universally useful accepted definition of what is a cluster, so how could you do clustering? Similarity is not objective. If you use e.g. DTW then you do assume the
38,749
Any easy way to cluster GPS trajectories?
It seems you just need to estimate the spatial distribution of "good" locations belonging to ordinary paths in order to detect outliers, which is a way nicer problem than path clustering. The naive but likely sufficient way is to convert the entire path bundle into a density raster with a resolution equal to your inte...
Any easy way to cluster GPS trajectories?
It seems you just need to estimate the spatial distribution of "good" locations belonging to ordinary paths in order to detect outliers, which is a way nicer problem than path clustering. The naive b
Any easy way to cluster GPS trajectories? It seems you just need to estimate the spatial distribution of "good" locations belonging to ordinary paths in order to detect outliers, which is a way nicer problem than path clustering. The naive but likely sufficient way is to convert the entire path bundle into a density r...
Any easy way to cluster GPS trajectories? It seems you just need to estimate the spatial distribution of "good" locations belonging to ordinary paths in order to detect outliers, which is a way nicer problem than path clustering. The naive b
38,750
Any easy way to cluster GPS trajectories?
Consider phrasing the problem as a graph of locations that make up a path and you want to find commonly occurring subgraphs. Try looking at frequent pattern mining approaches, specifically mining graphs, trees and structures. I originally ran across this idea in the gSpan algorithm. It finds a hierarchy of subgraphs (f...
Any easy way to cluster GPS trajectories?
Consider phrasing the problem as a graph of locations that make up a path and you want to find commonly occurring subgraphs. Try looking at frequent pattern mining approaches, specifically mining grap
Any easy way to cluster GPS trajectories? Consider phrasing the problem as a graph of locations that make up a path and you want to find commonly occurring subgraphs. Try looking at frequent pattern mining approaches, specifically mining graphs, trees and structures. I originally ran across this idea in the gSpan algor...
Any easy way to cluster GPS trajectories? Consider phrasing the problem as a graph of locations that make up a path and you want to find commonly occurring subgraphs. Try looking at frequent pattern mining approaches, specifically mining grap
38,751
Any easy way to cluster GPS trajectories?
There are many different forms to approach this problem. There are a lot of research works done in this field (I guess since 2000) and a hand full of algorithms are introduced. Recently I read a good comprehensive survey that I recommend you read it: "Trajectory data mining: an overview" by YU ZHENG, Microsoft Research...
Any easy way to cluster GPS trajectories?
There are many different forms to approach this problem. There are a lot of research works done in this field (I guess since 2000) and a hand full of algorithms are introduced. Recently I read a good
Any easy way to cluster GPS trajectories? There are many different forms to approach this problem. There are a lot of research works done in this field (I guess since 2000) and a hand full of algorithms are introduced. Recently I read a good comprehensive survey that I recommend you read it: "Trajectory data mining: an...
Any easy way to cluster GPS trajectories? There are many different forms to approach this problem. There are a lot of research works done in this field (I guess since 2000) and a hand full of algorithms are introduced. Recently I read a good
38,752
Test if two coefficients are statistically different in logistic regression?
There's a couple of these questions floating around that essentially have the same answer. There are essentially two approaches to testing what are model constraints. Given a regression $Y = \beta_0 + \beta_1X_1 + \beta_2X_2 $, you can 1. Modify ("constrain") the regression structure and perform some kind of test Write...
Test if two coefficients are statistically different in logistic regression?
There's a couple of these questions floating around that essentially have the same answer. There are essentially two approaches to testing what are model constraints. Given a regression $Y = \beta_0 +
Test if two coefficients are statistically different in logistic regression? There's a couple of these questions floating around that essentially have the same answer. There are essentially two approaches to testing what are model constraints. Given a regression $Y = \beta_0 + \beta_1X_1 + \beta_2X_2 $, you can 1. Modi...
Test if two coefficients are statistically different in logistic regression? There's a couple of these questions floating around that essentially have the same answer. There are essentially two approaches to testing what are model constraints. Given a regression $Y = \beta_0 +
38,753
Test if two coefficients are statistically different in logistic regression?
You can specify two models: 1) Model with parameter restrictions 2) Model without these. Next you can test via likelihood ratio test if your restricted model should be abandoned in favor of unrestricted one. So null hypothesis is restricted model, which is not accepted but can only be rejected. Here is link to impl...
Test if two coefficients are statistically different in logistic regression?
You can specify two models: 1) Model with parameter restrictions 2) Model without these. Next you can test via likelihood ratio test if your restricted model should be abandoned in favor of unrestri
Test if two coefficients are statistically different in logistic regression? You can specify two models: 1) Model with parameter restrictions 2) Model without these. Next you can test via likelihood ratio test if your restricted model should be abandoned in favor of unrestricted one. So null hypothesis is restricted ...
Test if two coefficients are statistically different in logistic regression? You can specify two models: 1) Model with parameter restrictions 2) Model without these. Next you can test via likelihood ratio test if your restricted model should be abandoned in favor of unrestri
38,754
Test if two coefficients are statistically different in logistic regression?
Questions of this form in hypothesis testing are generally answered by testing the hypothesis that the difference of two parameters is greater than zero. I am not aware of a direct approach, but this is one possibility. Suppose you want to test if $a$ is statistically different from $b$ in $logit (z) = aX + bY$ ..(1) ...
Test if two coefficients are statistically different in logistic regression?
Questions of this form in hypothesis testing are generally answered by testing the hypothesis that the difference of two parameters is greater than zero. I am not aware of a direct approach, but this
Test if two coefficients are statistically different in logistic regression? Questions of this form in hypothesis testing are generally answered by testing the hypothesis that the difference of two parameters is greater than zero. I am not aware of a direct approach, but this is one possibility. Suppose you want to tes...
Test if two coefficients are statistically different in logistic regression? Questions of this form in hypothesis testing are generally answered by testing the hypothesis that the difference of two parameters is greater than zero. I am not aware of a direct approach, but this
38,755
Test if two coefficients are statistically different in logistic regression?
LR test may be similar to F-test in linear regression. If individual coefficients are to be compared, something like t-test may be more relevant. GLM, if estimated by maximum likelihood estimation, coefficient estimators follow the normal distribution asymtotically and this is why Z-test is normally performed rather th...
Test if two coefficients are statistically different in logistic regression?
LR test may be similar to F-test in linear regression. If individual coefficients are to be compared, something like t-test may be more relevant. GLM, if estimated by maximum likelihood estimation, co
Test if two coefficients are statistically different in logistic regression? LR test may be similar to F-test in linear regression. If individual coefficients are to be compared, something like t-test may be more relevant. GLM, if estimated by maximum likelihood estimation, coefficient estimators follow the normal dist...
Test if two coefficients are statistically different in logistic regression? LR test may be similar to F-test in linear regression. If individual coefficients are to be compared, something like t-test may be more relevant. GLM, if estimated by maximum likelihood estimation, co
38,756
Textbooks on linear regression with least squares
I suggest John Fox's "Applied Regression Analysis and Generalized Linear Models" and its companion text "An R Companion to Applied Regression" for one text on regression. James and Hastie's text is introducing regression to develop ideas for statistical learning. Faraway's text has many insights, but is terse. Gelman's...
Textbooks on linear regression with least squares
I suggest John Fox's "Applied Regression Analysis and Generalized Linear Models" and its companion text "An R Companion to Applied Regression" for one text on regression. James and Hastie's text is in
Textbooks on linear regression with least squares I suggest John Fox's "Applied Regression Analysis and Generalized Linear Models" and its companion text "An R Companion to Applied Regression" for one text on regression. James and Hastie's text is introducing regression to develop ideas for statistical learning. Farawa...
Textbooks on linear regression with least squares I suggest John Fox's "Applied Regression Analysis and Generalized Linear Models" and its companion text "An R Companion to Applied Regression" for one text on regression. James and Hastie's text is in
38,757
Textbooks on linear regression with least squares
Practical Regression and Anova using R by Julian Faraway is a good book, and is freely available. If you happen to read French, I recommend Régression, Théorie et applications by Cornillon and Matzner-Løber.
Textbooks on linear regression with least squares
Practical Regression and Anova using R by Julian Faraway is a good book, and is freely available. If you happen to read French, I recommend Régression, Théorie et applications by Cornillon and Matzne
Textbooks on linear regression with least squares Practical Regression and Anova using R by Julian Faraway is a good book, and is freely available. If you happen to read French, I recommend Régression, Théorie et applications by Cornillon and Matzner-Løber.
Textbooks on linear regression with least squares Practical Regression and Anova using R by Julian Faraway is a good book, and is freely available. If you happen to read French, I recommend Régression, Théorie et applications by Cornillon and Matzne
38,758
Textbooks on linear regression with least squares
I like "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Andrew Gelman and Jennifer Hill. "Extending the Linear Model with R" by Julian Faraway has a great introductory chapter which goes into the general linear model (regression). I've never used "Practical Regression and Anova using R", however a...
Textbooks on linear regression with least squares
I like "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Andrew Gelman and Jennifer Hill. "Extending the Linear Model with R" by Julian Faraway has a great introductory chapter wh
Textbooks on linear regression with least squares I like "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Andrew Gelman and Jennifer Hill. "Extending the Linear Model with R" by Julian Faraway has a great introductory chapter which goes into the general linear model (regression). I've never used "...
Textbooks on linear regression with least squares I like "Data Analysis Using Regression and Multilevel/Hierarchical Models" by Andrew Gelman and Jennifer Hill. "Extending the Linear Model with R" by Julian Faraway has a great introductory chapter wh
38,759
Textbooks on linear regression with least squares
I have two recommendations. Since you say you have no background in Statistics I think a good beginning would be: "OpenIntro Statistics" by Diez, Barr, and Çetinkaya-Rundel. It goes from the basic concepts and has an introduction to regression. You can download it here. There is a Data Analysis and Statistical Inferenc...
Textbooks on linear regression with least squares
I have two recommendations. Since you say you have no background in Statistics I think a good beginning would be: "OpenIntro Statistics" by Diez, Barr, and Çetinkaya-Rundel. It goes from the basic con
Textbooks on linear regression with least squares I have two recommendations. Since you say you have no background in Statistics I think a good beginning would be: "OpenIntro Statistics" by Diez, Barr, and Çetinkaya-Rundel. It goes from the basic concepts and has an introduction to regression. You can download it here....
Textbooks on linear regression with least squares I have two recommendations. Since you say you have no background in Statistics I think a good beginning would be: "OpenIntro Statistics" by Diez, Barr, and Çetinkaya-Rundel. It goes from the basic con
38,760
Textbooks on linear regression with least squares
I would like to add a book which I randomly found in my university library. It's called Correlation and Regression by Philip Bobko. It is very easy to read and draws bridges between different concepts very elegantly, like f.e. the regression slope and the correlation coefficient.
Textbooks on linear regression with least squares
I would like to add a book which I randomly found in my university library. It's called Correlation and Regression by Philip Bobko. It is very easy to read and draws bridges between different concepts
Textbooks on linear regression with least squares I would like to add a book which I randomly found in my university library. It's called Correlation and Regression by Philip Bobko. It is very easy to read and draws bridges between different concepts very elegantly, like f.e. the regression slope and the correlation co...
Textbooks on linear regression with least squares I would like to add a book which I randomly found in my university library. It's called Correlation and Regression by Philip Bobko. It is very easy to read and draws bridges between different concepts
38,761
Asymptotic distribution of the max (min) of IID binomial variables
The limit with $k/n\rightarrow\lambda$ isn't very interesting. But if you let the sample size increase exponentially with $n$ then you get a limiting distribution, which is a "discrete Gumbel" (pace the comments above). For example, for simplicity, let $p=0.5$, so $X_i$ are IID $B(n,0.5)$, where $n$ is large, and the...
Asymptotic distribution of the max (min) of IID binomial variables
The limit with $k/n\rightarrow\lambda$ isn't very interesting. But if you let the sample size increase exponentially with $n$ then you get a limiting distribution, which is a "discrete Gumbel" (pace
Asymptotic distribution of the max (min) of IID binomial variables The limit with $k/n\rightarrow\lambda$ isn't very interesting. But if you let the sample size increase exponentially with $n$ then you get a limiting distribution, which is a "discrete Gumbel" (pace the comments above). For example, for simplicity, le...
Asymptotic distribution of the max (min) of IID binomial variables The limit with $k/n\rightarrow\lambda$ isn't very interesting. But if you let the sample size increase exponentially with $n$ then you get a limiting distribution, which is a "discrete Gumbel" (pace
38,762
Asymptotic distribution of the max (min) of IID binomial variables
Since the answer of @Boddle does not give the detail for the case $p \neq 1/2$, I will provide it here. First off, the geometric approximation still holds for $n \gg d \gg 1$. For $j \geq 0$ we obtain $$ \mathbb{P}(X_i = d-j) \approx \left(\frac{1-p}{p}\frac{d}{n-d}\right)^j \mathbb{P}(X_i = d).$$ Next, we need to comp...
Asymptotic distribution of the max (min) of IID binomial variables
Since the answer of @Boddle does not give the detail for the case $p \neq 1/2$, I will provide it here. First off, the geometric approximation still holds for $n \gg d \gg 1$. For $j \geq 0$ we obtain
Asymptotic distribution of the max (min) of IID binomial variables Since the answer of @Boddle does not give the detail for the case $p \neq 1/2$, I will provide it here. First off, the geometric approximation still holds for $n \gg d \gg 1$. For $j \geq 0$ we obtain $$ \mathbb{P}(X_i = d-j) \approx \left(\frac{1-p}{p}...
Asymptotic distribution of the max (min) of IID binomial variables Since the answer of @Boddle does not give the detail for the case $p \neq 1/2$, I will provide it here. First off, the geometric approximation still holds for $n \gg d \gg 1$. For $j \geq 0$ we obtain
38,763
R t.test ..... NOT significant anymore
The standard deviation that comes into the denominator also affected by the outlying observation. (It also affects the degrees of freedom because we are actually doing a Welch test here.) We can examine the influence of changes in that additional observation on the t-statistic: tinfl <- function(x) t.test(1:10, y = c(...
R t.test ..... NOT significant anymore
The standard deviation that comes into the denominator also affected by the outlying observation. (It also affects the degrees of freedom because we are actually doing a Welch test here.) We can exam
R t.test ..... NOT significant anymore The standard deviation that comes into the denominator also affected by the outlying observation. (It also affects the degrees of freedom because we are actually doing a Welch test here.) We can examine the influence of changes in that additional observation on the t-statistic: t...
R t.test ..... NOT significant anymore The standard deviation that comes into the denominator also affected by the outlying observation. (It also affects the degrees of freedom because we are actually doing a Welch test here.) We can exam
38,764
R t.test ..... NOT significant anymore
The two-group t-test balances (by computing their ratios) two aspects of the distributions of the values, one: the difference in the means, which your "disturbance" did increase somewhat, and two: the variance which your disturbance increases much more. The variance varies with the square of the differences of the poin...
R t.test ..... NOT significant anymore
The two-group t-test balances (by computing their ratios) two aspects of the distributions of the values, one: the difference in the means, which your "disturbance" did increase somewhat, and two: the
R t.test ..... NOT significant anymore The two-group t-test balances (by computing their ratios) two aspects of the distributions of the values, one: the difference in the means, which your "disturbance" did increase somewhat, and two: the variance which your disturbance increases much more. The variance varies with th...
R t.test ..... NOT significant anymore The two-group t-test balances (by computing their ratios) two aspects of the distributions of the values, one: the difference in the means, which your "disturbance" did increase somewhat, and two: the
38,765
Linear Regression makes impossible predictions
It's not the predictors (IVs) that are the problem, but the analysis. Indeed, the mere existence of an impossible part of the range of the response (you can't have negative prices) would be a hint to consider something other than multiple regression (at least on the untransformed variable) - since it clearly can have n...
Linear Regression makes impossible predictions
It's not the predictors (IVs) that are the problem, but the analysis. Indeed, the mere existence of an impossible part of the range of the response (you can't have negative prices) would be a hint to
Linear Regression makes impossible predictions It's not the predictors (IVs) that are the problem, but the analysis. Indeed, the mere existence of an impossible part of the range of the response (you can't have negative prices) would be a hint to consider something other than multiple regression (at least on the untran...
Linear Regression makes impossible predictions It's not the predictors (IVs) that are the problem, but the analysis. Indeed, the mere existence of an impossible part of the range of the response (you can't have negative prices) would be a hint to
38,766
Linear Regression makes impossible predictions
One option would be to fit a generalized linear model with a different reference distribution that is bounded at zero (and probably more appropriate than the normal distribution, depending on what kind of prices you're modeling). For example, the negative binomial distribution suits discrete distributions of counts; th...
Linear Regression makes impossible predictions
One option would be to fit a generalized linear model with a different reference distribution that is bounded at zero (and probably more appropriate than the normal distribution, depending on what kin
Linear Regression makes impossible predictions One option would be to fit a generalized linear model with a different reference distribution that is bounded at zero (and probably more appropriate than the normal distribution, depending on what kind of prices you're modeling). For example, the negative binomial distribu...
Linear Regression makes impossible predictions One option would be to fit a generalized linear model with a different reference distribution that is bounded at zero (and probably more appropriate than the normal distribution, depending on what kin
38,767
What could be a statistical test for comparing funnel data before and after important changes?
Caveats Most importantly, a lot of things could have changed since you made the upgrade. For instance, if a major competitor went out of business and Christmas rolled around in time for the change, your test will be conflating the positive effect of those factors with the site improvements. They could even mask that th...
What could be a statistical test for comparing funnel data before and after important changes?
Caveats Most importantly, a lot of things could have changed since you made the upgrade. For instance, if a major competitor went out of business and Christmas rolled around in time for the change, yo
What could be a statistical test for comparing funnel data before and after important changes? Caveats Most importantly, a lot of things could have changed since you made the upgrade. For instance, if a major competitor went out of business and Christmas rolled around in time for the change, your test will be conflatin...
What could be a statistical test for comparing funnel data before and after important changes? Caveats Most importantly, a lot of things could have changed since you made the upgrade. For instance, if a major competitor went out of business and Christmas rolled around in time for the change, yo
38,768
What could be a statistical test for comparing funnel data before and after important changes?
Considering you have only one realization I would assume the variables to follow a poisson law H0 the values before changes and I would check the after values against the theoretical quantiles under H0
What could be a statistical test for comparing funnel data before and after important changes?
Considering you have only one realization I would assume the variables to follow a poisson law H0 the values before changes and I would check the after values against the theoretical quantiles under
What could be a statistical test for comparing funnel data before and after important changes? Considering you have only one realization I would assume the variables to follow a poisson law H0 the values before changes and I would check the after values against the theoretical quantiles under H0
What could be a statistical test for comparing funnel data before and after important changes? Considering you have only one realization I would assume the variables to follow a poisson law H0 the values before changes and I would check the after values against the theoretical quantiles under
38,769
Forecasting time series regression in R using lm and lag
Estimating with lags and using model for predicting is a sore point in base R. Here is the example: set.seed(1) y<-ts(rnorm(10)) x<-ts(rnorm(10)) lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Intercept) x 0.2006 -0.2749 > lm(y~lag(x)) Call: lm(formula = y ~ lag(x)) Coefficients: (Int...
Forecasting time series regression in R using lm and lag
Estimating with lags and using model for predicting is a sore point in base R. Here is the example: set.seed(1) y<-ts(rnorm(10)) x<-ts(rnorm(10)) lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Int
Forecasting time series regression in R using lm and lag Estimating with lags and using model for predicting is a sore point in base R. Here is the example: set.seed(1) y<-ts(rnorm(10)) x<-ts(rnorm(10)) lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Intercept) x 0.2006 -0.2749 > lm(y~la...
Forecasting time series regression in R using lm and lag Estimating with lags and using model for predicting is a sore point in base R. Here is the example: set.seed(1) y<-ts(rnorm(10)) x<-ts(rnorm(10)) lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Int
38,770
How to calculate the probability of matching sock from a drawer? [closed]
Here are all the different ways of pairing one sock with another different one, arranged systematically: "Random" in this context means that each pairing is equally likely. Therefore, to find the probability of a color match, count the color-matched pairs and divide by the total. Counting is made easier by noting tha...
How to calculate the probability of matching sock from a drawer? [closed]
Here are all the different ways of pairing one sock with another different one, arranged systematically: "Random" in this context means that each pairing is equally likely. Therefore, to find the pr
How to calculate the probability of matching sock from a drawer? [closed] Here are all the different ways of pairing one sock with another different one, arranged systematically: "Random" in this context means that each pairing is equally likely. Therefore, to find the probability of a color match, count the color-ma...
How to calculate the probability of matching sock from a drawer? [closed] Here are all the different ways of pairing one sock with another different one, arranged systematically: "Random" in this context means that each pairing is equally likely. Therefore, to find the pr
38,771
How to calculate the probability of matching sock from a drawer? [closed]
Try starting here: What is the probability of drawing two red socks? Well, there are 6 red socks, and you need to choose two of them, meaning there are 6C2 (read "6 choose 2") ways to succeed, or 15 ways to draw two red socks. There are 12 total socks, and you choose 2, so there are 12C2 total combinations of 2 socks, ...
How to calculate the probability of matching sock from a drawer? [closed]
Try starting here: What is the probability of drawing two red socks? Well, there are 6 red socks, and you need to choose two of them, meaning there are 6C2 (read "6 choose 2") ways to succeed, or 15 w
How to calculate the probability of matching sock from a drawer? [closed] Try starting here: What is the probability of drawing two red socks? Well, there are 6 red socks, and you need to choose two of them, meaning there are 6C2 (read "6 choose 2") ways to succeed, or 15 ways to draw two red socks. There are 12 total ...
How to calculate the probability of matching sock from a drawer? [closed] Try starting here: What is the probability of drawing two red socks? Well, there are 6 red socks, and you need to choose two of them, meaning there are 6C2 (read "6 choose 2") ways to succeed, or 15 w
38,772
How to calculate the probability of matching sock from a drawer? [closed]
Here's what I got, P2red, 30/132 P2green, 12/132, P2black, 2/132, sum of 3 probabilities = 44/132 = 1/3, so 33.33% chance of matching, 66.66% chance of looking like a scrub
How to calculate the probability of matching sock from a drawer? [closed]
Here's what I got, P2red, 30/132 P2green, 12/132, P2black, 2/132, sum of 3 probabilities = 44/132 = 1/3, so 33.33% chance of matching, 66.66% chance of looking like a scrub
How to calculate the probability of matching sock from a drawer? [closed] Here's what I got, P2red, 30/132 P2green, 12/132, P2black, 2/132, sum of 3 probabilities = 44/132 = 1/3, so 33.33% chance of matching, 66.66% chance of looking like a scrub
How to calculate the probability of matching sock from a drawer? [closed] Here's what I got, P2red, 30/132 P2green, 12/132, P2black, 2/132, sum of 3 probabilities = 44/132 = 1/3, so 33.33% chance of matching, 66.66% chance of looking like a scrub
38,773
Joint entropy of two random variables
Entropy (joint entropy included), is a property of the distribution that a random variable follows. The available sample (and hence the timing of observation) plays no role in it. Copying for Cover & Thomas, the joint entropy $H(X,Y)$ of two discrete random variables $X, Y,$ with joint distribution $p(x,y)$, is defin...
Joint entropy of two random variables
Entropy (joint entropy included), is a property of the distribution that a random variable follows. The available sample (and hence the timing of observation) plays no role in it. Copying for Cover
Joint entropy of two random variables Entropy (joint entropy included), is a property of the distribution that a random variable follows. The available sample (and hence the timing of observation) plays no role in it. Copying for Cover & Thomas, the joint entropy $H(X,Y)$ of two discrete random variables $X, Y,$ with...
Joint entropy of two random variables Entropy (joint entropy included), is a property of the distribution that a random variable follows. The available sample (and hence the timing of observation) plays no role in it. Copying for Cover
38,774
Correct estimation of arguments for glmmLasso function
the glmmLasso package contains a demo file, where several strategies are shown, how the optimal tuning parameter lambda. I suggest to start with a high values for lambda, such that all covariates are set to zero and then reduce it step by step. It increase speed, if the final coefficient estimates corresponding to a la...
Correct estimation of arguments for glmmLasso function
the glmmLasso package contains a demo file, where several strategies are shown, how the optimal tuning parameter lambda. I suggest to start with a high values for lambda, such that all covariates are
Correct estimation of arguments for glmmLasso function the glmmLasso package contains a demo file, where several strategies are shown, how the optimal tuning parameter lambda. I suggest to start with a high values for lambda, such that all covariates are set to zero and then reduce it step by step. It increase speed, i...
Correct estimation of arguments for glmmLasso function the glmmLasso package contains a demo file, where several strategies are shown, how the optimal tuning parameter lambda. I suggest to start with a high values for lambda, such that all covariates are
38,775
How is the Weighted Gini Criterion defined?
The implementation available at Breiman's website uses the weighted random forest method described in the paper. It's in Fortran 77 though, which may be off-putting to you. I also found the method that they use to calculate the impurity to be more unclear and complicated than needs be, but that's just my opinion (and ...
How is the Weighted Gini Criterion defined?
The implementation available at Breiman's website uses the weighted random forest method described in the paper. It's in Fortran 77 though, which may be off-putting to you. I also found the method th
How is the Weighted Gini Criterion defined? The implementation available at Breiman's website uses the weighted random forest method described in the paper. It's in Fortran 77 though, which may be off-putting to you. I also found the method that they use to calculate the impurity to be more unclear and complicated tha...
How is the Weighted Gini Criterion defined? The implementation available at Breiman's website uses the weighted random forest method described in the paper. It's in Fortran 77 though, which may be off-putting to you. I also found the method th
38,776
How is the Weighted Gini Criterion defined?
Just a follow-up on Simon's answer. The Gini index (impurity index) for a node $c$ can be defined as: $$ i_c = \sum_i f_i \cdot ( 1- f_i) = 1 - \sum_i f_i^2$$ where $f_i$ is the fraction of records which belong to class $i$. If we have a two class problem we can plot the Gini index varying the relative number of reco...
How is the Weighted Gini Criterion defined?
Just a follow-up on Simon's answer. The Gini index (impurity index) for a node $c$ can be defined as: $$ i_c = \sum_i f_i \cdot ( 1- f_i) = 1 - \sum_i f_i^2$$ where $f_i$ is the fraction of records w
How is the Weighted Gini Criterion defined? Just a follow-up on Simon's answer. The Gini index (impurity index) for a node $c$ can be defined as: $$ i_c = \sum_i f_i \cdot ( 1- f_i) = 1 - \sum_i f_i^2$$ where $f_i$ is the fraction of records which belong to class $i$. If we have a two class problem we can plot the Gi...
How is the Weighted Gini Criterion defined? Just a follow-up on Simon's answer. The Gini index (impurity index) for a node $c$ can be defined as: $$ i_c = \sum_i f_i \cdot ( 1- f_i) = 1 - \sum_i f_i^2$$ where $f_i$ is the fraction of records w
38,777
Dummy variables in multiple regression, why use an intercept?
Things like the predictions, residuals, full-reduced model tests, etc. will not be affected by the change that you propose, but what does change is the interpretation and tests on the individual terms. Most regression routines will provide an automatic test of whether a term is 0 or not. This is meaningful when a term...
Dummy variables in multiple regression, why use an intercept?
Things like the predictions, residuals, full-reduced model tests, etc. will not be affected by the change that you propose, but what does change is the interpretation and tests on the individual terms
Dummy variables in multiple regression, why use an intercept? Things like the predictions, residuals, full-reduced model tests, etc. will not be affected by the change that you propose, but what does change is the interpretation and tests on the individual terms. Most regression routines will provide an automatic test ...
Dummy variables in multiple regression, why use an intercept? Things like the predictions, residuals, full-reduced model tests, etc. will not be affected by the change that you propose, but what does change is the interpretation and tests on the individual terms
38,778
Dummy variables in multiple regression, why use an intercept?
@GregSnow is right that this change doesn't really matter. Let me add a few details to extend that. What you are talking about is sometimes called level means coding, whereas the default coding scheme is called reference level coding. Note that there are many possible valid coding schemes. If you have a categorical...
Dummy variables in multiple regression, why use an intercept?
@GregSnow is right that this change doesn't really matter. Let me add a few details to extend that. What you are talking about is sometimes called level means coding, whereas the default coding sche
Dummy variables in multiple regression, why use an intercept? @GregSnow is right that this change doesn't really matter. Let me add a few details to extend that. What you are talking about is sometimes called level means coding, whereas the default coding scheme is called reference level coding. Note that there are ...
Dummy variables in multiple regression, why use an intercept? @GregSnow is right that this change doesn't really matter. Let me add a few details to extend that. What you are talking about is sometimes called level means coding, whereas the default coding sche
38,779
Why is the Likelihood function NOT a case of the inverse fallacy?
From your link: Confusion of the inverse, also called the conditional probability fallacy or the inverse fallacy, is a logical fallacy whereupon a conditional probability is equivocated with its inverse i.e. this is talking about making the mistake of thinking P(A|B) is the same as P(B|A). The likelihood is, however,...
Why is the Likelihood function NOT a case of the inverse fallacy?
From your link: Confusion of the inverse, also called the conditional probability fallacy or the inverse fallacy, is a logical fallacy whereupon a conditional probability is equivocated with its inve
Why is the Likelihood function NOT a case of the inverse fallacy? From your link: Confusion of the inverse, also called the conditional probability fallacy or the inverse fallacy, is a logical fallacy whereupon a conditional probability is equivocated with its inverse i.e. this is talking about making the mistake of ...
Why is the Likelihood function NOT a case of the inverse fallacy? From your link: Confusion of the inverse, also called the conditional probability fallacy or the inverse fallacy, is a logical fallacy whereupon a conditional probability is equivocated with its inve
38,780
Why is the Likelihood function NOT a case of the inverse fallacy?
It's not saying $P(\theta|\text{data})$ = $P (\text{data}|\theta)$. It's defining the likelihood function.
Why is the Likelihood function NOT a case of the inverse fallacy?
It's not saying $P(\theta|\text{data})$ = $P (\text{data}|\theta)$. It's defining the likelihood function.
Why is the Likelihood function NOT a case of the inverse fallacy? It's not saying $P(\theta|\text{data})$ = $P (\text{data}|\theta)$. It's defining the likelihood function.
Why is the Likelihood function NOT a case of the inverse fallacy? It's not saying $P(\theta|\text{data})$ = $P (\text{data}|\theta)$. It's defining the likelihood function.
38,781
How to define initial probabilities for HMM?
1. How to decide number of Hidden States (although HMM says we don't need to know, we just have to make a guess, even for making guess what should be the best criteria) The number of hidden states is problem dependent. For example in speech recognition and synthesis, 3 and 5 states are commonly used. The reason for usi...
How to define initial probabilities for HMM?
1. How to decide number of Hidden States (although HMM says we don't need to know, we just have to make a guess, even for making guess what should be the best criteria) The number of hidden states is
How to define initial probabilities for HMM? 1. How to decide number of Hidden States (although HMM says we don't need to know, we just have to make a guess, even for making guess what should be the best criteria) The number of hidden states is problem dependent. For example in speech recognition and synthesis, 3 and 5...
How to define initial probabilities for HMM? 1. How to decide number of Hidden States (although HMM says we don't need to know, we just have to make a guess, even for making guess what should be the best criteria) The number of hidden states is
38,782
How to define initial probabilities for HMM?
The usual, uninspiring and uninformative answer to this question is that 'the dynamics of your system / the nature of the physical problem will indicate how many hidden states there are', which translates into: "Take a pick and get over it". However, I do not buy into this. I think most problems are more complex than ...
How to define initial probabilities for HMM?
The usual, uninspiring and uninformative answer to this question is that 'the dynamics of your system / the nature of the physical problem will indicate how many hidden states there are', which trans
How to define initial probabilities for HMM? The usual, uninspiring and uninformative answer to this question is that 'the dynamics of your system / the nature of the physical problem will indicate how many hidden states there are', which translates into: "Take a pick and get over it". However, I do not buy into this....
How to define initial probabilities for HMM? The usual, uninspiring and uninformative answer to this question is that 'the dynamics of your system / the nature of the physical problem will indicate how many hidden states there are', which trans
38,783
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire population?
I think you have two different viewpoints and no correct or incorrect answer. But I would be more inclined to go with 2. Although in 1 you said you have included every seminar held to date it seems that your universe includes future seminars as well. But accepting 2 does not settle the issue between R square and adju...
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire
I think you have two different viewpoints and no correct or incorrect answer. But I would be more inclined to go with 2. Although in 1 you said you have included every seminar held to date it seems
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire population? I think you have two different viewpoints and no correct or incorrect answer. But I would be more inclined to go with 2. Although in 1 you said you have included every seminar held to date it seems that you...
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire I think you have two different viewpoints and no correct or incorrect answer. But I would be more inclined to go with 2. Although in 1 you said you have included every seminar held to date it seems
38,784
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire population?
It is not the case that one uses R-squared for entire populations and adjusted R-squared for samples. They each give different information. R-squared is the proportion of variability in the data accounted for by your model. Adjusted R-squared takes into account (i.e., adjusts for) the number of explanatory terms in you...
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire
It is not the case that one uses R-squared for entire populations and adjusted R-squared for samples. They each give different information. R-squared is the proportion of variability in the data accou
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire population? It is not the case that one uses R-squared for entire populations and adjusted R-squared for samples. They each give different information. R-squared is the proportion of variability in the data accounted for...
Whether to use r-square or adjusted r-square with a small sample size that may represent the entire It is not the case that one uses R-squared for entire populations and adjusted R-squared for samples. They each give different information. R-squared is the proportion of variability in the data accou
38,785
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The boxplot and histogram tell you all by themselves that your data are skewed, especially in group A. The Shapiro-Wilk test is kind of pointless. With data thusly skewed the ANOVA isn't really appropriate. The Kruskal-Wallis rank sum test is based on the ranks, not the absolute values and doesn't require normality,...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The boxplot and histogram tell you all by themselves that your data are skewed, especially in group A. The Shapiro-Wilk test is kind of pointless. With data thusly skewed the ANOVA isn't really appr
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The boxplot and histogram tell you all by themselves that your data are skewed, especially in group A. The Shapiro-Wilk test is kind of pointless. With data thusly skewed the ANOVA isn't really appropriate. The Kruskal-Wallis rank sum ...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The boxplot and histogram tell you all by themselves that your data are skewed, especially in group A. The Shapiro-Wilk test is kind of pointless. With data thusly skewed the ANOVA isn't really appr
38,786
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The Kruskal-Wallis test and the Anova test are testing different hypotheses, both could be correct, the answers differ because they are answering different questions.
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The Kruskal-Wallis test and the Anova test are testing different hypotheses, both could be correct, the answers differ because they are answering different questions.
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The Kruskal-Wallis test and the Anova test are testing different hypotheses, both could be correct, the answers differ because they are answering different questions.
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The Kruskal-Wallis test and the Anova test are testing different hypotheses, both could be correct, the answers differ because they are answering different questions.
38,787
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
Two things to keep in mind: first, ANOVA is robust in the face of non-normality if sample sizes are equal - the larger the difference in sample sizes, the less reliable it is; second, the K-W test is not a test of means or medians - it is really a test of similarity of distributions and, if the distributions are simila...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
Two things to keep in mind: first, ANOVA is robust in the face of non-normality if sample sizes are equal - the larger the difference in sample sizes, the less reliable it is; second, the K-W test is
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? Two things to keep in mind: first, ANOVA is robust in the face of non-normality if sample sizes are equal - the larger the difference in sample sizes, the less reliable it is; second, the K-W test is not a test of means or medians - it is...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? Two things to keep in mind: first, ANOVA is robust in the face of non-normality if sample sizes are equal - the larger the difference in sample sizes, the less reliable it is; second, the K-W test is
38,788
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The distributions all overlap very much. The Kruskal Wallis test seems to be indicating that the centers of the distributions are nearly the same. The distribution for group is highly skewed due to several very extremely high values. That is what causes the distribution to fail the Shapiro-Wilk test. The anova F te...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right?
The distributions all overlap very much. The Kruskal Wallis test seems to be indicating that the centers of the distributions are nearly the same. The distribution for group is highly skewed due to
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The distributions all overlap very much. The Kruskal Wallis test seems to be indicating that the centers of the distributions are nearly the same. The distribution for group is highly skewed due to several very extremely high values. T...
Contradicting p-values for Anova and Kruskal-Wallis on same data: Which is right? The distributions all overlap very much. The Kruskal Wallis test seems to be indicating that the centers of the distributions are nearly the same. The distribution for group is highly skewed due to
38,789
Why do AIC and BIC show inversed outputs?
AIC and BIC both penalize models for complexity, but they impose different penalties. AIC = $2k - 2 \log(L)$ where $k$ is number of parameters and $L$ is likelihood. BIC = $k*\log(n) - 2\log(L)$ where $n$ is number of subjects. So, if $\log(n) > 2$, BIC penalizes more severely; this is pretty much always the case, s...
Why do AIC and BIC show inversed outputs?
AIC and BIC both penalize models for complexity, but they impose different penalties. AIC = $2k - 2 \log(L)$ where $k$ is number of parameters and $L$ is likelihood. BIC = $k*\log(n) - 2\log(L)$ whe
Why do AIC and BIC show inversed outputs? AIC and BIC both penalize models for complexity, but they impose different penalties. AIC = $2k - 2 \log(L)$ where $k$ is number of parameters and $L$ is likelihood. BIC = $k*\log(n) - 2\log(L)$ where $n$ is number of subjects. So, if $\log(n) > 2$, BIC penalizes more severe...
Why do AIC and BIC show inversed outputs? AIC and BIC both penalize models for complexity, but they impose different penalties. AIC = $2k - 2 \log(L)$ where $k$ is number of parameters and $L$ is likelihood. BIC = $k*\log(n) - 2\log(L)$ whe
38,790
Why do AIC and BIC show inversed outputs?
My two cents on this topic: if you are really testing hypotheses then I would not use information theoretic approaches, but rather classical hypothesis testing approaches (i.e., I would use drop1 on res1 to do likelihood ratio tests). I personally prefer AIC to BIC in ecology because I think its logic more closely mat...
Why do AIC and BIC show inversed outputs?
My two cents on this topic: if you are really testing hypotheses then I would not use information theoretic approaches, but rather classical hypothesis testing approaches (i.e., I would use drop1 on r
Why do AIC and BIC show inversed outputs? My two cents on this topic: if you are really testing hypotheses then I would not use information theoretic approaches, but rather classical hypothesis testing approaches (i.e., I would use drop1 on res1 to do likelihood ratio tests). I personally prefer AIC to BIC in ecology ...
Why do AIC and BIC show inversed outputs? My two cents on this topic: if you are really testing hypotheses then I would not use information theoretic approaches, but rather classical hypothesis testing approaches (i.e., I would use drop1 on r
38,791
When to transform predictors in regression when response may be quadratic?
When you don't know the functional form ahead of time (which is a common setting) and you have no reason to assume it's linear, it's best to be flexible. If there were more levels of treatment you could fit a quadratic or restricted cubic spline shape, for example. For only 4 levels it may be best to assign 3 degrees...
When to transform predictors in regression when response may be quadratic?
When you don't know the functional form ahead of time (which is a common setting) and you have no reason to assume it's linear, it's best to be flexible. If there were more levels of treatment you co
When to transform predictors in regression when response may be quadratic? When you don't know the functional form ahead of time (which is a common setting) and you have no reason to assume it's linear, it's best to be flexible. If there were more levels of treatment you could fit a quadratic or restricted cubic splin...
When to transform predictors in regression when response may be quadratic? When you don't know the functional form ahead of time (which is a common setting) and you have no reason to assume it's linear, it's best to be flexible. If there were more levels of treatment you co
38,792
When to transform predictors in regression when response may be quadratic?
Why not look at a bivariate X-Y scatterplot in advance of running a regression. That'll show you the shape of the line or curve, especially if you have software that can give a lowess/loess fit (locally weighted smoothed fit). As to interpretation, it'll no doubt be easier for you than for your audience, but if you do...
When to transform predictors in regression when response may be quadratic?
Why not look at a bivariate X-Y scatterplot in advance of running a regression. That'll show you the shape of the line or curve, especially if you have software that can give a lowess/loess fit (loca
When to transform predictors in regression when response may be quadratic? Why not look at a bivariate X-Y scatterplot in advance of running a regression. That'll show you the shape of the line or curve, especially if you have software that can give a lowess/loess fit (locally weighted smoothed fit). As to interpretat...
When to transform predictors in regression when response may be quadratic? Why not look at a bivariate X-Y scatterplot in advance of running a regression. That'll show you the shape of the line or curve, especially if you have software that can give a lowess/loess fit (loca
38,793
Computing $(X^TX)^{-1}X^Ty$ in OLS
Regarding your second question, here is a way to do this for $n=i$, for simplicity of notation. Let $\alpha = A_{nn}, \, a = (A_{1n},\dots, A_{n-1,n})^T$ and therefore $$ A = \begin{pmatrix} \tilde A & a \\ a^T & \alpha \end{pmatrix} $$ Also let $A^{-1}$ be partitioned in the same way, $$ A^{-1} = \begin{pmatrix} \til...
Computing $(X^TX)^{-1}X^Ty$ in OLS
Regarding your second question, here is a way to do this for $n=i$, for simplicity of notation. Let $\alpha = A_{nn}, \, a = (A_{1n},\dots, A_{n-1,n})^T$ and therefore $$ A = \begin{pmatrix} \tilde A
Computing $(X^TX)^{-1}X^Ty$ in OLS Regarding your second question, here is a way to do this for $n=i$, for simplicity of notation. Let $\alpha = A_{nn}, \, a = (A_{1n},\dots, A_{n-1,n})^T$ and therefore $$ A = \begin{pmatrix} \tilde A & a \\ a^T & \alpha \end{pmatrix} $$ Also let $A^{-1}$ be partitioned in the same wa...
Computing $(X^TX)^{-1}X^Ty$ in OLS Regarding your second question, here is a way to do this for $n=i$, for simplicity of notation. Let $\alpha = A_{nn}, \, a = (A_{1n},\dots, A_{n-1,n})^T$ and therefore $$ A = \begin{pmatrix} \tilde A
38,794
Computing $(X^TX)^{-1}X^Ty$ in OLS
To add to @onestop's answer, another efficient way is to use QR decomposition. The added benefit is that QR decomposition can be applied directly to $X$, and not to $X^TX$. I think the QR decomposition can be made to work for your second question, it is definitely straightforward for column removal. However the questi...
Computing $(X^TX)^{-1}X^Ty$ in OLS
To add to @onestop's answer, another efficient way is to use QR decomposition. The added benefit is that QR decomposition can be applied directly to $X$, and not to $X^TX$. I think the QR decompositi
Computing $(X^TX)^{-1}X^Ty$ in OLS To add to @onestop's answer, another efficient way is to use QR decomposition. The added benefit is that QR decomposition can be applied directly to $X$, and not to $X^TX$. I think the QR decomposition can be made to work for your second question, it is definitely straightforward for...
Computing $(X^TX)^{-1}X^Ty$ in OLS To add to @onestop's answer, another efficient way is to use QR decomposition. The added benefit is that QR decomposition can be applied directly to $X$, and not to $X^TX$. I think the QR decompositi
38,795
Computing $(X^TX)^{-1}X^Ty$ in OLS
The standard answer to your first question is Cholesky decomposition. To quote the Wikipedia article: If $A$ is symmetric and positive definite, then we can solve $Ax = b$ [for $x$] by first computing the Cholesky decomposition $A = LL^\mathrm{T}$, then solving $Ly = b$ for $y$, and finally solving $L^\mathrm{T} x = ...
Computing $(X^TX)^{-1}X^Ty$ in OLS
The standard answer to your first question is Cholesky decomposition. To quote the Wikipedia article: If $A$ is symmetric and positive definite, then we can solve $Ax = b$ [for $x$] by first computin
Computing $(X^TX)^{-1}X^Ty$ in OLS The standard answer to your first question is Cholesky decomposition. To quote the Wikipedia article: If $A$ is symmetric and positive definite, then we can solve $Ax = b$ [for $x$] by first computing the Cholesky decomposition $A = LL^\mathrm{T}$, then solving $Ly = b$ for $y$, and ...
Computing $(X^TX)^{-1}X^Ty$ in OLS The standard answer to your first question is Cholesky decomposition. To quote the Wikipedia article: If $A$ is symmetric and positive definite, then we can solve $Ax = b$ [for $x$] by first computin
38,796
How to create one score from a mixed set of positive and negative variables?
You might consider u-scores as defined in [1] Wittkowski, K. M., Lee, E., Nussbaum, R., Chamian, F. N. and Krueger, J. G. (2004), Combining several ordinal measures in clinical studies. Statistics in Medicine, 23: 1579–1592. (PDF) The basic idea is that for each observation you count how many observations there are com...
How to create one score from a mixed set of positive and negative variables?
You might consider u-scores as defined in [1] Wittkowski, K. M., Lee, E., Nussbaum, R., Chamian, F. N. and Krueger, J. G. (2004), Combining several ordinal measures in clinical studies. Statistics in
How to create one score from a mixed set of positive and negative variables? You might consider u-scores as defined in [1] Wittkowski, K. M., Lee, E., Nussbaum, R., Chamian, F. N. and Krueger, J. G. (2004), Combining several ordinal measures in clinical studies. Statistics in Medicine, 23: 1579–1592. (PDF) The basic id...
How to create one score from a mixed set of positive and negative variables? You might consider u-scores as defined in [1] Wittkowski, K. M., Lee, E., Nussbaum, R., Chamian, F. N. and Krueger, J. G. (2004), Combining several ordinal measures in clinical studies. Statistics in
38,797
How to create one score from a mixed set of positive and negative variables?
Data or Theory Driven? The first issue is whether you want the composite to be data driven or theory driven? If you are wishing to form a composite variable, it is likely that you think that each component variable is important in measuring some overall domain. In this case, you are likely going to prefer a theoretica...
How to create one score from a mixed set of positive and negative variables?
Data or Theory Driven? The first issue is whether you want the composite to be data driven or theory driven? If you are wishing to form a composite variable, it is likely that you think that each comp
How to create one score from a mixed set of positive and negative variables? Data or Theory Driven? The first issue is whether you want the composite to be data driven or theory driven? If you are wishing to form a composite variable, it is likely that you think that each component variable is important in measuring so...
How to create one score from a mixed set of positive and negative variables? Data or Theory Driven? The first issue is whether you want the composite to be data driven or theory driven? If you are wishing to form a composite variable, it is likely that you think that each comp
38,798
How to create one score from a mixed set of positive and negative variables?
For a non-ordinal measure, you could try MDS (multi-dimensional scaling). This can be done easily in R. This will try to arrange the points on a line (1d in your case) in such a way that distances between points will be preserved. Some general comments: as you probably realize, the question is pretty vague, and not muc...
How to create one score from a mixed set of positive and negative variables?
For a non-ordinal measure, you could try MDS (multi-dimensional scaling). This can be done easily in R. This will try to arrange the points on a line (1d in your case) in such a way that distances bet
How to create one score from a mixed set of positive and negative variables? For a non-ordinal measure, you could try MDS (multi-dimensional scaling). This can be done easily in R. This will try to arrange the points on a line (1d in your case) in such a way that distances between points will be preserved. Some general...
How to create one score from a mixed set of positive and negative variables? For a non-ordinal measure, you could try MDS (multi-dimensional scaling). This can be done easily in R. This will try to arrange the points on a line (1d in your case) in such a way that distances bet
38,799
How to create one score from a mixed set of positive and negative variables?
I am sorry, as it may not be straight answer to your question, by if you are using this "total score" as a predictor of something why dont you try regression and evaluate the results with the AUC of ROC ? or the other way, maybe user Neural networks / Random Forest / Support Vector machines on them to predict given out...
How to create one score from a mixed set of positive and negative variables?
I am sorry, as it may not be straight answer to your question, by if you are using this "total score" as a predictor of something why dont you try regression and evaluate the results with the AUC of R
How to create one score from a mixed set of positive and negative variables? I am sorry, as it may not be straight answer to your question, by if you are using this "total score" as a predictor of something why dont you try regression and evaluate the results with the AUC of ROC ? or the other way, maybe user Neural ne...
How to create one score from a mixed set of positive and negative variables? I am sorry, as it may not be straight answer to your question, by if you are using this "total score" as a predictor of something why dont you try regression and evaluate the results with the AUC of R
38,800
What is the probability of picking p primes from n random numbers?
There are 203,280,221 primes less than $2^{32}$. (Source). So the probability that a random 32-bit number is prime is $203,280,221 / 2^{32} \approx 0.04733$. Assuming you want selection with replacement, i.e. the same number can be picked more than once, the probability of picking $p$ primes from $n$ 32-bit random numb...
What is the probability of picking p primes from n random numbers?
There are 203,280,221 primes less than $2^{32}$. (Source). So the probability that a random 32-bit number is prime is $203,280,221 / 2^{32} \approx 0.04733$. Assuming you want selection with replaceme
What is the probability of picking p primes from n random numbers? There are 203,280,221 primes less than $2^{32}$. (Source). So the probability that a random 32-bit number is prime is $203,280,221 / 2^{32} \approx 0.04733$. Assuming you want selection with replacement, i.e. the same number can be picked more than once...
What is the probability of picking p primes from n random numbers? There are 203,280,221 primes less than $2^{32}$. (Source). So the probability that a random 32-bit number is prime is $203,280,221 / 2^{32} \approx 0.04733$. Assuming you want selection with replaceme