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
41,701
Experimental design & questions on use of generalized linear models
Software: R is certainly a good choice. I use python for this sort of thing; I write my own objective/gradient function(s) and use one of the scipy optimizers, like L-BFGS. But, R is better if you aren't a strong programmer. Caveat: I'm a machine learning guy, not a statistician, so please consider my answer to be on...
Experimental design & questions on use of generalized linear models
Software: R is certainly a good choice. I use python for this sort of thing; I write my own objective/gradient function(s) and use one of the scipy optimizers, like L-BFGS. But, R is better if you a
Experimental design & questions on use of generalized linear models Software: R is certainly a good choice. I use python for this sort of thing; I write my own objective/gradient function(s) and use one of the scipy optimizers, like L-BFGS. But, R is better if you aren't a strong programmer. Caveat: I'm a machine lea...
Experimental design & questions on use of generalized linear models Software: R is certainly a good choice. I use python for this sort of thing; I write my own objective/gradient function(s) and use one of the scipy optimizers, like L-BFGS. But, R is better if you a
41,702
Experimental design & questions on use of generalized linear models
If you choose a negative bionomial, then the package glmmADMB in R is the package for you. It is fantastic! It works just like a lmer model (where you can have fixed, random effects and nested components if you choose, along with the negative bionomial distribution/family. Best of luck. Here is an example from the pac...
Experimental design & questions on use of generalized linear models
If you choose a negative bionomial, then the package glmmADMB in R is the package for you. It is fantastic! It works just like a lmer model (where you can have fixed, random effects and nested compone
Experimental design & questions on use of generalized linear models If you choose a negative bionomial, then the package glmmADMB in R is the package for you. It is fantastic! It works just like a lmer model (where you can have fixed, random effects and nested components if you choose, along with the negative bionomial...
Experimental design & questions on use of generalized linear models If you choose a negative bionomial, then the package glmmADMB in R is the package for you. It is fantastic! It works just like a lmer model (where you can have fixed, random effects and nested compone
41,703
How to calculate the interaction standard error of a linear regression model in R?
You will need a little more information than summary(reg) provides, namely, the covariance matrix of the estimates. vcov(reg) will give that to you: x1 <- rnorm(100) x2 <- 0.7*rnorm(100) + 0.7*x1 y <- x1 + x2 + rnorm(100) reg <- lm(y~x1+x2) vcov(reg) (Intercept) x1 x2 (Intercept) 0.0...
How to calculate the interaction standard error of a linear regression model in R?
You will need a little more information than summary(reg) provides, namely, the covariance matrix of the estimates. vcov(reg) will give that to you: x1 <- rnorm(100) x2 <- 0.7*rnorm(100) + 0.7*x1 y <
How to calculate the interaction standard error of a linear regression model in R? You will need a little more information than summary(reg) provides, namely, the covariance matrix of the estimates. vcov(reg) will give that to you: x1 <- rnorm(100) x2 <- 0.7*rnorm(100) + 0.7*x1 y <- x1 + x2 + rnorm(100) reg <- lm(y~x...
How to calculate the interaction standard error of a linear regression model in R? You will need a little more information than summary(reg) provides, namely, the covariance matrix of the estimates. vcov(reg) will give that to you: x1 <- rnorm(100) x2 <- 0.7*rnorm(100) + 0.7*x1 y <
41,704
What is the conventional definition of recurrence-free survival?
As you have seen, both definitions are acceptable, mostly because both options have problems. Even the FDA does not seem to express a preference. Quoting from Guidance for Industry Clinical Trial Endpoints for the Approval of Cancer Drugs and Biologics (DFS is Disease Free Survival): The definition of DFS can be compl...
What is the conventional definition of recurrence-free survival?
As you have seen, both definitions are acceptable, mostly because both options have problems. Even the FDA does not seem to express a preference. Quoting from Guidance for Industry Clinical Trial Endp
What is the conventional definition of recurrence-free survival? As you have seen, both definitions are acceptable, mostly because both options have problems. Even the FDA does not seem to express a preference. Quoting from Guidance for Industry Clinical Trial Endpoints for the Approval of Cancer Drugs and Biologics (D...
What is the conventional definition of recurrence-free survival? As you have seen, both definitions are acceptable, mostly because both options have problems. Even the FDA does not seem to express a preference. Quoting from Guidance for Industry Clinical Trial Endp
41,705
What is the conventional definition of recurrence-free survival?
The issue of death in any non-fatal disease is a problem in many survival analysis studies. I have generally seen this handled two ways, and have not seen anyone arguing that there is a particular dominant or unified standard. The first way is to consider death to be one of your outcomes. So your event becomes "Event O...
What is the conventional definition of recurrence-free survival?
The issue of death in any non-fatal disease is a problem in many survival analysis studies. I have generally seen this handled two ways, and have not seen anyone arguing that there is a particular dom
What is the conventional definition of recurrence-free survival? The issue of death in any non-fatal disease is a problem in many survival analysis studies. I have generally seen this handled two ways, and have not seen anyone arguing that there is a particular dominant or unified standard. The first way is to consider...
What is the conventional definition of recurrence-free survival? The issue of death in any non-fatal disease is a problem in many survival analysis studies. I have generally seen this handled two ways, and have not seen anyone arguing that there is a particular dom
41,706
What is the conventional definition of recurrence-free survival?
If death is traditionally included as an event, what is the rationale for that? It certainly is not a recurrence. I faced the same issue as you. The interest that I can see is when the outcome is "Does the patient's state deteriorate due to the disease?" In that case, you can define an event as being: a death due to ...
What is the conventional definition of recurrence-free survival?
If death is traditionally included as an event, what is the rationale for that? It certainly is not a recurrence. I faced the same issue as you. The interest that I can see is when the outcome is "Do
What is the conventional definition of recurrence-free survival? If death is traditionally included as an event, what is the rationale for that? It certainly is not a recurrence. I faced the same issue as you. The interest that I can see is when the outcome is "Does the patient's state deteriorate due to the disease?"...
What is the conventional definition of recurrence-free survival? If death is traditionally included as an event, what is the rationale for that? It certainly is not a recurrence. I faced the same issue as you. The interest that I can see is when the outcome is "Do
41,707
Build a covariance matrix for GAM
Coincidentally I have been pondering this problem for a little while and resorted to emailing Simon Wood about this only the other day. His advice to me was (amongst other things but I don't think using bam()'s rho argument is applicable when you have by terms in the model) to check the example at the end of ?magic. Th...
Build a covariance matrix for GAM
Coincidentally I have been pondering this problem for a little while and resorted to emailing Simon Wood about this only the other day. His advice to me was (amongst other things but I don't think usi
Build a covariance matrix for GAM Coincidentally I have been pondering this problem for a little while and resorted to emailing Simon Wood about this only the other day. His advice to me was (amongst other things but I don't think using bam()'s rho argument is applicable when you have by terms in the model) to check th...
Build a covariance matrix for GAM Coincidentally I have been pondering this problem for a little while and resorted to emailing Simon Wood about this only the other day. His advice to me was (amongst other things but I don't think usi
41,708
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data
I do not know whether there are established methods to compare panel data to repeated cross-sectional data. But I want to add that true panel data is not always superior to repeated cross-sectional data in general. Attrition or learning effects for example may be a problem in panel data but not in repeated cross-sectio...
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data
I do not know whether there are established methods to compare panel data to repeated cross-sectional data. But I want to add that true panel data is not always superior to repeated cross-sectional da
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data I do not know whether there are established methods to compare panel data to repeated cross-sectional data. But I want to add that true panel data is not always superior to repeated cross-sectional data in general. Attrition or...
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data I do not know whether there are established methods to compare panel data to repeated cross-sectional data. But I want to add that true panel data is not always superior to repeated cross-sectional da
41,709
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data
In this paper by Seawright (2009) several approaches how to analyze pseudo-panel data are disscussed, including: Cohort averaging (Deaton 1985; Verbeek & Nijman 1992) Two-Stage Auxiliary Instrumental Variables (2SAIV) (Franklin 1989) Multiple imputation (Gelman/King/Liu 1999) Matching (Rubin 2006) Three of the approa...
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data
In this paper by Seawright (2009) several approaches how to analyze pseudo-panel data are disscussed, including: Cohort averaging (Deaton 1985; Verbeek & Nijman 1992) Two-Stage Auxiliary Instrumental
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data In this paper by Seawright (2009) several approaches how to analyze pseudo-panel data are disscussed, including: Cohort averaging (Deaton 1985; Verbeek & Nijman 1992) Two-Stage Auxiliary Instrumental Variables (2SAIV) (Frankli...
Validity of pseudo-panel data constructed from repeated cross sectional data as a panel data In this paper by Seawright (2009) several approaches how to analyze pseudo-panel data are disscussed, including: Cohort averaging (Deaton 1985; Verbeek & Nijman 1992) Two-Stage Auxiliary Instrumental
41,710
How to avoid overfitting when using crossvalidation within Genetic Algorithms
Cross-validation will not eliminate over-fitting either, only (hopefully) reduce it. If you minimise any statistic with a non-zero variance evaluated over a finite sample of data there is a risk of over-fitting. The more choices you make, the larger the chance of over-fitting. The harder you try to minimise the stat...
How to avoid overfitting when using crossvalidation within Genetic Algorithms
Cross-validation will not eliminate over-fitting either, only (hopefully) reduce it. If you minimise any statistic with a non-zero variance evaluated over a finite sample of data there is a risk of o
How to avoid overfitting when using crossvalidation within Genetic Algorithms Cross-validation will not eliminate over-fitting either, only (hopefully) reduce it. If you minimise any statistic with a non-zero variance evaluated over a finite sample of data there is a risk of over-fitting. The more choices you make, t...
How to avoid overfitting when using crossvalidation within Genetic Algorithms Cross-validation will not eliminate over-fitting either, only (hopefully) reduce it. If you minimise any statistic with a non-zero variance evaluated over a finite sample of data there is a risk of o
41,711
How to avoid overfitting when using crossvalidation within Genetic Algorithms
there is only one paradigm that can avoid models from overfiting -on future data- that is of course VC bound. Many researchers say that VC bound is a pecimistic case but i don't understand .if there is only one woman in the space, is it possible to make comment about the beauty of that the only one female...
How to avoid overfitting when using crossvalidation within Genetic Algorithms
there is only one paradigm that can avoid models from overfiting -on future data- that is of course VC bound. Many researchers say that VC bound is a pecimistic case but i don't understand .if there i
How to avoid overfitting when using crossvalidation within Genetic Algorithms there is only one paradigm that can avoid models from overfiting -on future data- that is of course VC bound. Many researchers say that VC bound is a pecimistic case but i don't understand .if there is only one woman in the space, is it possi...
How to avoid overfitting when using crossvalidation within Genetic Algorithms there is only one paradigm that can avoid models from overfiting -on future data- that is of course VC bound. Many researchers say that VC bound is a pecimistic case but i don't understand .if there i
41,712
How to avoid overfitting when using crossvalidation within Genetic Algorithms
There is nothing stopping you from including a regularization penalty in the optimization loop to be minimised, in addition to least squares. I have done this with good results. I agree with Dikran that optimisation will still cause over fitting in a regression model (even a cross-validated one) unless such steps are t...
How to avoid overfitting when using crossvalidation within Genetic Algorithms
There is nothing stopping you from including a regularization penalty in the optimization loop to be minimised, in addition to least squares. I have done this with good results. I agree with Dikran th
How to avoid overfitting when using crossvalidation within Genetic Algorithms There is nothing stopping you from including a regularization penalty in the optimization loop to be minimised, in addition to least squares. I have done this with good results. I agree with Dikran that optimisation will still cause over fitt...
How to avoid overfitting when using crossvalidation within Genetic Algorithms There is nothing stopping you from including a regularization penalty in the optimization loop to be minimised, in addition to least squares. I have done this with good results. I agree with Dikran th
41,713
Extremely large class set for support vector machine (SVM) classification
I would use the DAGSVM approach, which constructs a tree of pairwise classifiers. If you have only 100 patterns per class, but tens of thousands of classes, a lot of the pairwise classifiers will have no training data and hence not every possible pairwise classifier will need to be constructed. However, more important...
Extremely large class set for support vector machine (SVM) classification
I would use the DAGSVM approach, which constructs a tree of pairwise classifiers. If you have only 100 patterns per class, but tens of thousands of classes, a lot of the pairwise classifiers will hav
Extremely large class set for support vector machine (SVM) classification I would use the DAGSVM approach, which constructs a tree of pairwise classifiers. If you have only 100 patterns per class, but tens of thousands of classes, a lot of the pairwise classifiers will have no training data and hence not every possibl...
Extremely large class set for support vector machine (SVM) classification I would use the DAGSVM approach, which constructs a tree of pairwise classifiers. If you have only 100 patterns per class, but tens of thousands of classes, a lot of the pairwise classifiers will hav
41,714
Extremely large class set for support vector machine (SVM) classification
Have a look a Vowpal Wabbit. It's an implementation of Stochasic Gradient Decent, which is very efficient for large scale datasets. If you choose the right parameters it can mimic a SVM (hinge-loss). It also includes a reduction called Error-Correcting Tournaments, which is quite efficient for multiple classes.
Extremely large class set for support vector machine (SVM) classification
Have a look a Vowpal Wabbit. It's an implementation of Stochasic Gradient Decent, which is very efficient for large scale datasets. If you choose the right parameters it can mimic a SVM (hinge-loss).
Extremely large class set for support vector machine (SVM) classification Have a look a Vowpal Wabbit. It's an implementation of Stochasic Gradient Decent, which is very efficient for large scale datasets. If you choose the right parameters it can mimic a SVM (hinge-loss). It also includes a reduction called Error-Corr...
Extremely large class set for support vector machine (SVM) classification Have a look a Vowpal Wabbit. It's an implementation of Stochasic Gradient Decent, which is very efficient for large scale datasets. If you choose the right parameters it can mimic a SVM (hinge-loss).
41,715
Extremely large class set for support vector machine (SVM) classification
There are classification models that are inherently multiclass, without error-correcting codes or one-vs-rest. Some popular ones are Neural Networks, Linear Discriminant Analysis, Random Forests, Naive Bayes and kNN. The training time usually goes up a little, but it's far more efficient than one-vs-rest classification...
Extremely large class set for support vector machine (SVM) classification
There are classification models that are inherently multiclass, without error-correcting codes or one-vs-rest. Some popular ones are Neural Networks, Linear Discriminant Analysis, Random Forests, Naiv
Extremely large class set for support vector machine (SVM) classification There are classification models that are inherently multiclass, without error-correcting codes or one-vs-rest. Some popular ones are Neural Networks, Linear Discriminant Analysis, Random Forests, Naive Bayes and kNN. The training time usually goe...
Extremely large class set for support vector machine (SVM) classification There are classification models that are inherently multiclass, without error-correcting codes or one-vs-rest. Some popular ones are Neural Networks, Linear Discriminant Analysis, Random Forests, Naiv
41,716
Problem with Pareto distribution and R
By using ecdf and density, you're not actually doing the Pareto calculations, but instead using estimates based on a sample that are, by their non-parametric nature, not guaranteed (read: not going to) have the desired property. Try the following: x <- seq(0.1,10,by=0.1) fx <- dpareto(x, 1.5, 0.05) Fx <- ppareto(x, 1.5...
Problem with Pareto distribution and R
By using ecdf and density, you're not actually doing the Pareto calculations, but instead using estimates based on a sample that are, by their non-parametric nature, not guaranteed (read: not going to
Problem with Pareto distribution and R By using ecdf and density, you're not actually doing the Pareto calculations, but instead using estimates based on a sample that are, by their non-parametric nature, not guaranteed (read: not going to) have the desired property. Try the following: x <- seq(0.1,10,by=0.1) fx <- dpa...
Problem with Pareto distribution and R By using ecdf and density, you're not actually doing the Pareto calculations, but instead using estimates based on a sample that are, by their non-parametric nature, not guaranteed (read: not going to
41,717
Generating random matrices with sum and maximality constraints
OK, to move these efforts along (but with some diffidence) I offer this approach: generate the diagonal elements first. Make them large constants. Generate all off-diagonal elements iid according to any (non-negative) distribution you want. Normalize rows. Check the column-max condition. Repeat if violated. By mak...
Generating random matrices with sum and maximality constraints
OK, to move these efforts along (but with some diffidence) I offer this approach: generate the diagonal elements first. Make them large constants. Generate all off-diagonal elements iid according to
Generating random matrices with sum and maximality constraints OK, to move these efforts along (but with some diffidence) I offer this approach: generate the diagonal elements first. Make them large constants. Generate all off-diagonal elements iid according to any (non-negative) distribution you want. Normalize row...
Generating random matrices with sum and maximality constraints OK, to move these efforts along (but with some diffidence) I offer this approach: generate the diagonal elements first. Make them large constants. Generate all off-diagonal elements iid according to
41,718
Generating random matrices with sum and maximality constraints
First, I would generate a matrix $M$ such that $M_{ij}$ is exponentially distributed with mean $\mu$ for all $i \ne j$ or $0$ otherwise. Then, calculate your matrix \begin{align} X_{ij} &= \frac{e^{-M_{ij}}}{\sum_je^{-M_{ij}}} \end{align} To efficiently sample from a categorical distribution (a list of probabilities to...
Generating random matrices with sum and maximality constraints
First, I would generate a matrix $M$ such that $M_{ij}$ is exponentially distributed with mean $\mu$ for all $i \ne j$ or $0$ otherwise. Then, calculate your matrix \begin{align} X_{ij} &= \frac{e^{-M
Generating random matrices with sum and maximality constraints First, I would generate a matrix $M$ such that $M_{ij}$ is exponentially distributed with mean $\mu$ for all $i \ne j$ or $0$ otherwise. Then, calculate your matrix \begin{align} X_{ij} &= \frac{e^{-M_{ij}}}{\sum_je^{-M_{ij}}} \end{align} To efficiently sam...
Generating random matrices with sum and maximality constraints First, I would generate a matrix $M$ such that $M_{ij}$ is exponentially distributed with mean $\mu$ for all $i \ne j$ or $0$ otherwise. Then, calculate your matrix \begin{align} X_{ij} &= \frac{e^{-M
41,719
Generating random matrices with sum and maximality constraints
First generate random rows then divide each row by its sum so you get them to sum to one. Then order the rows a particular way, in the first row you want the row that contains the element in its first position that is the max of column 1. So, in the nth row you want the row that has the max of the nth column.
Generating random matrices with sum and maximality constraints
First generate random rows then divide each row by its sum so you get them to sum to one. Then order the rows a particular way, in the first row you want the row that contains the element in its first
Generating random matrices with sum and maximality constraints First generate random rows then divide each row by its sum so you get them to sum to one. Then order the rows a particular way, in the first row you want the row that contains the element in its first position that is the max of column 1. So, in the nth row...
Generating random matrices with sum and maximality constraints First generate random rows then divide each row by its sum so you get them to sum to one. Then order the rows a particular way, in the first row you want the row that contains the element in its first
41,720
Generating random matrices with sum and maximality constraints
Just generate each row from a Dirichlet distribution then reorder if needed to put the largest value on the diagonal (or choose the parameters such that the largest is likely to be on the diagonal).
Generating random matrices with sum and maximality constraints
Just generate each row from a Dirichlet distribution then reorder if needed to put the largest value on the diagonal (or choose the parameters such that the largest is likely to be on the diagonal).
Generating random matrices with sum and maximality constraints Just generate each row from a Dirichlet distribution then reorder if needed to put the largest value on the diagonal (or choose the parameters such that the largest is likely to be on the diagonal).
Generating random matrices with sum and maximality constraints Just generate each row from a Dirichlet distribution then reorder if needed to put the largest value on the diagonal (or choose the parameters such that the largest is likely to be on the diagonal).
41,721
Generating random matrices with sum and maximality constraints
Essentially the same idea of whuber, this time using Dirichlets: the lines of the matrix are independent Dirichlets, with each Dirichlet putting more mass on the corresponding diagonal element. rdirichlet <- function(a) { x <- sapply(a, function(a) rgamma(1, a, 1)) return(x / sum(x)) } n <- 5 A0 <- 10 a <- mat...
Generating random matrices with sum and maximality constraints
Essentially the same idea of whuber, this time using Dirichlets: the lines of the matrix are independent Dirichlets, with each Dirichlet putting more mass on the corresponding diagonal element. rdiric
Generating random matrices with sum and maximality constraints Essentially the same idea of whuber, this time using Dirichlets: the lines of the matrix are independent Dirichlets, with each Dirichlet putting more mass on the corresponding diagonal element. rdirichlet <- function(a) { x <- sapply(a, function(a) rgam...
Generating random matrices with sum and maximality constraints Essentially the same idea of whuber, this time using Dirichlets: the lines of the matrix are independent Dirichlets, with each Dirichlet putting more mass on the corresponding diagonal element. rdiric
41,722
How adding covariance noise in Gaussian processes to prevent overfitting?
The covariance essentially specifies how similar the regression function should be as a function of the attributes. The squared exponential function encodes the prior knowledge that the posterior should be a smooth function (on some characteristic length-scale governed by the hyper-parameters). If the function that g...
How adding covariance noise in Gaussian processes to prevent overfitting?
The covariance essentially specifies how similar the regression function should be as a function of the attributes. The squared exponential function encodes the prior knowledge that the posterior sho
How adding covariance noise in Gaussian processes to prevent overfitting? The covariance essentially specifies how similar the regression function should be as a function of the attributes. The squared exponential function encodes the prior knowledge that the posterior should be a smooth function (on some characterist...
How adding covariance noise in Gaussian processes to prevent overfitting? The covariance essentially specifies how similar the regression function should be as a function of the attributes. The squared exponential function encodes the prior knowledge that the posterior sho
41,723
How adding covariance noise in Gaussian processes to prevent overfitting?
Assume that you want to fit $\beta$ in the model $$ [y_1, y_2] = [0,1]\beta + [\epsilon(s_1), \epsilon(s_1)], $$ where the noise $\epsilon$ are a zero mean Gaussian process with say Matérn covariance (any covariance function will do). So you have two observations at the same point but then the only difference betw...
How adding covariance noise in Gaussian processes to prevent overfitting?
Assume that you want to fit $\beta$ in the model $$ [y_1, y_2] = [0,1]\beta + [\epsilon(s_1), \epsilon(s_1)], $$ where the noise $\epsilon$ are a zero mean Gaussian process with say Matérn covaria
How adding covariance noise in Gaussian processes to prevent overfitting? Assume that you want to fit $\beta$ in the model $$ [y_1, y_2] = [0,1]\beta + [\epsilon(s_1), \epsilon(s_1)], $$ where the noise $\epsilon$ are a zero mean Gaussian process with say Matérn covariance (any covariance function will do). So you...
How adding covariance noise in Gaussian processes to prevent overfitting? Assume that you want to fit $\beta$ in the model $$ [y_1, y_2] = [0,1]\beta + [\epsilon(s_1), \epsilon(s_1)], $$ where the noise $\epsilon$ are a zero mean Gaussian process with say Matérn covaria
41,724
Can I compare ordinal rankings (and if so, how)?
I'm not sure how to do this in Excel, but Kendall's tau is what springs to mind. The gist of that method is for each pair of supervisors (1 and 2, say) to take each pair of employees and count how many times their ranks are ordered in the same way. For that example, look at supervisor 1 and 3. They agree on the orderin...
Can I compare ordinal rankings (and if so, how)?
I'm not sure how to do this in Excel, but Kendall's tau is what springs to mind. The gist of that method is for each pair of supervisors (1 and 2, say) to take each pair of employees and count how man
Can I compare ordinal rankings (and if so, how)? I'm not sure how to do this in Excel, but Kendall's tau is what springs to mind. The gist of that method is for each pair of supervisors (1 and 2, say) to take each pair of employees and count how many times their ranks are ordered in the same way. For that example, look...
Can I compare ordinal rankings (and if so, how)? I'm not sure how to do this in Excel, but Kendall's tau is what springs to mind. The gist of that method is for each pair of supervisors (1 and 2, say) to take each pair of employees and count how man
41,725
Can I compare ordinal rankings (and if so, how)?
Johann is recommending nonparametric measures of association. If you reject independence than you are saying that the is a difference between the two groups. Another way is nonparametric ANOVA which could use the Kruskal-Wallis test for differences between the three raters. Other association measures that were specif...
Can I compare ordinal rankings (and if so, how)?
Johann is recommending nonparametric measures of association. If you reject independence than you are saying that the is a difference between the two groups. Another way is nonparametric ANOVA which
Can I compare ordinal rankings (and if so, how)? Johann is recommending nonparametric measures of association. If you reject independence than you are saying that the is a difference between the two groups. Another way is nonparametric ANOVA which could use the Kruskal-Wallis test for differences between the three ra...
Can I compare ordinal rankings (and if so, how)? Johann is recommending nonparametric measures of association. If you reject independence than you are saying that the is a difference between the two groups. Another way is nonparametric ANOVA which
41,726
Plotting overlaid ROC curves
The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
Plotting overlaid ROC curves
The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
Plotting overlaid ROC curves The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
Plotting overlaid ROC curves The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
41,727
Plotting overlaid ROC curves
If you'd like to overlay the ROC curves over each other, you can use the roc function from the pROC R package to get the sensitivity and specificity values and plot them out manually, #outcome var y = c(rep(0,50), rep(1, 50)) #predictors x1 = y + rnorm(100, sd = 1) x2 = y + rnorm(100, sd = 4) model1 = glm(y ...
Plotting overlaid ROC curves
If you'd like to overlay the ROC curves over each other, you can use the roc function from the pROC R package to get the sensitivity and specificity values and plot them out manually, #outcome va
Plotting overlaid ROC curves If you'd like to overlay the ROC curves over each other, you can use the roc function from the pROC R package to get the sensitivity and specificity values and plot them out manually, #outcome var y = c(rep(0,50), rep(1, 50)) #predictors x1 = y + rnorm(100, sd = 1) x2 = y + rnorm(1...
Plotting overlaid ROC curves If you'd like to overlay the ROC curves over each other, you can use the roc function from the pROC R package to get the sensitivity and specificity values and plot them out manually, #outcome va
41,728
Tips and tricks for getting good parameter estimates using Bayesian nonlinear regression
Here's the notation I'm going to use for the sigmoid model: $y = U + \frac{L - U}{1 + (\frac{x}{x_0})^k}$ The problem is that the sigmoid model nests functions that are close to linear within a bounded domain, and further, that very different parameter values give rise to almost-lines that are almost the same. Check it...
Tips and tricks for getting good parameter estimates using Bayesian nonlinear regression
Here's the notation I'm going to use for the sigmoid model: $y = U + \frac{L - U}{1 + (\frac{x}{x_0})^k}$ The problem is that the sigmoid model nests functions that are close to linear within a bounde
Tips and tricks for getting good parameter estimates using Bayesian nonlinear regression Here's the notation I'm going to use for the sigmoid model: $y = U + \frac{L - U}{1 + (\frac{x}{x_0})^k}$ The problem is that the sigmoid model nests functions that are close to linear within a bounded domain, and further, that ver...
Tips and tricks for getting good parameter estimates using Bayesian nonlinear regression Here's the notation I'm going to use for the sigmoid model: $y = U + \frac{L - U}{1 + (\frac{x}{x_0})^k}$ The problem is that the sigmoid model nests functions that are close to linear within a bounde
41,729
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited?
The issue becomes less contentious if you state the facts[1]. After all, all multivariate robust estimation procedures have at their core an outlier detection algorithm and all will in some form or another output a list of suspect observations. Stated otherwise, given a robust fit, identifying outliers is in principle ...
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited?
The issue becomes less contentious if you state the facts[1]. After all, all multivariate robust estimation procedures have at their core an outlier detection algorithm and all will in some form or an
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited? The issue becomes less contentious if you state the facts[1]. After all, all multivariate robust estimation procedures have at their core an outlier detection algorithm and all will in some form or another output a list of suspect observa...
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited? The issue becomes less contentious if you state the facts[1]. After all, all multivariate robust estimation procedures have at their core an outlier detection algorithm and all will in some form or an
41,730
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited?
I say no! I have done research on Dixon's test back in the 1980s. I took a look at that post and commented there. I think there is confusion because robust estimation and outlier detection though similar have different objectives and some people I think seem to feel that since the outlier methods are not mentioned in...
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited?
I say no! I have done research on Dixon's test back in the 1980s. I took a look at that post and commented there. I think there is confusion because robust estimation and outlier detection though si
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited? I say no! I have done research on Dixon's test back in the 1980s. I took a look at that post and commented there. I think there is confusion because robust estimation and outlier detection though similar have different objectives and so...
Tests for univariate outliers: have Dixon's and Grubb's methods been discredited? I say no! I have done research on Dixon's test back in the 1980s. I took a look at that post and commented there. I think there is confusion because robust estimation and outlier detection though si
41,731
How do you generate data from the multivariate Marshall Olkin distributed data?
The Marshall-Olkin bivariate distribution is not absolutely continuous because ${\mathbb P}[Y_1=Y_2]>0$. Therefore, in a simulation it is natural to observe values along $Y_1=Y_2$. Thanks for the kind offer.
How do you generate data from the multivariate Marshall Olkin distributed data?
The Marshall-Olkin bivariate distribution is not absolutely continuous because ${\mathbb P}[Y_1=Y_2]>0$. Therefore, in a simulation it is natural to observe values along $Y_1=Y_2$. Thanks for the kind
How do you generate data from the multivariate Marshall Olkin distributed data? The Marshall-Olkin bivariate distribution is not absolutely continuous because ${\mathbb P}[Y_1=Y_2]>0$. Therefore, in a simulation it is natural to observe values along $Y_1=Y_2$. Thanks for the kind offer.
How do you generate data from the multivariate Marshall Olkin distributed data? The Marshall-Olkin bivariate distribution is not absolutely continuous because ${\mathbb P}[Y_1=Y_2]>0$. Therefore, in a simulation it is natural to observe values along $Y_1=Y_2$. Thanks for the kind
41,732
Model selection in mixed-model context using lmer
As far as I'm aware, you want to specify the random effects structure first. Chapter 5 section 7 of Zuur details the general steps for selecting a model. First, include all the relevant fixed effects. Second, identify the random effects structure using REML. Third, find the fixed effects structure with ML. Fourth, Zuur...
Model selection in mixed-model context using lmer
As far as I'm aware, you want to specify the random effects structure first. Chapter 5 section 7 of Zuur details the general steps for selecting a model. First, include all the relevant fixed effects.
Model selection in mixed-model context using lmer As far as I'm aware, you want to specify the random effects structure first. Chapter 5 section 7 of Zuur details the general steps for selecting a model. First, include all the relevant fixed effects. Second, identify the random effects structure using REML. Third, find...
Model selection in mixed-model context using lmer As far as I'm aware, you want to specify the random effects structure first. Chapter 5 section 7 of Zuur details the general steps for selecting a model. First, include all the relevant fixed effects.
41,733
Calculating the Variance using Delta Method
For notational simplicity define $X_1=A$, $X_2=B$, $X_3=C$, $X_4=D$ and $L=f(X_1,X_2,X_3,X_4)$ with $f(x_1,x_2,x_3,x_4) = \frac{x_1}{x_2}+\frac{x_3}{x_4}$. A first order expansion around $\mu = (\mu_1, \mu_2,\mu_3, \mu_4)$ where $\mu_i=\mathbb{E}[X_i]$ shows that the following approximation holds $$L \approx f(\mu) +...
Calculating the Variance using Delta Method
For notational simplicity define $X_1=A$, $X_2=B$, $X_3=C$, $X_4=D$ and $L=f(X_1,X_2,X_3,X_4)$ with $f(x_1,x_2,x_3,x_4) = \frac{x_1}{x_2}+\frac{x_3}{x_4}$. A first order expansion around $\mu = (\mu
Calculating the Variance using Delta Method For notational simplicity define $X_1=A$, $X_2=B$, $X_3=C$, $X_4=D$ and $L=f(X_1,X_2,X_3,X_4)$ with $f(x_1,x_2,x_3,x_4) = \frac{x_1}{x_2}+\frac{x_3}{x_4}$. A first order expansion around $\mu = (\mu_1, \mu_2,\mu_3, \mu_4)$ where $\mu_i=\mathbb{E}[X_i]$ shows that the follow...
Calculating the Variance using Delta Method For notational simplicity define $X_1=A$, $X_2=B$, $X_3=C$, $X_4=D$ and $L=f(X_1,X_2,X_3,X_4)$ with $f(x_1,x_2,x_3,x_4) = \frac{x_1}{x_2}+\frac{x_3}{x_4}$. A first order expansion around $\mu = (\mu
41,734
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
If you z-standardize each of your series, $(X_i-\bar{X})/\sigma$, that is, unify level of the series firstly and swing of the series secondly, then the only difference that remains is the difference in shape. Compute euclidean distances (or similar measure) between 120 series and perform hierarchical clustering. You mi...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
If you z-standardize each of your series, $(X_i-\bar{X})/\sigma$, that is, unify level of the series firstly and swing of the series secondly, then the only difference that remains is the difference i
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? If you z-standardize each of your series, $(X_i-\bar{X})/\sigma$, that is, unify level of the series firstly and swing of the series secondly, then the only difference that remains is the difference in shape. Compute euclidean dista...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? If you z-standardize each of your series, $(X_i-\bar{X})/\sigma$, that is, unify level of the series firstly and swing of the series secondly, then the only difference that remains is the difference i
41,735
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
All of the recommendations so far rely on the standard moment-based approaches to time series analysis and all are a type of HAC model. The question, though, specifically queried the patterning or shape in the data. Andreas Brandmaier at the Max Planck Institute has developed an non-moment-based, information and comple...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
All of the recommendations so far rely on the standard moment-based approaches to time series analysis and all are a type of HAC model. The question, though, specifically queried the patterning or sha
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? All of the recommendations so far rely on the standard moment-based approaches to time series analysis and all are a type of HAC model. The question, though, specifically queried the patterning or shape in the data. Andreas Brandmai...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? All of the recommendations so far rely on the standard moment-based approaches to time series analysis and all are a type of HAC model. The question, though, specifically queried the patterning or sha
41,736
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
You should first differentiate your time series, i.e. consider $X_t = S_t - S_{t-1}$. Then, a correlation-based clustering will do it. You should use Spearman correlation rather than the Pearson one, as it is more generic and robust to strong variations. If you suspect that the strength of variations matters somehow, y...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
You should first differentiate your time series, i.e. consider $X_t = S_t - S_{t-1}$. Then, a correlation-based clustering will do it. You should use Spearman correlation rather than the Pearson one,
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? You should first differentiate your time series, i.e. consider $X_t = S_t - S_{t-1}$. Then, a correlation-based clustering will do it. You should use Spearman correlation rather than the Pearson one, as it is more generic and robust...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? You should first differentiate your time series, i.e. consider $X_t = S_t - S_{t-1}$. Then, a correlation-based clustering will do it. You should use Spearman correlation rather than the Pearson one,
41,737
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
Alternatively (tentative suggestion!!!): could you not create a new variable, delta.growth, which is growth at t=i - growth at t=i-1, for each time point t=0 ... t=n. I am not sure exactly how this would differ to Z-score assessment. Would be interesting to find out! You could also use joint trajectory interpretation t...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
Alternatively (tentative suggestion!!!): could you not create a new variable, delta.growth, which is growth at t=i - growth at t=i-1, for each time point t=0 ... t=n. I am not sure exactly how this wo
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? Alternatively (tentative suggestion!!!): could you not create a new variable, delta.growth, which is growth at t=i - growth at t=i-1, for each time point t=0 ... t=n. I am not sure exactly how this would differ to Z-score assessment...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? Alternatively (tentative suggestion!!!): could you not create a new variable, delta.growth, which is growth at t=i - growth at t=i-1, for each time point t=0 ... t=n. I am not sure exactly how this wo
41,738
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
There is the dynamic time warping R package dtw which allows you to compare shapes of curves and goes beyond one to one matching. There's also the dtwclust R package: Time series clustering along with optimized techniques related to the Dynamic Time Warping distance and its corresponding lower bounds.
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
There is the dynamic time warping R package dtw which allows you to compare shapes of curves and goes beyond one to one matching. There's also the dtwclust R package: Time series clustering along wit
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? There is the dynamic time warping R package dtw which allows you to compare shapes of curves and goes beyond one to one matching. There's also the dtwclust R package: Time series clustering along with optimized techniques related t...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? There is the dynamic time warping R package dtw which allows you to compare shapes of curves and goes beyond one to one matching. There's also the dtwclust R package: Time series clustering along wit
41,739
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
I might be late for this question but there is now an R package called KmlShape (produced by the same author that made the Kml package), that clusters trajectories based on their shape. It uses the K-means algorithm with the Fréchet distance.
How to do time series ( longitudinal) clustering based entirely on Shape of the curves?
I might be late for this question but there is now an R package called KmlShape (produced by the same author that made the Kml package), that clusters trajectories based on their shape. It uses the K-
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? I might be late for this question but there is now an R package called KmlShape (produced by the same author that made the Kml package), that clusters trajectories based on their shape. It uses the K-means algorithm with the Fréchet...
How to do time series ( longitudinal) clustering based entirely on Shape of the curves? I might be late for this question but there is now an R package called KmlShape (produced by the same author that made the Kml package), that clusters trajectories based on their shape. It uses the K-
41,740
A short question on sample variance
I don't think you're going to get a lot of benefit here, at least in situations where the mean is not very informative about the variance. In these situations, whether the $X_i$ vary about a number close to $\bar X$ or close to $\hat X$ is not very helpful in determining how much they vary. To see this in the algebra,...
A short question on sample variance
I don't think you're going to get a lot of benefit here, at least in situations where the mean is not very informative about the variance. In these situations, whether the $X_i$ vary about a number cl
A short question on sample variance I don't think you're going to get a lot of benefit here, at least in situations where the mean is not very informative about the variance. In these situations, whether the $X_i$ vary about a number close to $\bar X$ or close to $\hat X$ is not very helpful in determining how much the...
A short question on sample variance I don't think you're going to get a lot of benefit here, at least in situations where the mean is not very informative about the variance. In these situations, whether the $X_i$ vary about a number cl
41,741
A short question on sample variance
First, $\bar X$ is the best linear unbiased estimator of $\mu$, the population mean. You can improve the mean squared error by shrinkage, but among unbiased estimates, you cannot get any better in terms of variance than $\sigma^2/n$ ($\sigma^2$ being the population variance). Moreover, from the asymptotic theory of est...
A short question on sample variance
First, $\bar X$ is the best linear unbiased estimator of $\mu$, the population mean. You can improve the mean squared error by shrinkage, but among unbiased estimates, you cannot get any better in ter
A short question on sample variance First, $\bar X$ is the best linear unbiased estimator of $\mu$, the population mean. You can improve the mean squared error by shrinkage, but among unbiased estimates, you cannot get any better in terms of variance than $\sigma^2/n$ ($\sigma^2$ being the population variance). Moreove...
A short question on sample variance First, $\bar X$ is the best linear unbiased estimator of $\mu$, the population mean. You can improve the mean squared error by shrinkage, but among unbiased estimates, you cannot get any better in ter
41,742
A short question on sample variance
imagine we had a better estimate of the population mean: Xˆ that was guaranteed to have lower variance than the sample mean Xˉ. Could it be used to obtain an improved estimate of the population variance? Yes. Given only the samples the distribution over the mean and variance is normal-inverse-gamma. If you project thi...
A short question on sample variance
imagine we had a better estimate of the population mean: Xˆ that was guaranteed to have lower variance than the sample mean Xˉ. Could it be used to obtain an improved estimate of the population varian
A short question on sample variance imagine we had a better estimate of the population mean: Xˆ that was guaranteed to have lower variance than the sample mean Xˉ. Could it be used to obtain an improved estimate of the population variance? Yes. Given only the samples the distribution over the mean and variance is norma...
A short question on sample variance imagine we had a better estimate of the population mean: Xˆ that was guaranteed to have lower variance than the sample mean Xˉ. Could it be used to obtain an improved estimate of the population varian
41,743
Distribution of random effects
Assuming a normal distribution for the random effects is convenient from a computational point of view. However, it could be rather restrictive. In general, incorrect distribution assumption for the random effects has unfavorable influence on statistical inferences; see e.g. 1) Agresti, A., Caffo, B. & Ohman-Strickland...
Distribution of random effects
Assuming a normal distribution for the random effects is convenient from a computational point of view. However, it could be rather restrictive. In general, incorrect distribution assumption for the r
Distribution of random effects Assuming a normal distribution for the random effects is convenient from a computational point of view. However, it could be rather restrictive. In general, incorrect distribution assumption for the random effects has unfavorable influence on statistical inferences; see e.g. 1) Agresti, A...
Distribution of random effects Assuming a normal distribution for the random effects is convenient from a computational point of view. However, it could be rather restrictive. In general, incorrect distribution assumption for the r
41,744
Negative Binomial Regression and Heteroskedasticity
Heteroskedasticity is relevant with ordinary linear regression, where there is an assumption that variance is constant (do not depend on the mean), known as homoskedasticity. But with alternative regression models, like Poisson regression or negative binomial regression, there is no assumption of constant variance! In...
Negative Binomial Regression and Heteroskedasticity
Heteroskedasticity is relevant with ordinary linear regression, where there is an assumption that variance is constant (do not depend on the mean), known as homoskedasticity. But with alternative reg
Negative Binomial Regression and Heteroskedasticity Heteroskedasticity is relevant with ordinary linear regression, where there is an assumption that variance is constant (do not depend on the mean), known as homoskedasticity. But with alternative regression models, like Poisson regression or negative binomial regress...
Negative Binomial Regression and Heteroskedasticity Heteroskedasticity is relevant with ordinary linear regression, where there is an assumption that variance is constant (do not depend on the mean), known as homoskedasticity. But with alternative reg
41,745
Increase the sample size of a Latin Hypercube study?
With Latin hypercube samples, you have to decide on the number of samples, so that you break your range into either 10 or 20 bins to begin with. Otherwise, you will likely miss some parts of your space. My understanding is that the only quasi-Monte Carlo method that allows to take the next sample (or next $N$ samples) ...
Increase the sample size of a Latin Hypercube study?
With Latin hypercube samples, you have to decide on the number of samples, so that you break your range into either 10 or 20 bins to begin with. Otherwise, you will likely miss some parts of your spac
Increase the sample size of a Latin Hypercube study? With Latin hypercube samples, you have to decide on the number of samples, so that you break your range into either 10 or 20 bins to begin with. Otherwise, you will likely miss some parts of your space. My understanding is that the only quasi-Monte Carlo method that ...
Increase the sample size of a Latin Hypercube study? With Latin hypercube samples, you have to decide on the number of samples, so that you break your range into either 10 or 20 bins to begin with. Otherwise, you will likely miss some parts of your spac
41,746
How to capture competitive spatial interactions between multiple stores and customers
One of the assumptions of the Huff model (which we call multinomial logit in economics) is Independence of Irrelevant Alternatives. IIA says that the ratio of red store to green store sales is independent of the existence and characteristics of all other alternatives --- it only depends on red and green store characte...
How to capture competitive spatial interactions between multiple stores and customers
One of the assumptions of the Huff model (which we call multinomial logit in economics) is Independence of Irrelevant Alternatives. IIA says that the ratio of red store to green store sales is indepe
How to capture competitive spatial interactions between multiple stores and customers One of the assumptions of the Huff model (which we call multinomial logit in economics) is Independence of Irrelevant Alternatives. IIA says that the ratio of red store to green store sales is independent of the existence and charact...
How to capture competitive spatial interactions between multiple stores and customers One of the assumptions of the Huff model (which we call multinomial logit in economics) is Independence of Irrelevant Alternatives. IIA says that the ratio of red store to green store sales is indepe
41,747
How to capture competitive spatial interactions between multiple stores and customers
You are right, the original model seems to calculate individual attractiveness and probabilities but does not take into account the interactions. Let's say you calculate P(i,j) Using the definition of huff-model from - http://www.directionsmag.com/articles/retail-trade-area-analysis-using-the-huff-model/123411 then to ...
How to capture competitive spatial interactions between multiple stores and customers
You are right, the original model seems to calculate individual attractiveness and probabilities but does not take into account the interactions. Let's say you calculate P(i,j) Using the definition of
How to capture competitive spatial interactions between multiple stores and customers You are right, the original model seems to calculate individual attractiveness and probabilities but does not take into account the interactions. Let's say you calculate P(i,j) Using the definition of huff-model from - http://www.dire...
How to capture competitive spatial interactions between multiple stores and customers You are right, the original model seems to calculate individual attractiveness and probabilities but does not take into account the interactions. Let's say you calculate P(i,j) Using the definition of
41,748
How to select the final model with elastic net feature selection, cross validation and SVM?
By "for each fold I get a different set of features", I suspect you mean that you are using a k-fold cross-validation procedure to estimte the performance of the model. The thing to remember about cross-validation is that you are estimating the perfomance of a method of constructing a model, not the model itself. So ...
How to select the final model with elastic net feature selection, cross validation and SVM?
By "for each fold I get a different set of features", I suspect you mean that you are using a k-fold cross-validation procedure to estimte the performance of the model. The thing to remember about cr
How to select the final model with elastic net feature selection, cross validation and SVM? By "for each fold I get a different set of features", I suspect you mean that you are using a k-fold cross-validation procedure to estimte the performance of the model. The thing to remember about cross-validation is that you a...
How to select the final model with elastic net feature selection, cross validation and SVM? By "for each fold I get a different set of features", I suspect you mean that you are using a k-fold cross-validation procedure to estimte the performance of the model. The thing to remember about cr
41,749
Invertibility of AR(p) model
The answer to your question can be summarized as follows: Pure MA models are always stationary (since they contain no AR terms). Pure MA models may or may not be invertible. Pure AR models are always invertible (since they contain no MA terms). Pure AR models may or may not be stationary.
Invertibility of AR(p) model
The answer to your question can be summarized as follows: Pure MA models are always stationary (since they contain no AR terms). Pure MA models may or may not be invertible. Pure AR models are always
Invertibility of AR(p) model The answer to your question can be summarized as follows: Pure MA models are always stationary (since they contain no AR terms). Pure MA models may or may not be invertible. Pure AR models are always invertible (since they contain no MA terms). Pure AR models may or may not be stationary.
Invertibility of AR(p) model The answer to your question can be summarized as follows: Pure MA models are always stationary (since they contain no AR terms). Pure MA models may or may not be invertible. Pure AR models are always
41,750
Invertibility of AR(p) model
AR processes are always invertible and stationary iff the root of the characteristic polynomial are outside the unit circle.
Invertibility of AR(p) model
AR processes are always invertible and stationary iff the root of the characteristic polynomial are outside the unit circle.
Invertibility of AR(p) model AR processes are always invertible and stationary iff the root of the characteristic polynomial are outside the unit circle.
Invertibility of AR(p) model AR processes are always invertible and stationary iff the root of the characteristic polynomial are outside the unit circle.
41,751
Online clustering
Within the sofia-ml package there is code for fast k-means clustering based on mini-batches (see paper here). The other thing you can do to speed things up is use Random Projections (see e.g. here and here) - since in k-means all you are interested in is $\ell_2$ distances, and random projections preserve these (up to ...
Online clustering
Within the sofia-ml package there is code for fast k-means clustering based on mini-batches (see paper here). The other thing you can do to speed things up is use Random Projections (see e.g. here and
Online clustering Within the sofia-ml package there is code for fast k-means clustering based on mini-batches (see paper here). The other thing you can do to speed things up is use Random Projections (see e.g. here and here) - since in k-means all you are interested in is $\ell_2$ distances, and random projections pres...
Online clustering Within the sofia-ml package there is code for fast k-means clustering based on mini-batches (see paper here). The other thing you can do to speed things up is use Random Projections (see e.g. here and
41,752
Online clustering
Read the original k-means literature. The MacQueen publication was based on updating the result by adding single points. Most people nowerdays seem to use Lloyd iteratation, where you do the typical EM iterations, somewhat a "bulk version" of MacQueen.
Online clustering
Read the original k-means literature. The MacQueen publication was based on updating the result by adding single points. Most people nowerdays seem to use Lloyd iteratation, where you do the typical E
Online clustering Read the original k-means literature. The MacQueen publication was based on updating the result by adding single points. Most people nowerdays seem to use Lloyd iteratation, where you do the typical EM iterations, somewhat a "bulk version" of MacQueen.
Online clustering Read the original k-means literature. The MacQueen publication was based on updating the result by adding single points. Most people nowerdays seem to use Lloyd iteratation, where you do the typical E
41,753
Online clustering
Consider using Dirichlet Process K-means original paper with implementation on github. The DP means algorithm creates new clusters as more data arrives. It doesn't require a prior knowledge of the number of clusters K. DP means is a Bayesian non-parametric extension of the K-means algorithm based on small variance asym...
Online clustering
Consider using Dirichlet Process K-means original paper with implementation on github. The DP means algorithm creates new clusters as more data arrives. It doesn't require a prior knowledge of the num
Online clustering Consider using Dirichlet Process K-means original paper with implementation on github. The DP means algorithm creates new clusters as more data arrives. It doesn't require a prior knowledge of the number of clusters K. DP means is a Bayesian non-parametric extension of the K-means algorithm based on s...
Online clustering Consider using Dirichlet Process K-means original paper with implementation on github. The DP means algorithm creates new clusters as more data arrives. It doesn't require a prior knowledge of the num
41,754
Using Fractional Polynomials for Logistic Regression Modelling in R
The exposition is obscure but the examples and the discussion on p. 101 make the intentions clear. Recall that the objective (for the situation with a single continuous covariate $x$) is to generalize logistic regression from the case $$\text{logit}(y) = \beta_0 + \beta_1 x$$ to a relatively simple nonlinear expression...
Using Fractional Polynomials for Logistic Regression Modelling in R
The exposition is obscure but the examples and the discussion on p. 101 make the intentions clear. Recall that the objective (for the situation with a single continuous covariate $x$) is to generalize
Using Fractional Polynomials for Logistic Regression Modelling in R The exposition is obscure but the examples and the discussion on p. 101 make the intentions clear. Recall that the objective (for the situation with a single continuous covariate $x$) is to generalize logistic regression from the case $$\text{logit}(y)...
Using Fractional Polynomials for Logistic Regression Modelling in R The exposition is obscure but the examples and the discussion on p. 101 make the intentions clear. Recall that the objective (for the situation with a single continuous covariate $x$) is to generalize
41,755
Bounded in probability ($o_{P}$)
Adjusting the notation of Wasserman's notes a little bit, I presume that the problem may be restated like this. You have $Y^{(i)}_1,\dots,Y^{(i)}_n$ independent and identically distributed $Ber(p^{(i)})$, for $i=1,\dots,m$. Define the estimates $\hat{p}^{(i)}_n=(1/n)\sum_{j=1}^n Y^{(i)}_j$, for $i=1,\dots,m$. Then, usi...
Bounded in probability ($o_{P}$)
Adjusting the notation of Wasserman's notes a little bit, I presume that the problem may be restated like this. You have $Y^{(i)}_1,\dots,Y^{(i)}_n$ independent and identically distributed $Ber(p^{(i)
Bounded in probability ($o_{P}$) Adjusting the notation of Wasserman's notes a little bit, I presume that the problem may be restated like this. You have $Y^{(i)}_1,\dots,Y^{(i)}_n$ independent and identically distributed $Ber(p^{(i)})$, for $i=1,\dots,m$. Define the estimates $\hat{p}^{(i)}_n=(1/n)\sum_{j=1}^n Y^{(i)}...
Bounded in probability ($o_{P}$) Adjusting the notation of Wasserman's notes a little bit, I presume that the problem may be restated like this. You have $Y^{(i)}_1,\dots,Y^{(i)}_n$ independent and identically distributed $Ber(p^{(i)
41,756
About interpretation of the results of quantile regression
You can interpret the results of quantile regression in a very similar way to OLS regression, except that, rather than predicting the mean of the dependent variable, quantile regression looks at the quantiles of the dependent variable. By choosing .5 and .6, you are using the 50th and 60th percentiles. I wrote about q...
About interpretation of the results of quantile regression
You can interpret the results of quantile regression in a very similar way to OLS regression, except that, rather than predicting the mean of the dependent variable, quantile regression looks at the q
About interpretation of the results of quantile regression You can interpret the results of quantile regression in a very similar way to OLS regression, except that, rather than predicting the mean of the dependent variable, quantile regression looks at the quantiles of the dependent variable. By choosing .5 and .6, y...
About interpretation of the results of quantile regression You can interpret the results of quantile regression in a very similar way to OLS regression, except that, rather than predicting the mean of the dependent variable, quantile regression looks at the q
41,757
About interpretation of the results of quantile regression
With OLS you predict a mean value for given xs, with the median regression you predict a median value given the same xs, so if you estimate a regression for the 1st QUARTILE, you get the predicted 1st quartile given the same xs.
About interpretation of the results of quantile regression
With OLS you predict a mean value for given xs, with the median regression you predict a median value given the same xs, so if you estimate a regression for the 1st QUARTILE, you get the predicted 1st
About interpretation of the results of quantile regression With OLS you predict a mean value for given xs, with the median regression you predict a median value given the same xs, so if you estimate a regression for the 1st QUARTILE, you get the predicted 1st quartile given the same xs.
About interpretation of the results of quantile regression With OLS you predict a mean value for given xs, with the median regression you predict a median value given the same xs, so if you estimate a regression for the 1st QUARTILE, you get the predicted 1st
41,758
Comparing standard deviations between variables with very different ranges
What you're thinking about is the coefficient of variation, SD/mean.
Comparing standard deviations between variables with very different ranges
What you're thinking about is the coefficient of variation, SD/mean.
Comparing standard deviations between variables with very different ranges What you're thinking about is the coefficient of variation, SD/mean.
Comparing standard deviations between variables with very different ranges What you're thinking about is the coefficient of variation, SD/mean.
41,759
Which link function for a regression when Y is continuous between 0 and 1?
There's nothing wrong per se with using "logistic regression" for this kind of data. You can think of it as an empirical adjustment to allow fitting a response that has a bounded support. It's better than the alternative (logit-transforming your response, then using ordinary linear regression) because the resulting pre...
Which link function for a regression when Y is continuous between 0 and 1?
There's nothing wrong per se with using "logistic regression" for this kind of data. You can think of it as an empirical adjustment to allow fitting a response that has a bounded support. It's better
Which link function for a regression when Y is continuous between 0 and 1? There's nothing wrong per se with using "logistic regression" for this kind of data. You can think of it as an empirical adjustment to allow fitting a response that has a bounded support. It's better than the alternative (logit-transforming your...
Which link function for a regression when Y is continuous between 0 and 1? There's nothing wrong per se with using "logistic regression" for this kind of data. You can think of it as an empirical adjustment to allow fitting a response that has a bounded support. It's better
41,760
Which link function for a regression when Y is continuous between 0 and 1?
Link functions convert the expected value of Y (given X) to something that is unbounded. While in logistic regression, Y takes values 0 or 1, the logit isn't applied to Y but to Pr(Y=1|X). (The logit of 0 and 1 are each undefined.) So it's perfectly reasonable to use the logit or the probit in this case. The other t...
Which link function for a regression when Y is continuous between 0 and 1?
Link functions convert the expected value of Y (given X) to something that is unbounded. While in logistic regression, Y takes values 0 or 1, the logit isn't applied to Y but to Pr(Y=1|X). (The logi
Which link function for a regression when Y is continuous between 0 and 1? Link functions convert the expected value of Y (given X) to something that is unbounded. While in logistic regression, Y takes values 0 or 1, the logit isn't applied to Y but to Pr(Y=1|X). (The logit of 0 and 1 are each undefined.) So it's pe...
Which link function for a regression when Y is continuous between 0 and 1? Link functions convert the expected value of Y (given X) to something that is unbounded. While in logistic regression, Y takes values 0 or 1, the logit isn't applied to Y but to Pr(Y=1|X). (The logi
41,761
Finding expectation of reciprocal of sample mean
First you find the distribution of the sample mean. The easiest way to do this is to use moment generating function. For exponential distribution, we have $$m_{X_i}(t)=E\left[\exp\left(tX_i\right)\right]=\left(1-\frac{t}{\theta}\right)^{-1}$$ For sample mean we have $$m_{\overline{X}}(t)=E\left[\exp\left(t \overline{...
Finding expectation of reciprocal of sample mean
First you find the distribution of the sample mean. The easiest way to do this is to use moment generating function. For exponential distribution, we have $$m_{X_i}(t)=E\left[\exp\left(tX_i\right)\r
Finding expectation of reciprocal of sample mean First you find the distribution of the sample mean. The easiest way to do this is to use moment generating function. For exponential distribution, we have $$m_{X_i}(t)=E\left[\exp\left(tX_i\right)\right]=\left(1-\frac{t}{\theta}\right)^{-1}$$ For sample mean we have $$...
Finding expectation of reciprocal of sample mean First you find the distribution of the sample mean. The easiest way to do this is to use moment generating function. For exponential distribution, we have $$m_{X_i}(t)=E\left[\exp\left(tX_i\right)\r
41,762
Smoothing when standard errors are known/estimated
You can account for the differing standard errors using inverse-variance weights. You would weight each observation by the inverse of its variance, i.e. one over the square of its standard error. The simplest case is weighted least squares but similar principles apply to most other types of regression models. There are...
Smoothing when standard errors are known/estimated
You can account for the differing standard errors using inverse-variance weights. You would weight each observation by the inverse of its variance, i.e. one over the square of its standard error. The
Smoothing when standard errors are known/estimated You can account for the differing standard errors using inverse-variance weights. You would weight each observation by the inverse of its variance, i.e. one over the square of its standard error. The simplest case is weighted least squares but similar principles apply ...
Smoothing when standard errors are known/estimated You can account for the differing standard errors using inverse-variance weights. You would weight each observation by the inverse of its variance, i.e. one over the square of its standard error. The
41,763
R package for marketing
One clarifying question would be: how familiar are you with R already? To be honest, not buying the macros is probably too risky. Will the teacher expect your assignments to exactly match the results of the macros? Might they even expect you to submit Excel spreadsheets as your answers? Are the techniques used in the m...
R package for marketing
One clarifying question would be: how familiar are you with R already? To be honest, not buying the macros is probably too risky. Will the teacher expect your assignments to exactly match the results
R package for marketing One clarifying question would be: how familiar are you with R already? To be honest, not buying the macros is probably too risky. Will the teacher expect your assignments to exactly match the results of the macros? Might they even expect you to submit Excel spreadsheets as your answers? Are the ...
R package for marketing One clarifying question would be: how familiar are you with R already? To be honest, not buying the macros is probably too risky. Will the teacher expect your assignments to exactly match the results
41,764
R package for marketing
Take a look at this open source project: https://github.com/lukaszdz/library It contains implementations of the most commonly used probability distributions in Marketing. It should cover the sales forecasting and adoption models of the package you mentioned.
R package for marketing
Take a look at this open source project: https://github.com/lukaszdz/library It contains implementations of the most commonly used probability distributions in Marketing. It should cover the sales for
R package for marketing Take a look at this open source project: https://github.com/lukaszdz/library It contains implementations of the most commonly used probability distributions in Marketing. It should cover the sales forecasting and adoption models of the package you mentioned.
R package for marketing Take a look at this open source project: https://github.com/lukaszdz/library It contains implementations of the most commonly used probability distributions in Marketing. It should cover the sales for
41,765
R package for marketing
The beauty of R is its flexibility - a good place to start with business data is this list of R packages by task http://cran.r-project.org/web/views/ - in particular, you'll find lists for Econometrics, Social Science, Optimization, Time Series (Forecasting) and others. Here is a great case study application of R for c...
R package for marketing
The beauty of R is its flexibility - a good place to start with business data is this list of R packages by task http://cran.r-project.org/web/views/ - in particular, you'll find lists for Econometric
R package for marketing The beauty of R is its flexibility - a good place to start with business data is this list of R packages by task http://cran.r-project.org/web/views/ - in particular, you'll find lists for Econometrics, Social Science, Optimization, Time Series (Forecasting) and others. Here is a great case stud...
R package for marketing The beauty of R is its flexibility - a good place to start with business data is this list of R packages by task http://cran.r-project.org/web/views/ - in particular, you'll find lists for Econometric
41,766
Definition of "degree of interaction" in the MARS model
The degree of interaction is the maximum degree of input terms in the regression function. For example a model such as $y=0.5x_1+0.2x_2 -.3$ has degree $1$. While $y=0.5x_1+0.2x_2 + .05x_1x_2-.3$ has degree $2$. For simplicity, I have given a linear regression example instead of MARS. Or, paraphrasing from the wikipedi...
Definition of "degree of interaction" in the MARS model
The degree of interaction is the maximum degree of input terms in the regression function. For example a model such as $y=0.5x_1+0.2x_2 -.3$ has degree $1$. While $y=0.5x_1+0.2x_2 + .05x_1x_2-.3$ has
Definition of "degree of interaction" in the MARS model The degree of interaction is the maximum degree of input terms in the regression function. For example a model such as $y=0.5x_1+0.2x_2 -.3$ has degree $1$. While $y=0.5x_1+0.2x_2 + .05x_1x_2-.3$ has degree $2$. For simplicity, I have given a linear regression exa...
Definition of "degree of interaction" in the MARS model The degree of interaction is the maximum degree of input terms in the regression function. For example a model such as $y=0.5x_1+0.2x_2 -.3$ has degree $1$. While $y=0.5x_1+0.2x_2 + .05x_1x_2-.3$ has
41,767
Example implementation of random forest
For implementations, see this Q. However I wouldn't say any of them is easy to follow. In fact the main issue is the tree building itself. It is usually cluttered code adapted from some other package, the rest of the algorithm is mostly trivial... you may thus try first to write random naive Bayes or some similar alg...
Example implementation of random forest
For implementations, see this Q. However I wouldn't say any of them is easy to follow. In fact the main issue is the tree building itself. It is usually cluttered code adapted from some other packag
Example implementation of random forest For implementations, see this Q. However I wouldn't say any of them is easy to follow. In fact the main issue is the tree building itself. It is usually cluttered code adapted from some other package, the rest of the algorithm is mostly trivial... you may thus try first to writ...
Example implementation of random forest For implementations, see this Q. However I wouldn't say any of them is easy to follow. In fact the main issue is the tree building itself. It is usually cluttered code adapted from some other packag
41,768
Is there an R optimization package that can handle integer constraints and non-linear objective functions?
The most recent issue of The R Journal contains Differential Evolution with DEoptim, which illustrates how to use DEoptim for portfolio optimization.
Is there an R optimization package that can handle integer constraints and non-linear objective func
The most recent issue of The R Journal contains Differential Evolution with DEoptim, which illustrates how to use DEoptim for portfolio optimization.
Is there an R optimization package that can handle integer constraints and non-linear objective functions? The most recent issue of The R Journal contains Differential Evolution with DEoptim, which illustrates how to use DEoptim for portfolio optimization.
Is there an R optimization package that can handle integer constraints and non-linear objective func The most recent issue of The R Journal contains Differential Evolution with DEoptim, which illustrates how to use DEoptim for portfolio optimization.
41,769
Is there an R optimization package that can handle integer constraints and non-linear objective functions?
If you are willing to pay for it, there is an interface between R and NAG NAGFWrappers That includes all sort of optimization algorithms, if you know NAG, all chapter E04 is in there. Obviously you could interface R with NAG writing some C++ code before the package was available, but now it's easier.
Is there an R optimization package that can handle integer constraints and non-linear objective func
If you are willing to pay for it, there is an interface between R and NAG NAGFWrappers That includes all sort of optimization algorithms, if you know NAG, all chapter E04 is in there. Obviously you co
Is there an R optimization package that can handle integer constraints and non-linear objective functions? If you are willing to pay for it, there is an interface between R and NAG NAGFWrappers That includes all sort of optimization algorithms, if you know NAG, all chapter E04 is in there. Obviously you could interface...
Is there an R optimization package that can handle integer constraints and non-linear objective func If you are willing to pay for it, there is an interface between R and NAG NAGFWrappers That includes all sort of optimization algorithms, if you know NAG, all chapter E04 is in there. Obviously you co
41,770
Creating an index based on a set of measurements without a target for purpose of rank ordering
A simple approach would be to calculate the sum score or the mean. Another approach would not assume that all variables are of equal importance and we could calculate a weighted mean. Let's assume we have the following 10 patients and variables v1 to v5. > set.seed(1) > df <- data.frame(v1 = sample(1:5, 10, replace = T...
Creating an index based on a set of measurements without a target for purpose of rank ordering
A simple approach would be to calculate the sum score or the mean. Another approach would not assume that all variables are of equal importance and we could calculate a weighted mean. Let's assume we
Creating an index based on a set of measurements without a target for purpose of rank ordering A simple approach would be to calculate the sum score or the mean. Another approach would not assume that all variables are of equal importance and we could calculate a weighted mean. Let's assume we have the following 10 pat...
Creating an index based on a set of measurements without a target for purpose of rank ordering A simple approach would be to calculate the sum score or the mean. Another approach would not assume that all variables are of equal importance and we could calculate a weighted mean. Let's assume we
41,771
Creating an index based on a set of measurements without a target for purpose of rank ordering
Any function $f: \mathbb{R}^5 \to \mathbb{R}$ that is separately increasing in each of its arguments will work. For example, you can select positive parameters $\alpha_i$ and any real parameters $\lambda_i$ and rank the data $(x_1, x_2, x_3, x_4, x_5)$ according to the values of $$\sum_{i=1}^{5} \alpha_i (x_i^{\lambda...
Creating an index based on a set of measurements without a target for purpose of rank ordering
Any function $f: \mathbb{R}^5 \to \mathbb{R}$ that is separately increasing in each of its arguments will work. For example, you can select positive parameters $\alpha_i$ and any real parameters $\la
Creating an index based on a set of measurements without a target for purpose of rank ordering Any function $f: \mathbb{R}^5 \to \mathbb{R}$ that is separately increasing in each of its arguments will work. For example, you can select positive parameters $\alpha_i$ and any real parameters $\lambda_i$ and rank the data...
Creating an index based on a set of measurements without a target for purpose of rank ordering Any function $f: \mathbb{R}^5 \to \mathbb{R}$ that is separately increasing in each of its arguments will work. For example, you can select positive parameters $\alpha_i$ and any real parameters $\la
41,772
Creating an index based on a set of measurements without a target for purpose of rank ordering
I would just simply sum them up, weighting each factor if necessary.
Creating an index based on a set of measurements without a target for purpose of rank ordering
I would just simply sum them up, weighting each factor if necessary.
Creating an index based on a set of measurements without a target for purpose of rank ordering I would just simply sum them up, weighting each factor if necessary.
Creating an index based on a set of measurements without a target for purpose of rank ordering I would just simply sum them up, weighting each factor if necessary.
41,773
Creating an index based on a set of measurements without a target for purpose of rank ordering
How about generating a synthetic binary target variable first and then running a logistic regression model? The synthetic variable should be something like... "If the observation is in the top decile on all of the input variable distributions flag it as 1 else 0" Having generated the binary target variable... Run logis...
Creating an index based on a set of measurements without a target for purpose of rank ordering
How about generating a synthetic binary target variable first and then running a logistic regression model? The synthetic variable should be something like... "If the observation is in the top decile
Creating an index based on a set of measurements without a target for purpose of rank ordering How about generating a synthetic binary target variable first and then running a logistic regression model? The synthetic variable should be something like... "If the observation is in the top decile on all of the input varia...
Creating an index based on a set of measurements without a target for purpose of rank ordering How about generating a synthetic binary target variable first and then running a logistic regression model? The synthetic variable should be something like... "If the observation is in the top decile
41,774
Factor analysis problem -- singular covariance matrix?
Yes, the two errors amount to the same thing. They're telling you (roughly) that two or more of your manifest variables are linearly dependent (like $y_1 = ay_2 + b$ for scalars $a, b$). These two variables (dimensions) would be "redundant", meaning that the sample covariance matrix is not invertible (ie is singular) a...
Factor analysis problem -- singular covariance matrix?
Yes, the two errors amount to the same thing. They're telling you (roughly) that two or more of your manifest variables are linearly dependent (like $y_1 = ay_2 + b$ for scalars $a, b$). These two var
Factor analysis problem -- singular covariance matrix? Yes, the two errors amount to the same thing. They're telling you (roughly) that two or more of your manifest variables are linearly dependent (like $y_1 = ay_2 + b$ for scalars $a, b$). These two variables (dimensions) would be "redundant", meaning that the sample...
Factor analysis problem -- singular covariance matrix? Yes, the two errors amount to the same thing. They're telling you (roughly) that two or more of your manifest variables are linearly dependent (like $y_1 = ay_2 + b$ for scalars $a, b$). These two var
41,775
Calculation of power of survival study
In the R Hmisc package see the cpower and spower functions. spower does simulations for complex situations (late treatment effect, drop-in, drop-out, etc.) whereas cpower using normal approximations for simpler cases such as yours.
Calculation of power of survival study
In the R Hmisc package see the cpower and spower functions. spower does simulations for complex situations (late treatment effect, drop-in, drop-out, etc.) whereas cpower using normal approximations
Calculation of power of survival study In the R Hmisc package see the cpower and spower functions. spower does simulations for complex situations (late treatment effect, drop-in, drop-out, etc.) whereas cpower using normal approximations for simpler cases such as yours.
Calculation of power of survival study In the R Hmisc package see the cpower and spower functions. spower does simulations for complex situations (late treatment effect, drop-in, drop-out, etc.) whereas cpower using normal approximations
41,776
How to shuffle matrix data in R?
something like: nr<-dim(M)[1] M[sample.int(nr),]
How to shuffle matrix data in R?
something like: nr<-dim(M)[1] M[sample.int(nr),]
How to shuffle matrix data in R? something like: nr<-dim(M)[1] M[sample.int(nr),]
How to shuffle matrix data in R? something like: nr<-dim(M)[1] M[sample.int(nr),]
41,777
How to evaluate "external" quality of clustering?
I do not perfectly understand what you mean by internal and external quality. I assume that internal refers to a measure computed on the obtained partition while external is the result that you would like to obtain. Usually, internal measure aims at comparing the within cluster distance compared to the distance between...
How to evaluate "external" quality of clustering?
I do not perfectly understand what you mean by internal and external quality. I assume that internal refers to a measure computed on the obtained partition while external is the result that you would
How to evaluate "external" quality of clustering? I do not perfectly understand what you mean by internal and external quality. I assume that internal refers to a measure computed on the obtained partition while external is the result that you would like to obtain. Usually, internal measure aims at comparing the within...
How to evaluate "external" quality of clustering? I do not perfectly understand what you mean by internal and external quality. I assume that internal refers to a measure computed on the obtained partition while external is the result that you would
41,778
How to evaluate "external" quality of clustering?
Based on what I understand from your question... It sounds like you are clustering based on one set of characteristics, but then wanting the clusters to ideally reflect other characteristics that your clustering wasn't based on. The way to fix this is to give everything some thought before estimating any models, and ma...
How to evaluate "external" quality of clustering?
Based on what I understand from your question... It sounds like you are clustering based on one set of characteristics, but then wanting the clusters to ideally reflect other characteristics that your
How to evaluate "external" quality of clustering? Based on what I understand from your question... It sounds like you are clustering based on one set of characteristics, but then wanting the clusters to ideally reflect other characteristics that your clustering wasn't based on. The way to fix this is to give everything...
How to evaluate "external" quality of clustering? Based on what I understand from your question... It sounds like you are clustering based on one set of characteristics, but then wanting the clusters to ideally reflect other characteristics that your
41,779
How to evaluate "external" quality of clustering?
Solving a real problem takes a combination of technique and domain knowledge. You're asking about technique, and you're getting good answers on that front. But you can't really succeed without some defined domain knowledge. Your main task is to elicit, focus, distill, etc, that domain knowledge. Then you'll be able to ...
How to evaluate "external" quality of clustering?
Solving a real problem takes a combination of technique and domain knowledge. You're asking about technique, and you're getting good answers on that front. But you can't really succeed without some de
How to evaluate "external" quality of clustering? Solving a real problem takes a combination of technique and domain knowledge. You're asking about technique, and you're getting good answers on that front. But you can't really succeed without some defined domain knowledge. Your main task is to elicit, focus, distill, e...
How to evaluate "external" quality of clustering? Solving a real problem takes a combination of technique and domain knowledge. You're asking about technique, and you're getting good answers on that front. But you can't really succeed without some de
41,780
Reality check using GLM
Following Nick Sabbe's answer, here is the simplest GLMM solution I can come up with: dej$location <- factor(rep(1:25,2)) library(lme4) glmer(count ~ type1 + type2*species + perc.for.100m + perc.dry.100m + perc.wet.100m + (1|location), family = poisson, data = dej) It would be a good idea to check for overdisp...
Reality check using GLM
Following Nick Sabbe's answer, here is the simplest GLMM solution I can come up with: dej$location <- factor(rep(1:25,2)) library(lme4) glmer(count ~ type1 + type2*species + perc.for.100m + perc.d
Reality check using GLM Following Nick Sabbe's answer, here is the simplest GLMM solution I can come up with: dej$location <- factor(rep(1:25,2)) library(lme4) glmer(count ~ type1 + type2*species + perc.for.100m + perc.dry.100m + perc.wet.100m + (1|location), family = poisson, data = dej) It would be a good id...
Reality check using GLM Following Nick Sabbe's answer, here is the simplest GLMM solution I can come up with: dej$location <- factor(rep(1:25,2)) library(lme4) glmer(count ~ type1 + type2*species + perc.for.100m + perc.d
41,781
Reality check using GLM
You indicate yourself that your measurements are not independent (you measure both species' abundance from the same locations). As such, you should correct for repeated measurements. Try lmer from the lme4 package.
Reality check using GLM
You indicate yourself that your measurements are not independent (you measure both species' abundance from the same locations). As such, you should correct for repeated measurements. Try lmer from the
Reality check using GLM You indicate yourself that your measurements are not independent (you measure both species' abundance from the same locations). As such, you should correct for repeated measurements. Try lmer from the lme4 package.
Reality check using GLM You indicate yourself that your measurements are not independent (you measure both species' abundance from the same locations). As such, you should correct for repeated measurements. Try lmer from the
41,782
Statistical analysis of competition data
Yes. This situation is so complicated and the results are so interdependent that the applicability of almost any standard test has to be called into question. Why not conduct a permutation test? This is a natural situation for it: the null hypothesis of no treatment effect basically says the labels are meaningless. ...
Statistical analysis of competition data
Yes. This situation is so complicated and the results are so interdependent that the applicability of almost any standard test has to be called into question. Why not conduct a permutation test? Thi
Statistical analysis of competition data Yes. This situation is so complicated and the results are so interdependent that the applicability of almost any standard test has to be called into question. Why not conduct a permutation test? This is a natural situation for it: the null hypothesis of no treatment effect bas...
Statistical analysis of competition data Yes. This situation is so complicated and the results are so interdependent that the applicability of almost any standard test has to be called into question. Why not conduct a permutation test? Thi
41,783
Estimate the nearest of N random points in a box in E^d?
First, here are some commonly known facts which will be useful. Suppose i.i.d $X_1, \cdots, X_n$ have the cumulative distribution function $F(X) = P[X \leq x]$, then cumulative distribution function of $\min X_i$ is $G(X) = 1-(1-F(X))^n.$ The expected value of a nonnegative random variable in terms of its cdf is $E[X...
Estimate the nearest of N random points in a box in E^d?
First, here are some commonly known facts which will be useful. Suppose i.i.d $X_1, \cdots, X_n$ have the cumulative distribution function $F(X) = P[X \leq x]$, then cumulative distribution function
Estimate the nearest of N random points in a box in E^d? First, here are some commonly known facts which will be useful. Suppose i.i.d $X_1, \cdots, X_n$ have the cumulative distribution function $F(X) = P[X \leq x]$, then cumulative distribution function of $\min X_i$ is $G(X) = 1-(1-F(X))^n.$ The expected value of ...
Estimate the nearest of N random points in a box in E^d? First, here are some commonly known facts which will be useful. Suppose i.i.d $X_1, \cdots, X_n$ have the cumulative distribution function $F(X) = P[X \leq x]$, then cumulative distribution function
41,784
Plotting binomial proportions on a box & whiskers plot using R
This really does look to be more appropriate to an [r] tagged question in SO but there seems to be a surprisingly wide degree of tolerance for such questions in CV, so here goes. The answer also assumes you did not really want to use the existing boxplot() function which is what would be used to construct a true box-an...
Plotting binomial proportions on a box & whiskers plot using R
This really does look to be more appropriate to an [r] tagged question in SO but there seems to be a surprisingly wide degree of tolerance for such questions in CV, so here goes. The answer also assum
Plotting binomial proportions on a box & whiskers plot using R This really does look to be more appropriate to an [r] tagged question in SO but there seems to be a surprisingly wide degree of tolerance for such questions in CV, so here goes. The answer also assumes you did not really want to use the existing boxplot() ...
Plotting binomial proportions on a box & whiskers plot using R This really does look to be more appropriate to an [r] tagged question in SO but there seems to be a surprisingly wide degree of tolerance for such questions in CV, so here goes. The answer also assum
41,785
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
If I'm not mistaken: $[1 + \langle x,y\rangle]^2$ = $\langle[1, \sqrt{2}y_1, y_1^2, \sqrt{2}y_2, y_2^2, \sqrt{2}y_1y_2], [1, \sqrt{2}x_1, x_1^2, \sqrt{2}x_2, x_2^2, \sqrt{2}x_1x_2]^T\rangle$ So the separating rule is linear in $R^6$. Consequently, VC-dim is 7.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
If I'm not mistaken: $[1 + \langle x,y\rangle]^2$ = $\langle[1, \sqrt{2}y_1, y_1^2, \sqrt{2}y_2, y_2^2, \sqrt{2}y_1y_2], [1, \sqrt{2}x_1, x_1^2, \sqrt{2}x_2, x_2^2, \sqrt{2}x_1x_2]^T\rangle$ So the se
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ If I'm not mistaken: $[1 + \langle x,y\rangle]^2$ = $\langle[1, \sqrt{2}y_1, y_1^2, \sqrt{2}y_2, y_2^2, \sqrt{2}y_1y_2], [1, \sqrt{2}x_1, x_1^2, \sqrt{2}x_2, x_2^2, \sqrt{2}x_1x_2]^T\rangle$ So the separating rule is linear in $R^6$. Consequently, VC-dim is...
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ If I'm not mistaken: $[1 + \langle x,y\rangle]^2$ = $\langle[1, \sqrt{2}y_1, y_1^2, \sqrt{2}y_2, y_2^2, \sqrt{2}y_1y_2], [1, \sqrt{2}x_1, x_1^2, \sqrt{2}x_2, x_2^2, \sqrt{2}x_1x_2]^T\rangle$ So the se
41,786
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
The answer is 6. See the edits above for details.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
The answer is 6. See the edits above for details.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ The answer is 6. See the edits above for details.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ The answer is 6. See the edits above for details.
41,787
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
The VC dimension is the equal to the enumerative combinatorics of the number of monomials for a polynomial of degree $k$ and $n$ variables, thus $\binom{n+k}{k}$. Here we have $k=2$ and $n=2$ thus the VC dimension is $\binom{4}{2}=6$.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$
The VC dimension is the equal to the enumerative combinatorics of the number of monomials for a polynomial of degree $k$ and $n$ variables, thus $\binom{n+k}{k}$. Here we have $k=2$ and $n=2$ thus the
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ The VC dimension is the equal to the enumerative combinatorics of the number of monomials for a polynomial of degree $k$ and $n$ variables, thus $\binom{n+k}{k}$. Here we have $k=2$ and $n=2$ thus the VC dimension is $\binom{4}{2}=6$.
VC dimension of SVM with polynomial kernel in $\mathbb{R^{2}}$ The VC dimension is the equal to the enumerative combinatorics of the number of monomials for a polynomial of degree $k$ and $n$ variables, thus $\binom{n+k}{k}$. Here we have $k=2$ and $n=2$ thus the
41,788
Why do I get equal AIC, BIC and log likelihood for different models in LME framework?
The models are exactly equivalent. In both models you effectively specify one parameter for each combination of levels of Season and Crownlevel - the only difference is the parameterization: In the first model, you fit main effects for Season and Crownlevel and an interaction effect to capture the combination-specific...
Why do I get equal AIC, BIC and log likelihood for different models in LME framework?
The models are exactly equivalent. In both models you effectively specify one parameter for each combination of levels of Season and Crownlevel - the only difference is the parameterization: In the f
Why do I get equal AIC, BIC and log likelihood for different models in LME framework? The models are exactly equivalent. In both models you effectively specify one parameter for each combination of levels of Season and Crownlevel - the only difference is the parameterization: In the first model, you fit main effects f...
Why do I get equal AIC, BIC and log likelihood for different models in LME framework? The models are exactly equivalent. In both models you effectively specify one parameter for each combination of levels of Season and Crownlevel - the only difference is the parameterization: In the f
41,789
When is Generalized Belief Propagation exact?
GBP includes the junction tree algorithm as a special case, and since junction tree is exact, GBP will be exact whenever the region graph corresponds to a junction tree. This is the only general case where GBP is exact, as shown by Theorem 14 of Pakzad and Anantharam (Neural Computation, 2005).
When is Generalized Belief Propagation exact?
GBP includes the junction tree algorithm as a special case, and since junction tree is exact, GBP will be exact whenever the region graph corresponds to a junction tree. This is the only general case
When is Generalized Belief Propagation exact? GBP includes the junction tree algorithm as a special case, and since junction tree is exact, GBP will be exact whenever the region graph corresponds to a junction tree. This is the only general case where GBP is exact, as shown by Theorem 14 of Pakzad and Anantharam (Neur...
When is Generalized Belief Propagation exact? GBP includes the junction tree algorithm as a special case, and since junction tree is exact, GBP will be exact whenever the region graph corresponds to a junction tree. This is the only general case
41,790
Estimating the probability of a person getting a question right
If I understand your question correctly, you have a set of items (pass-fail) and you want to assess the probability of endorsing the $k$th item given its preceding responses? If that's the case, what is usually done in psychometrics for educational assessment is to rely on Item Response Model, like the Rasch Model. In ...
Estimating the probability of a person getting a question right
If I understand your question correctly, you have a set of items (pass-fail) and you want to assess the probability of endorsing the $k$th item given its preceding responses? If that's the case, what
Estimating the probability of a person getting a question right If I understand your question correctly, you have a set of items (pass-fail) and you want to assess the probability of endorsing the $k$th item given its preceding responses? If that's the case, what is usually done in psychometrics for educational assessm...
Estimating the probability of a person getting a question right If I understand your question correctly, you have a set of items (pass-fail) and you want to assess the probability of endorsing the $k$th item given its preceding responses? If that's the case, what
41,791
Estimating the probability of a person getting a question right
Sounds like a classic data mining task: Y_i = whether person i gets the question right, X_i (vector) = set of past performance of person i. Using a set of past data on n people (i=1,...,n), you can fit a predictive model of the sort Y = function of X. A variety of models can be used to predict the performance of a new...
Estimating the probability of a person getting a question right
Sounds like a classic data mining task: Y_i = whether person i gets the question right, X_i (vector) = set of past performance of person i. Using a set of past data on n people (i=1,...,n), you can f
Estimating the probability of a person getting a question right Sounds like a classic data mining task: Y_i = whether person i gets the question right, X_i (vector) = set of past performance of person i. Using a set of past data on n people (i=1,...,n), you can fit a predictive model of the sort Y = function of X. A v...
Estimating the probability of a person getting a question right Sounds like a classic data mining task: Y_i = whether person i gets the question right, X_i (vector) = set of past performance of person i. Using a set of past data on n people (i=1,...,n), you can f
41,792
Effect size of McNemar's Test
In general, I think best practice for presenting measures of effect size depends on the question of interest and the usual practice in your field. There's little point reporting an effect measure that readers will be unfamiliar with. Having said that, in this particular case if you want a single effect measure I think...
Effect size of McNemar's Test
In general, I think best practice for presenting measures of effect size depends on the question of interest and the usual practice in your field. There's little point reporting an effect measure that
Effect size of McNemar's Test In general, I think best practice for presenting measures of effect size depends on the question of interest and the usual practice in your field. There's little point reporting an effect measure that readers will be unfamiliar with. Having said that, in this particular case if you want a...
Effect size of McNemar's Test In general, I think best practice for presenting measures of effect size depends on the question of interest and the usual practice in your field. There's little point reporting an effect measure that
41,793
Finding coefficients for VECM + exogenous variables
In Johansen article VECM is specified with dummy variables. If your exogenous variables are strictly exogenous I see no reason why you cannot use original Johansen VECM, so look in the article how Johansen treats dummies. R package vars implements Johansen approach, where you can supply the dummies.
Finding coefficients for VECM + exogenous variables
In Johansen article VECM is specified with dummy variables. If your exogenous variables are strictly exogenous I see no reason why you cannot use original Johansen VECM, so look in the article how Jo
Finding coefficients for VECM + exogenous variables In Johansen article VECM is specified with dummy variables. If your exogenous variables are strictly exogenous I see no reason why you cannot use original Johansen VECM, so look in the article how Johansen treats dummies. R package vars implements Johansen approach, ...
Finding coefficients for VECM + exogenous variables In Johansen article VECM is specified with dummy variables. If your exogenous variables are strictly exogenous I see no reason why you cannot use original Johansen VECM, so look in the article how Jo
41,794
Regularization and Mean Estimation
Sure, it would be equivalent to the following ridge-like optimization problem: $\underset{\mu\in\mathbb{R}|\mu_0,\lambda\geq0}{\min} ||x_i-\mu-\mu_0||_2+\lambda\mu^2$ For $\lambda=0$, $\mu+\mu_0$ goes to the OLS solution (i.e. $\bar{x}$), for $\lambda=\infty$, it shrinks to $\mu_0$.
Regularization and Mean Estimation
Sure, it would be equivalent to the following ridge-like optimization problem: $\underset{\mu\in\mathbb{R}|\mu_0,\lambda\geq0}{\min} ||x_i-\mu-\mu_0||_2+\lambda\mu^2$ For $\lambda=0$, $\mu+\mu_0$ goes
Regularization and Mean Estimation Sure, it would be equivalent to the following ridge-like optimization problem: $\underset{\mu\in\mathbb{R}|\mu_0,\lambda\geq0}{\min} ||x_i-\mu-\mu_0||_2+\lambda\mu^2$ For $\lambda=0$, $\mu+\mu_0$ goes to the OLS solution (i.e. $\bar{x}$), for $\lambda=\infty$, it shrinks to $\mu_0$.
Regularization and Mean Estimation Sure, it would be equivalent to the following ridge-like optimization problem: $\underset{\mu\in\mathbb{R}|\mu_0,\lambda\geq0}{\min} ||x_i-\mu-\mu_0||_2+\lambda\mu^2$ For $\lambda=0$, $\mu+\mu_0$ goes
41,795
Regularization and Mean Estimation
Ridge regression (Hoerl and Kennard, 1988) was initially developed to overcome singularities when inverting $X^tX$ (by adding $\lambda$ to its diagonal elements). Thus, the regularization in this case consists in working with a vc matrix $(X^tX-\lambda I)^{-1}$. This L2 penalization leads to "better" predictions than w...
Regularization and Mean Estimation
Ridge regression (Hoerl and Kennard, 1988) was initially developed to overcome singularities when inverting $X^tX$ (by adding $\lambda$ to its diagonal elements). Thus, the regularization in this case
Regularization and Mean Estimation Ridge regression (Hoerl and Kennard, 1988) was initially developed to overcome singularities when inverting $X^tX$ (by adding $\lambda$ to its diagonal elements). Thus, the regularization in this case consists in working with a vc matrix $(X^tX-\lambda I)^{-1}$. This L2 penalization l...
Regularization and Mean Estimation Ridge regression (Hoerl and Kennard, 1988) was initially developed to overcome singularities when inverting $X^tX$ (by adding $\lambda$ to its diagonal elements). Thus, the regularization in this case
41,796
Visualizing activity frequency
You might be trying to incorporate too much information into the graphic. The essence of the visualization seems to be the frequency with which units are active more than one day and, possibly, the times at which those units are active. Just to generate ideas--because there are many possible solutions--consider a disp...
Visualizing activity frequency
You might be trying to incorporate too much information into the graphic. The essence of the visualization seems to be the frequency with which units are active more than one day and, possibly, the t
Visualizing activity frequency You might be trying to incorporate too much information into the graphic. The essence of the visualization seems to be the frequency with which units are active more than one day and, possibly, the times at which those units are active. Just to generate ideas--because there are many poss...
Visualizing activity frequency You might be trying to incorporate too much information into the graphic. The essence of the visualization seems to be the frequency with which units are active more than one day and, possibly, the t
41,797
Visualizing activity frequency
How about creating small timelines for each unit, one on top of the other, sorted in order of most to least active? Think sparklines You could probably do something like highlight the inactive time as either a shaded portion of the chart, or a colored portion of the unit's timeline. Since each unit would have a small...
Visualizing activity frequency
How about creating small timelines for each unit, one on top of the other, sorted in order of most to least active? Think sparklines You could probably do something like highlight the inactive time a
Visualizing activity frequency How about creating small timelines for each unit, one on top of the other, sorted in order of most to least active? Think sparklines You could probably do something like highlight the inactive time as either a shaded portion of the chart, or a colored portion of the unit's timeline. Sin...
Visualizing activity frequency How about creating small timelines for each unit, one on top of the other, sorted in order of most to least active? Think sparklines You could probably do something like highlight the inactive time a
41,798
All-Purpose Sample Entropy
Entropy is entropy with respect to a measure As noticed in the answer to this question https://mathoverflow.net/questions/33088/entropy-of-a-general-prob-measure/33090#33090 , entropy is only defined with respect to a given measure. For example discrete entropy is entropy with respect to counting measure. Sample entr...
All-Purpose Sample Entropy
Entropy is entropy with respect to a measure As noticed in the answer to this question https://mathoverflow.net/questions/33088/entropy-of-a-general-prob-measure/33090#33090 , entropy is only defined
All-Purpose Sample Entropy Entropy is entropy with respect to a measure As noticed in the answer to this question https://mathoverflow.net/questions/33088/entropy-of-a-general-prob-measure/33090#33090 , entropy is only defined with respect to a given measure. For example discrete entropy is entropy with respect to cou...
All-Purpose Sample Entropy Entropy is entropy with respect to a measure As noticed in the answer to this question https://mathoverflow.net/questions/33088/entropy-of-a-general-prob-measure/33090#33090 , entropy is only defined
41,799
Significant Difference between two network graphs
I agree with Srikant, you need to model your process. You mentioned that you had already created some networks in R, what model did you assume? The way I would tackle this problem, is to form a mathematical model, say an ODE model. For example, \begin{equation} \frac{dX_i(t)}{dt} = \lambda X_{i-1}(t) -\mu X_{i+1}(t) \...
Significant Difference between two network graphs
I agree with Srikant, you need to model your process. You mentioned that you had already created some networks in R, what model did you assume? The way I would tackle this problem, is to form a mathem
Significant Difference between two network graphs I agree with Srikant, you need to model your process. You mentioned that you had already created some networks in R, what model did you assume? The way I would tackle this problem, is to form a mathematical model, say an ODE model. For example, \begin{equation} \frac{d...
Significant Difference between two network graphs I agree with Srikant, you need to model your process. You mentioned that you had already created some networks in R, what model did you assume? The way I would tackle this problem, is to form a mathem
41,800
Significant Difference between two network graphs
I am not sure I will be able to provide a complete answer but here is how I would start. Step 1: Model the data generating process for the flows through the network For example, you may want to model the flows from one point to another point in the network as a poisson distribution. The poission distribution is used t...
Significant Difference between two network graphs
I am not sure I will be able to provide a complete answer but here is how I would start. Step 1: Model the data generating process for the flows through the network For example, you may want to model
Significant Difference between two network graphs I am not sure I will be able to provide a complete answer but here is how I would start. Step 1: Model the data generating process for the flows through the network For example, you may want to model the flows from one point to another point in the network as a poisson...
Significant Difference between two network graphs I am not sure I will be able to provide a complete answer but here is how I would start. Step 1: Model the data generating process for the flows through the network For example, you may want to model