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
54,401
Does triple interaction need to include all main effect variables?
Consider your proposed model for the expectation of the response (assuming also an intercept term): $$\newcommand{\E}{\operatorname{E}} \E Y = \beta_0 + \beta_1 A + \beta_2 B + \beta_3 D + \beta_4 AB + \beta_5 AD + \beta_6 ABD $$ When $D=0$ $$ \E Y = \beta_0 + \beta_1 A + \beta_2 B + \beta_4 AB $$ When $D=1$ $$ \E Y ...
Does triple interaction need to include all main effect variables?
Consider your proposed model for the expectation of the response (assuming also an intercept term): $$\newcommand{\E}{\operatorname{E}} \E Y = \beta_0 + \beta_1 A + \beta_2 B + \beta_3 D + \beta_4 AB
Does triple interaction need to include all main effect variables? Consider your proposed model for the expectation of the response (assuming also an intercept term): $$\newcommand{\E}{\operatorname{E}} \E Y = \beta_0 + \beta_1 A + \beta_2 B + \beta_3 D + \beta_4 AB + \beta_5 AD + \beta_6 ABD $$ When $D=0$ $$ \E Y = \...
Does triple interaction need to include all main effect variables? Consider your proposed model for the expectation of the response (assuming also an intercept term): $$\newcommand{\E}{\operatorname{E}} \E Y = \beta_0 + \beta_1 A + \beta_2 B + \beta_3 D + \beta_4 AB
54,402
Testing if frequency of event occurrences over week days is uniform
The test used will determine how to assess how much data are needed. However, standard tests, such as the $\chi^2$, would seem to be inferior or inappropriate, for two reasons: The alternative hypothesis is more specific than mere lack of independence: it focuses on a high count during one particular day. More import...
Testing if frequency of event occurrences over week days is uniform
The test used will determine how to assess how much data are needed. However, standard tests, such as the $\chi^2$, would seem to be inferior or inappropriate, for two reasons: The alternative hypot
Testing if frequency of event occurrences over week days is uniform The test used will determine how to assess how much data are needed. However, standard tests, such as the $\chi^2$, would seem to be inferior or inappropriate, for two reasons: The alternative hypothesis is more specific than mere lack of independenc...
Testing if frequency of event occurrences over week days is uniform The test used will determine how to assess how much data are needed. However, standard tests, such as the $\chi^2$, would seem to be inferior or inappropriate, for two reasons: The alternative hypot
54,403
Testing if frequency of event occurrences over week days is uniform
It seems to me that you want to test the null hypothesis that errors occur regardless of day of the week. To test this, you can perform a chi-square test that compares the actual observed number of errors on each day of the week with the expected number under the null hypothesis. That expected number for each day is th...
Testing if frequency of event occurrences over week days is uniform
It seems to me that you want to test the null hypothesis that errors occur regardless of day of the week. To test this, you can perform a chi-square test that compares the actual observed number of er
Testing if frequency of event occurrences over week days is uniform It seems to me that you want to test the null hypothesis that errors occur regardless of day of the week. To test this, you can perform a chi-square test that compares the actual observed number of errors on each day of the week with the expected numbe...
Testing if frequency of event occurrences over week days is uniform It seems to me that you want to test the null hypothesis that errors occur regardless of day of the week. To test this, you can perform a chi-square test that compares the actual observed number of er
54,404
What is the point in regression through the origin? [duplicate]
Zero intercept models are seldom used in practice. In theory, you would use a zero intercept model if you knew that the model line has to go through 0. For example, if you are modelling GDP against population, presumably when there is 0 population, there is 0 GDP. A zero intercept model would make sense. Except ... reg...
What is the point in regression through the origin? [duplicate]
Zero intercept models are seldom used in practice. In theory, you would use a zero intercept model if you knew that the model line has to go through 0. For example, if you are modelling GDP against po
What is the point in regression through the origin? [duplicate] Zero intercept models are seldom used in practice. In theory, you would use a zero intercept model if you knew that the model line has to go through 0. For example, if you are modelling GDP against population, presumably when there is 0 population, there i...
What is the point in regression through the origin? [duplicate] Zero intercept models are seldom used in practice. In theory, you would use a zero intercept model if you knew that the model line has to go through 0. For example, if you are modelling GDP against po
54,405
What math/stats knowledge does learning Bayesian probability require?
You need working knowledge of calculus, like being able to take integrals, and not like knowing Weierstrass theorem. For instance, if you can take this integral without looking at any references with a pen and a paper, you're probably equipped to take the course: $\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{x...
What math/stats knowledge does learning Bayesian probability require?
You need working knowledge of calculus, like being able to take integrals, and not like knowing Weierstrass theorem. For instance, if you can take this integral without looking at any references with
What math/stats knowledge does learning Bayesian probability require? You need working knowledge of calculus, like being able to take integrals, and not like knowing Weierstrass theorem. For instance, if you can take this integral without looking at any references with a pen and a paper, you're probably equipped to tak...
What math/stats knowledge does learning Bayesian probability require? You need working knowledge of calculus, like being able to take integrals, and not like knowing Weierstrass theorem. For instance, if you can take this integral without looking at any references with
54,406
What math/stats knowledge does learning Bayesian probability require?
I was in a similar boat, having been a Math/CS double major but needing to learn a lot of Bayesian probability for work. What I'd recommend: Practical ability to do and understand integrals An understanding of numerical methods for approximating integrals (sampling, Monte Carlo method) Knowing the R programming langua...
What math/stats knowledge does learning Bayesian probability require?
I was in a similar boat, having been a Math/CS double major but needing to learn a lot of Bayesian probability for work. What I'd recommend: Practical ability to do and understand integrals An unders
What math/stats knowledge does learning Bayesian probability require? I was in a similar boat, having been a Math/CS double major but needing to learn a lot of Bayesian probability for work. What I'd recommend: Practical ability to do and understand integrals An understanding of numerical methods for approximating int...
What math/stats knowledge does learning Bayesian probability require? I was in a similar boat, having been a Math/CS double major but needing to learn a lot of Bayesian probability for work. What I'd recommend: Practical ability to do and understand integrals An unders
54,407
Kolmogorov-Smirnov vs Mann-Whitney U When There Are Ties
I'm not sure what the basis is for your colleague's claim -- but they should support the claims they make before you accept them as true -- there's an astonishing amount of misinformed folklore about. (How do they know that this is true? Do you have good reason to think it must be true in your case?) Both tests assume$...
Kolmogorov-Smirnov vs Mann-Whitney U When There Are Ties
I'm not sure what the basis is for your colleague's claim -- but they should support the claims they make before you accept them as true -- there's an astonishing amount of misinformed folklore about.
Kolmogorov-Smirnov vs Mann-Whitney U When There Are Ties I'm not sure what the basis is for your colleague's claim -- but they should support the claims they make before you accept them as true -- there's an astonishing amount of misinformed folklore about. (How do they know that this is true? Do you have good reason t...
Kolmogorov-Smirnov vs Mann-Whitney U When There Are Ties I'm not sure what the basis is for your colleague's claim -- but they should support the claims they make before you accept them as true -- there's an astonishing amount of misinformed folklore about.
54,408
Time-series forecasting (in C#)
Let's take your questions one at a time: Is there any method to determine optimal smoothing parameters without testing all of them? You can cast your problem in a state space framework and then numerically optimize your parameters using standard numerical libraries. Forecasting with Exponential Smoothing - The State ...
Time-series forecasting (in C#)
Let's take your questions one at a time: Is there any method to determine optimal smoothing parameters without testing all of them? You can cast your problem in a state space framework and then nume
Time-series forecasting (in C#) Let's take your questions one at a time: Is there any method to determine optimal smoothing parameters without testing all of them? You can cast your problem in a state space framework and then numerically optimize your parameters using standard numerical libraries. Forecasting with Ex...
Time-series forecasting (in C#) Let's take your questions one at a time: Is there any method to determine optimal smoothing parameters without testing all of them? You can cast your problem in a state space framework and then nume
54,409
How to find set of directions in Stahel-Donoho outlyingness measure?
Summary: the only 'correct' definition is the original one [0][1], the other ones were designed to solve a problem with it that happens in a specific context and would probably have been best called 'pseudo-Stahel-Donoho' distances because they don't, in general, have the same interpretation. Now, I will show you how ...
How to find set of directions in Stahel-Donoho outlyingness measure?
Summary: the only 'correct' definition is the original one [0][1], the other ones were designed to solve a problem with it that happens in a specific context and would probably have been best called '
How to find set of directions in Stahel-Donoho outlyingness measure? Summary: the only 'correct' definition is the original one [0][1], the other ones were designed to solve a problem with it that happens in a specific context and would probably have been best called 'pseudo-Stahel-Donoho' distances because they don't,...
How to find set of directions in Stahel-Donoho outlyingness measure? Summary: the only 'correct' definition is the original one [0][1], the other ones were designed to solve a problem with it that happens in a specific context and would probably have been best called '
54,410
MANOVA when sample size is smaller than the number of DVs
Any method will be "sensitive to a small number of cases", meaning that a small study has lower power to detect features of interest than a larger one. With multivariate data, you are not only comparing means -- you are typically estimating a covariance matrix as well, and this requires more data to do with any accurac...
MANOVA when sample size is smaller than the number of DVs
Any method will be "sensitive to a small number of cases", meaning that a small study has lower power to detect features of interest than a larger one. With multivariate data, you are not only compari
MANOVA when sample size is smaller than the number of DVs Any method will be "sensitive to a small number of cases", meaning that a small study has lower power to detect features of interest than a larger one. With multivariate data, you are not only comparing means -- you are typically estimating a covariance matrix a...
MANOVA when sample size is smaller than the number of DVs Any method will be "sensitive to a small number of cases", meaning that a small study has lower power to detect features of interest than a larger one. With multivariate data, you are not only compari
54,411
Fuzzy RDD issue
The Fuzzy RD design can conceptualized as a local IV model (that is, an instrumental variables regression with weights that decline as observations move away from the cutoff). You need to instrument for the treated indicator with a dummy for being above the cutoff, while controlling for the running variable $Z$ and the...
Fuzzy RDD issue
The Fuzzy RD design can conceptualized as a local IV model (that is, an instrumental variables regression with weights that decline as observations move away from the cutoff). You need to instrument f
Fuzzy RDD issue The Fuzzy RD design can conceptualized as a local IV model (that is, an instrumental variables regression with weights that decline as observations move away from the cutoff). You need to instrument for the treated indicator with a dummy for being above the cutoff, while controlling for the running vari...
Fuzzy RDD issue The Fuzzy RD design can conceptualized as a local IV model (that is, an instrumental variables regression with weights that decline as observations move away from the cutoff). You need to instrument f
54,412
How to interpret ANOVA output when comparing two nested mixed-effect models?
The Chisq value is the test statistic of the likelihood ratio test (LRT) being applied to the two models. This value is computed as twice the difference in the log-likelihoods of the two models (the log likelihood is in column logLik). Asymptotically, the log-likelihood ratio follows a Chi-square distribution with degr...
How to interpret ANOVA output when comparing two nested mixed-effect models?
The Chisq value is the test statistic of the likelihood ratio test (LRT) being applied to the two models. This value is computed as twice the difference in the log-likelihoods of the two models (the l
How to interpret ANOVA output when comparing two nested mixed-effect models? The Chisq value is the test statistic of the likelihood ratio test (LRT) being applied to the two models. This value is computed as twice the difference in the log-likelihoods of the two models (the log likelihood is in column logLik). Asympto...
How to interpret ANOVA output when comparing two nested mixed-effect models? The Chisq value is the test statistic of the likelihood ratio test (LRT) being applied to the two models. This value is computed as twice the difference in the log-likelihoods of the two models (the l
54,413
Determine when time-series should be logged (or any other transformation) and applied automatically
As @Irishstat points out you could use boxcox power transformation, which is a more general transformation function which also includes log transformation. R's forecast package has a function called BoxCox.lambda and BoxCox, you could use these two functions and determine if your data needs transformation. if lambda is...
Determine when time-series should be logged (or any other transformation) and applied automatically
As @Irishstat points out you could use boxcox power transformation, which is a more general transformation function which also includes log transformation. R's forecast package has a function called B
Determine when time-series should be logged (or any other transformation) and applied automatically As @Irishstat points out you could use boxcox power transformation, which is a more general transformation function which also includes log transformation. R's forecast package has a function called BoxCox.lambda and Box...
Determine when time-series should be logged (or any other transformation) and applied automatically As @Irishstat points out you could use boxcox power transformation, which is a more general transformation function which also includes log transformation. R's forecast package has a function called B
54,414
Determine when time-series should be logged (or any other transformation) and applied automatically
Power Transformations found via a Box-Cox test http://onlinestatbook.com/2/transformations/box-cox.html are useful/correct when a linear relationship is found between the expected value and the variability of the model errors. It has little to do with the variability of the original series. The range of transformatio...
Determine when time-series should be logged (or any other transformation) and applied automatically
Power Transformations found via a Box-Cox test http://onlinestatbook.com/2/transformations/box-cox.html are useful/correct when a linear relationship is found between the expected value and the varia
Determine when time-series should be logged (or any other transformation) and applied automatically Power Transformations found via a Box-Cox test http://onlinestatbook.com/2/transformations/box-cox.html are useful/correct when a linear relationship is found between the expected value and the variability of the model ...
Determine when time-series should be logged (or any other transformation) and applied automatically Power Transformations found via a Box-Cox test http://onlinestatbook.com/2/transformations/box-cox.html are useful/correct when a linear relationship is found between the expected value and the varia
54,415
Tournament Plotting: Who is good against whom?
I'm guessing you have all the pairwise win-rates? Then perhaps plot then in a grid, with colors indicating win-rate. An implementation in python: from itertools import product import numpy as np import matplotlib.pyplot as plt from matplotlib import cm np.random.seed(34563) # Create win_rates. Symmetric with .5's do...
Tournament Plotting: Who is good against whom?
I'm guessing you have all the pairwise win-rates? Then perhaps plot then in a grid, with colors indicating win-rate. An implementation in python: from itertools import product import numpy as np impo
Tournament Plotting: Who is good against whom? I'm guessing you have all the pairwise win-rates? Then perhaps plot then in a grid, with colors indicating win-rate. An implementation in python: from itertools import product import numpy as np import matplotlib.pyplot as plt from matplotlib import cm np.random.seed(345...
Tournament Plotting: Who is good against whom? I'm guessing you have all the pairwise win-rates? Then perhaps plot then in a grid, with colors indicating win-rate. An implementation in python: from itertools import product import numpy as np impo
54,416
Tournament Plotting: Who is good against whom?
I would recommend using a fluctuation diagram over a heatmap. Here is an example: Fluctuation diagrams use area to represent count, instead of color, which is higher on Cleveland's hierarchy of visual skills. Sort the players by number of wins, both vertically and horizontally. It is also possible to include some ind...
Tournament Plotting: Who is good against whom?
I would recommend using a fluctuation diagram over a heatmap. Here is an example: Fluctuation diagrams use area to represent count, instead of color, which is higher on Cleveland's hierarchy of visua
Tournament Plotting: Who is good against whom? I would recommend using a fluctuation diagram over a heatmap. Here is an example: Fluctuation diagrams use area to represent count, instead of color, which is higher on Cleveland's hierarchy of visual skills. Sort the players by number of wins, both vertically and horizo...
Tournament Plotting: Who is good against whom? I would recommend using a fluctuation diagram over a heatmap. Here is an example: Fluctuation diagrams use area to represent count, instead of color, which is higher on Cleveland's hierarchy of visua
54,417
R and JMP produce different regression results due to sum of squares calculation and other factors
Figured it out. After condition <- mydata$condition in my original R code, adding these lines (instead of what I had there originally) makes the R results identical to the JMP results: # change contrasts from the R defaults: options(contrasts=c("contr.sum", "contr.poly")) # center income: income_c <- scale(income,...
R and JMP produce different regression results due to sum of squares calculation and other factors
Figured it out. After condition <- mydata$condition in my original R code, adding these lines (instead of what I had there originally) makes the R results identical to the JMP results: # change cont
R and JMP produce different regression results due to sum of squares calculation and other factors Figured it out. After condition <- mydata$condition in my original R code, adding these lines (instead of what I had there originally) makes the R results identical to the JMP results: # change contrasts from the R defa...
R and JMP produce different regression results due to sum of squares calculation and other factors Figured it out. After condition <- mydata$condition in my original R code, adding these lines (instead of what I had there originally) makes the R results identical to the JMP results: # change cont
54,418
R and JMP produce different regression results due to sum of squares calculation and other factors
JMP centers polynomials by default. You can override that default by unclicking that option under the red triangle by "Model Specification" in the "Fit Model" dialog box. Doing so will produce the same results for the Type III sums-of-squares as R, when you use the car package and appropriate contrasts. In other words,...
R and JMP produce different regression results due to sum of squares calculation and other factors
JMP centers polynomials by default. You can override that default by unclicking that option under the red triangle by "Model Specification" in the "Fit Model" dialog box. Doing so will produce the sam
R and JMP produce different regression results due to sum of squares calculation and other factors JMP centers polynomials by default. You can override that default by unclicking that option under the red triangle by "Model Specification" in the "Fit Model" dialog box. Doing so will produce the same results for the Typ...
R and JMP produce different regression results due to sum of squares calculation and other factors JMP centers polynomials by default. You can override that default by unclicking that option under the red triangle by "Model Specification" in the "Fit Model" dialog box. Doing so will produce the sam
54,419
Book for introductory nonparametric econometrics/statistics
I would recommend two books if you are interested in smoothing techniques, especially in density estimation and regression (rather than in tests that don’t require classical normality assumptions, which are often based on ranks rather than the raw data): Nonparametric and Semiparametric Models by Härdle, Müller, Sperl...
Book for introductory nonparametric econometrics/statistics
I would recommend two books if you are interested in smoothing techniques, especially in density estimation and regression (rather than in tests that don’t require classical normality assumptions, whi
Book for introductory nonparametric econometrics/statistics I would recommend two books if you are interested in smoothing techniques, especially in density estimation and regression (rather than in tests that don’t require classical normality assumptions, which are often based on ranks rather than the raw data): Nonp...
Book for introductory nonparametric econometrics/statistics I would recommend two books if you are interested in smoothing techniques, especially in density estimation and regression (rather than in tests that don’t require classical normality assumptions, whi
54,420
Book for introductory nonparametric econometrics/statistics
There is a recent title by Henderson/Parmeter: Applied Nonparametric Econometrics. As the name suggests, its focus is more applied than that of Li and Racine, although it does devote quite some attention to theoretical underpinnings, too. Compared to the titles mentioned by @Dimitriy, it (unsurprisingly given its more...
Book for introductory nonparametric econometrics/statistics
There is a recent title by Henderson/Parmeter: Applied Nonparametric Econometrics. As the name suggests, its focus is more applied than that of Li and Racine, although it does devote quite some attent
Book for introductory nonparametric econometrics/statistics There is a recent title by Henderson/Parmeter: Applied Nonparametric Econometrics. As the name suggests, its focus is more applied than that of Li and Racine, although it does devote quite some attention to theoretical underpinnings, too. Compared to the titl...
Book for introductory nonparametric econometrics/statistics There is a recent title by Henderson/Parmeter: Applied Nonparametric Econometrics. As the name suggests, its focus is more applied than that of Li and Racine, although it does devote quite some attent
54,421
Book for introductory nonparametric econometrics/statistics
The online StatSoft textbook is a good place to start.
Book for introductory nonparametric econometrics/statistics
The online StatSoft textbook is a good place to start.
Book for introductory nonparametric econometrics/statistics The online StatSoft textbook is a good place to start.
Book for introductory nonparametric econometrics/statistics The online StatSoft textbook is a good place to start.
54,422
How to represent categorical data in a pie graph form?
A pie chart - if it's suitable at all - is only suitable for mutually exclusive categories, since it represents a division of a whole into mutually exclusive subsets. So, don't use a pie chart for categories that are not mutually exclusive. You're misleading people by doing so. (Why would you want to actively - and see...
How to represent categorical data in a pie graph form?
A pie chart - if it's suitable at all - is only suitable for mutually exclusive categories, since it represents a division of a whole into mutually exclusive subsets. So, don't use a pie chart for cat
How to represent categorical data in a pie graph form? A pie chart - if it's suitable at all - is only suitable for mutually exclusive categories, since it represents a division of a whole into mutually exclusive subsets. So, don't use a pie chart for categories that are not mutually exclusive. You're misleading people...
How to represent categorical data in a pie graph form? A pie chart - if it's suitable at all - is only suitable for mutually exclusive categories, since it represents a division of a whole into mutually exclusive subsets. So, don't use a pie chart for cat
54,423
Comparing mclust() and k-means centroids
Gaussian Mixture Modeling is not the same as k-means. None of the models has a 1:1 correspondence to k-means. The closes is probably "EII" = spherical, equal volume but Mclust will still use a soft assignment, whereas k-means uses a hard assignment. There is a closer relationship between EII and fuzzy c-means (al...
Comparing mclust() and k-means centroids
Gaussian Mixture Modeling is not the same as k-means. None of the models has a 1:1 correspondence to k-means. The closes is probably "EII" = spherical, equal volume but Mclust will still use a s
Comparing mclust() and k-means centroids Gaussian Mixture Modeling is not the same as k-means. None of the models has a 1:1 correspondence to k-means. The closes is probably "EII" = spherical, equal volume but Mclust will still use a soft assignment, whereas k-means uses a hard assignment. There is a closer relat...
Comparing mclust() and k-means centroids Gaussian Mixture Modeling is not the same as k-means. None of the models has a 1:1 correspondence to k-means. The closes is probably "EII" = spherical, equal volume but Mclust will still use a s
54,424
Does it make sense to do CV-error-weighted model averaging?
There already exists a method very similar to what you're describing (weighted averages of predictions using cross-validated scores as weights). It is called SuperLearner. http://biostats.bepress.com/ucbbiostat/paper222/ (This book focuses on another method called TMLE, but succinctly describes SuperLearner and its the...
Does it make sense to do CV-error-weighted model averaging?
There already exists a method very similar to what you're describing (weighted averages of predictions using cross-validated scores as weights). It is called SuperLearner. http://biostats.bepress.com/
Does it make sense to do CV-error-weighted model averaging? There already exists a method very similar to what you're describing (weighted averages of predictions using cross-validated scores as weights). It is called SuperLearner. http://biostats.bepress.com/ucbbiostat/paper222/ (This book focuses on another method ca...
Does it make sense to do CV-error-weighted model averaging? There already exists a method very similar to what you're describing (weighted averages of predictions using cross-validated scores as weights). It is called SuperLearner. http://biostats.bepress.com/
54,425
Does it make sense to do CV-error-weighted model averaging?
I argue that an average model with weights as functions of cross-validation scores makes sense. Yes, but... ... only if you can be sure that your cross-validation measurement of the performance is good enough. In practice, e.g. I deal with sample sizes that are far too small to reliably compare models. Related questi...
Does it make sense to do CV-error-weighted model averaging?
I argue that an average model with weights as functions of cross-validation scores makes sense. Yes, but... ... only if you can be sure that your cross-validation measurement of the performance is g
Does it make sense to do CV-error-weighted model averaging? I argue that an average model with weights as functions of cross-validation scores makes sense. Yes, but... ... only if you can be sure that your cross-validation measurement of the performance is good enough. In practice, e.g. I deal with sample sizes that ...
Does it make sense to do CV-error-weighted model averaging? I argue that an average model with weights as functions of cross-validation scores makes sense. Yes, but... ... only if you can be sure that your cross-validation measurement of the performance is g
54,426
Introductory Text for GAM
Buja et al., (1989) give a nice overview of GAMs in the context of other additive nonparametric smoothing models. If I recall correctly, most of their examples can be easily done in R using existing packages. Buja, A., Hastie, T., and Tibshirani, R. (1989). Linear Smoothers and Additive Models. The Annals of Statistics...
Introductory Text for GAM
Buja et al., (1989) give a nice overview of GAMs in the context of other additive nonparametric smoothing models. If I recall correctly, most of their examples can be easily done in R using existing p
Introductory Text for GAM Buja et al., (1989) give a nice overview of GAMs in the context of other additive nonparametric smoothing models. If I recall correctly, most of their examples can be easily done in R using existing packages. Buja, A., Hastie, T., and Tibshirani, R. (1989). Linear Smoothers and Additive Models...
Introductory Text for GAM Buja et al., (1989) give a nice overview of GAMs in the context of other additive nonparametric smoothing models. If I recall correctly, most of their examples can be easily done in R using existing p
54,427
Introductory Text for GAM
Hastie & Tibshirani's original textbook is still a great read IMO: Hastie, T. & Tibshirani, R. (1990) Generalized Additive Models, Chapman & Hall. I personally found it much easier to follow than Simon Wood's text, even if the latter is more up-to-date.
Introductory Text for GAM
Hastie & Tibshirani's original textbook is still a great read IMO: Hastie, T. & Tibshirani, R. (1990) Generalized Additive Models, Chapman & Hall. I personally found it much easier to follow than Simo
Introductory Text for GAM Hastie & Tibshirani's original textbook is still a great read IMO: Hastie, T. & Tibshirani, R. (1990) Generalized Additive Models, Chapman & Hall. I personally found it much easier to follow than Simon Wood's text, even if the latter is more up-to-date.
Introductory Text for GAM Hastie & Tibshirani's original textbook is still a great read IMO: Hastie, T. & Tibshirani, R. (1990) Generalized Additive Models, Chapman & Hall. I personally found it much easier to follow than Simo
54,428
Introductory Text for GAM
I thought Michael Clark's overview is excellent: https://m-clark.github.io/generalized-additive-models/ A great short (very short) introduction to get you started.
Introductory Text for GAM
I thought Michael Clark's overview is excellent: https://m-clark.github.io/generalized-additive-models/ A great short (very short) introduction to get you started.
Introductory Text for GAM I thought Michael Clark's overview is excellent: https://m-clark.github.io/generalized-additive-models/ A great short (very short) introduction to get you started.
Introductory Text for GAM I thought Michael Clark's overview is excellent: https://m-clark.github.io/generalized-additive-models/ A great short (very short) introduction to get you started.
54,429
Introductory Text for GAM
I came across this introductory video on GAM that I thought was helpful and easy to follow: https://www.youtube.com/watch?v=nXDYapfalt4
Introductory Text for GAM
I came across this introductory video on GAM that I thought was helpful and easy to follow: https://www.youtube.com/watch?v=nXDYapfalt4
Introductory Text for GAM I came across this introductory video on GAM that I thought was helpful and easy to follow: https://www.youtube.com/watch?v=nXDYapfalt4
Introductory Text for GAM I came across this introductory video on GAM that I thought was helpful and easy to follow: https://www.youtube.com/watch?v=nXDYapfalt4
54,430
Introductory Text for GAM
Not a text but I found this to be a great resource for GAMs using R: https://noamross.github.io/gams-in-r-course/ It leads you through the nature of fitting a GAM without getting into the maths involved.
Introductory Text for GAM
Not a text but I found this to be a great resource for GAMs using R: https://noamross.github.io/gams-in-r-course/ It leads you through the nature of fitting a GAM without getting into the maths involv
Introductory Text for GAM Not a text but I found this to be a great resource for GAMs using R: https://noamross.github.io/gams-in-r-course/ It leads you through the nature of fitting a GAM without getting into the maths involved.
Introductory Text for GAM Not a text but I found this to be a great resource for GAMs using R: https://noamross.github.io/gams-in-r-course/ It leads you through the nature of fitting a GAM without getting into the maths involv
54,431
Introductory Text for GAM
See chapter 3 in "Mixed effects models and extensions in ecology with R. A Zuur, EN Ieno, N Walker, AA Saveliev, GM Smith" Ch3 provides a really basic intro to GAM in both the GAM and MGCV packages. In further chapters the book covers a lot of the things you might do with GAM and goes into GAMM, and zero-inflated GAM...
Introductory Text for GAM
See chapter 3 in "Mixed effects models and extensions in ecology with R. A Zuur, EN Ieno, N Walker, AA Saveliev, GM Smith" Ch3 provides a really basic intro to GAM in both the GAM and MGCV packages.
Introductory Text for GAM See chapter 3 in "Mixed effects models and extensions in ecology with R. A Zuur, EN Ieno, N Walker, AA Saveliev, GM Smith" Ch3 provides a really basic intro to GAM in both the GAM and MGCV packages. In further chapters the book covers a lot of the things you might do with GAM and goes into G...
Introductory Text for GAM See chapter 3 in "Mixed effects models and extensions in ecology with R. A Zuur, EN Ieno, N Walker, AA Saveliev, GM Smith" Ch3 provides a really basic intro to GAM in both the GAM and MGCV packages.
54,432
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R?
The emmeans package now provides estimated marginal means for GEE models: library(geepack) library(emmeans) warp.gee <- geeglm(breaks ~ tension, id=wool, family=gaussian, data=warpbreaks) emmeans(warp.gee, ~tension) tension lsmean SE df asymp.LCL asymp.UCL L 36.38889 5.774705 Inf 25.07067 47.70710 M...
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo
The emmeans package now provides estimated marginal means for GEE models: library(geepack) library(emmeans) warp.gee <- geeglm(breaks ~ tension, id=wool, family=gaussian, data=warpbreaks) emmeans(warp
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R? The emmeans package now provides estimated marginal means for GEE models: library(geepack) library(emmeans) warp.gee <- geeglm(breaks ~ tension, id=wool, family=gaussian, data=warpbreaks) emmeans(warp.ge...
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo The emmeans package now provides estimated marginal means for GEE models: library(geepack) library(emmeans) warp.gee <- geeglm(breaks ~ tension, id=wool, family=gaussian, data=warpbreaks) emmeans(warp
54,433
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R?
The LSmeans function in the doBy package may be helpful. Here is a simple modification of an example in the vignette. library(doBy) library(geepack) warp.gee <- geeglm(breaks ~ tension, id=wool, family=gaussian, data=warpbreaks) LSmeans(warp.gee,effect="tension")
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo
The LSmeans function in the doBy package may be helpful. Here is a simple modification of an example in the vignette. library(doBy) library(geepack) warp.gee <- geeglm(breaks ~ tension, id=wool, famil
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R? The LSmeans function in the doBy package may be helpful. Here is a simple modification of an example in the vignette. library(doBy) library(geepack) warp.gee <- geeglm(breaks ~ tension, id=wool, family=g...
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo The LSmeans function in the doBy package may be helpful. Here is a simple modification of an example in the vignette. library(doBy) library(geepack) warp.gee <- geeglm(breaks ~ tension, id=wool, famil
54,434
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R?
The spind package offers a predict function similar to other uses of predict: https://www.rdocumentation.org/packages/spind/versions/2.1.3/topics/predict.GEE # load packages library(geepack) library(spind) n <- nrow(warpbreaks) # number of cases trainIndex <- sample(1:n, n*.60) # random subset of 60% of cases (trainin...
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo
The spind package offers a predict function similar to other uses of predict: https://www.rdocumentation.org/packages/spind/versions/2.1.3/topics/predict.GEE # load packages library(geepack) library(s
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE model fitted in R? The spind package offers a predict function similar to other uses of predict: https://www.rdocumentation.org/packages/spind/versions/2.1.3/topics/predict.GEE # load packages library(geepack) library(spin...
How can I estimate model predicted means (a.k.a. marginal means, lsmeans, or EM means) from a GEE mo The spind package offers a predict function similar to other uses of predict: https://www.rdocumentation.org/packages/spind/versions/2.1.3/topics/predict.GEE # load packages library(geepack) library(s
54,435
How to handle unseen features in a Naive Bayes classifier?
Typically one would use Laplace smoothing, essentially adding an artificial observation of every feature for every class. This is done to avoid the issue of having never observed a feature in one class causing a zero that propagates. This is also called a uniform prior. For a feature never seen ever in any training d...
How to handle unseen features in a Naive Bayes classifier?
Typically one would use Laplace smoothing, essentially adding an artificial observation of every feature for every class. This is done to avoid the issue of having never observed a feature in one cla
How to handle unseen features in a Naive Bayes classifier? Typically one would use Laplace smoothing, essentially adding an artificial observation of every feature for every class. This is done to avoid the issue of having never observed a feature in one class causing a zero that propagates. This is also called a unif...
How to handle unseen features in a Naive Bayes classifier? Typically one would use Laplace smoothing, essentially adding an artificial observation of every feature for every class. This is done to avoid the issue of having never observed a feature in one cla
54,436
Island Hopping with Metropolis Algorithm
1. The problem is not about ergodicity No, this is not related to ergodicity. In the chain without cycling around, one can still move from any island to any other island, and (provided that there are differences in the populations!) the chain is not periodic (because one sometimes stays put), so the chain is ergodic, h...
Island Hopping with Metropolis Algorithm
1. The problem is not about ergodicity No, this is not related to ergodicity. In the chain without cycling around, one can still move from any island to any other island, and (provided that there are
Island Hopping with Metropolis Algorithm 1. The problem is not about ergodicity No, this is not related to ergodicity. In the chain without cycling around, one can still move from any island to any other island, and (provided that there are differences in the populations!) the chain is not periodic (because one sometim...
Island Hopping with Metropolis Algorithm 1. The problem is not about ergodicity No, this is not related to ergodicity. In the chain without cycling around, one can still move from any island to any other island, and (provided that there are
54,437
scatterplot smoothing in r with big dataset: different methods
It's actually efficient and accurate to smooth the response with a moving-window mean: this can be done on the entire dataset with a fast Fourier transform in a fraction of a second. For plotting purposes, consider subsampling both the raw data and the smooth. You can further smooth the subsampled smooth. This will ...
scatterplot smoothing in r with big dataset: different methods
It's actually efficient and accurate to smooth the response with a moving-window mean: this can be done on the entire dataset with a fast Fourier transform in a fraction of a second. For plotting pur
scatterplot smoothing in r with big dataset: different methods It's actually efficient and accurate to smooth the response with a moving-window mean: this can be done on the entire dataset with a fast Fourier transform in a fraction of a second. For plotting purposes, consider subsampling both the raw data and the smo...
scatterplot smoothing in r with big dataset: different methods It's actually efficient and accurate to smooth the response with a moving-window mean: this can be done on the entire dataset with a fast Fourier transform in a fraction of a second. For plotting pur
54,438
scatterplot smoothing in r with big dataset: different methods
I found the locfit function from the locfit package to be a good solution - it is quick and made it easy to plot by group (https://cran.r-project.org/web/packages/locfit/locfit.pdf). The scale, alpha, deg, kern, kt, acri and basis parameters control the amount of smoothing. I used it with geom_smooth: geom_smooth(metho...
scatterplot smoothing in r with big dataset: different methods
I found the locfit function from the locfit package to be a good solution - it is quick and made it easy to plot by group (https://cran.r-project.org/web/packages/locfit/locfit.pdf). The scale, alpha,
scatterplot smoothing in r with big dataset: different methods I found the locfit function from the locfit package to be a good solution - it is quick and made it easy to plot by group (https://cran.r-project.org/web/packages/locfit/locfit.pdf). The scale, alpha, deg, kern, kt, acri and basis parameters control the amo...
scatterplot smoothing in r with big dataset: different methods I found the locfit function from the locfit package to be a good solution - it is quick and made it easy to plot by group (https://cran.r-project.org/web/packages/locfit/locfit.pdf). The scale, alpha,
54,439
How to calculate SD of sample for one new observation?
Yes, it's possible. Taken from this post, the updated mean and standard deviation (SD) can be calculated as follows: $$ \bar{X}_{n} = \frac{1}{n}\left(X_{n} + (n - 1)\bar{X}_{n-1}\right) $$ Where $n$ is the sample size (including the new observation), $X_{n}$ the value of the new observation $\bar{X}_{n-1}$ is the mean...
How to calculate SD of sample for one new observation?
Yes, it's possible. Taken from this post, the updated mean and standard deviation (SD) can be calculated as follows: $$ \bar{X}_{n} = \frac{1}{n}\left(X_{n} + (n - 1)\bar{X}_{n-1}\right) $$ Where $n$
How to calculate SD of sample for one new observation? Yes, it's possible. Taken from this post, the updated mean and standard deviation (SD) can be calculated as follows: $$ \bar{X}_{n} = \frac{1}{n}\left(X_{n} + (n - 1)\bar{X}_{n-1}\right) $$ Where $n$ is the sample size (including the new observation), $X_{n}$ the v...
How to calculate SD of sample for one new observation? Yes, it's possible. Taken from this post, the updated mean and standard deviation (SD) can be calculated as follows: $$ \bar{X}_{n} = \frac{1}{n}\left(X_{n} + (n - 1)\bar{X}_{n-1}\right) $$ Where $n$
54,440
Poisson probability of observing at least one zero out of k independent cases
The answer depends on your question. Here's how I've interpreted it: You're got 5 chromosomes, you're interested in the event that any one of them is zero independent of the rest of them, and you're calling this the "total probability". You'd like to know what combination of individual rates ensures that this total ...
Poisson probability of observing at least one zero out of k independent cases
The answer depends on your question. Here's how I've interpreted it: You're got 5 chromosomes, you're interested in the event that any one of them is zero independent of the rest of them, and you're
Poisson probability of observing at least one zero out of k independent cases The answer depends on your question. Here's how I've interpreted it: You're got 5 chromosomes, you're interested in the event that any one of them is zero independent of the rest of them, and you're calling this the "total probability". Yo...
Poisson probability of observing at least one zero out of k independent cases The answer depends on your question. Here's how I've interpreted it: You're got 5 chromosomes, you're interested in the event that any one of them is zero independent of the rest of them, and you're
54,441
Poisson probability of observing at least one zero out of k independent cases
## Just repeating what you did for completion > wt <- c(2.2,6.4,3.4,10.2,4.45) > p <- ppois(q=0, lambda=wt) > > sum(ppois(q=0,lambda=wt)) [1] 0.1575537 > > tol <- .Machine$double.eps # 2.220446e-16 > wt <- seq(0,250, by=0.01) > wt[which( ppois(q=0, lambda=wt) < tol )[1]] [1] 36.05 So when the poisson rate is abo...
Poisson probability of observing at least one zero out of k independent cases
## Just repeating what you did for completion > wt <- c(2.2,6.4,3.4,10.2,4.45) > p <- ppois(q=0, lambda=wt) > > sum(ppois(q=0,lambda=wt)) [1] 0.1575537 > > tol <- .Machine$double.eps # 2.220446e-
Poisson probability of observing at least one zero out of k independent cases ## Just repeating what you did for completion > wt <- c(2.2,6.4,3.4,10.2,4.45) > p <- ppois(q=0, lambda=wt) > > sum(ppois(q=0,lambda=wt)) [1] 0.1575537 > > tol <- .Machine$double.eps # 2.220446e-16 > wt <- seq(0,250, by=0.01) > wt[which...
Poisson probability of observing at least one zero out of k independent cases ## Just repeating what you did for completion > wt <- c(2.2,6.4,3.4,10.2,4.45) > p <- ppois(q=0, lambda=wt) > > sum(ppois(q=0,lambda=wt)) [1] 0.1575537 > > tol <- .Machine$double.eps # 2.220446e-
54,442
How can one construct a cumulative probability distribution function from 2 others?
The question asks for the expected time to complete both of two independent tasks. Call these times $X_1$ and $X_2$: they are random variables supported on $[0,\infty)$. Let $F_i$ be the cumulative distribution functions (CDF) of the $X_i$: $$F_i(x) = \Pr(X_i\le x).$$ The time to complete both tasks is $Y =\max(X_1,X_...
How can one construct a cumulative probability distribution function from 2 others?
The question asks for the expected time to complete both of two independent tasks. Call these times $X_1$ and $X_2$: they are random variables supported on $[0,\infty)$. Let $F_i$ be the cumulative d
How can one construct a cumulative probability distribution function from 2 others? The question asks for the expected time to complete both of two independent tasks. Call these times $X_1$ and $X_2$: they are random variables supported on $[0,\infty)$. Let $F_i$ be the cumulative distribution functions (CDF) of the $...
How can one construct a cumulative probability distribution function from 2 others? The question asks for the expected time to complete both of two independent tasks. Call these times $X_1$ and $X_2$: they are random variables supported on $[0,\infty)$. Let $F_i$ be the cumulative d
54,443
Synthetic Control Method
Let's start with a standard regression setup where you are trying to estimate the effect in a fixed-effect model when you only have a single country that received "treatment" (entering the Euro). This strategy assumes that, conditional on observables, the average of the other countries serves as a reasonable counterfac...
Synthetic Control Method
Let's start with a standard regression setup where you are trying to estimate the effect in a fixed-effect model when you only have a single country that received "treatment" (entering the Euro). This
Synthetic Control Method Let's start with a standard regression setup where you are trying to estimate the effect in a fixed-effect model when you only have a single country that received "treatment" (entering the Euro). This strategy assumes that, conditional on observables, the average of the other countries serves a...
Synthetic Control Method Let's start with a standard regression setup where you are trying to estimate the effect in a fixed-effect model when you only have a single country that received "treatment" (entering the Euro). This
54,444
Synthetic Control Method
The impact of being a member of euro on growth rate vs. not being a member is the difference of the growth rate from being a member and the growth rate if the country is not a member. This difference is calculated over different periods after joining the eurozone. The problem is that the growth rate if the country is n...
Synthetic Control Method
The impact of being a member of euro on growth rate vs. not being a member is the difference of the growth rate from being a member and the growth rate if the country is not a member. This difference
Synthetic Control Method The impact of being a member of euro on growth rate vs. not being a member is the difference of the growth rate from being a member and the growth rate if the country is not a member. This difference is calculated over different periods after joining the eurozone. The problem is that the growth...
Synthetic Control Method The impact of being a member of euro on growth rate vs. not being a member is the difference of the growth rate from being a member and the growth rate if the country is not a member. This difference
54,445
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test?
E.L. Lehmann, J.P. Romano. Testing Statistical Hypotheses. 3rd ed. Springer, 2005. P. 136: P(-), P(+) and P(0) denote the probabilities of preference for product [A over B, B over A, or A=B, tie], ... The hypothesis to be tested H0: P(+)=P(-) ... The problem reduces to that of testing the hypothesis P=1/2 in a b...
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test?
E.L. Lehmann, J.P. Romano. Testing Statistical Hypotheses. 3rd ed. Springer, 2005. P. 136: P(-), P(+) and P(0) denote the probabilities of preference for product [A over B, B over A, or A=B, tie],
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test? E.L. Lehmann, J.P. Romano. Testing Statistical Hypotheses. 3rd ed. Springer, 2005. P. 136: P(-), P(+) and P(0) denote the probabilities of preference for product [A over B, B over A, or A=B, tie], ... The hypothesis to be tested ...
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test? E.L. Lehmann, J.P. Romano. Testing Statistical Hypotheses. 3rd ed. Springer, 2005. P. 136: P(-), P(+) and P(0) denote the probabilities of preference for product [A over B, B over A, or A=B, tie],
54,446
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test?
I don't see how this would be helpful, or even possible. McNemar's test only uses the discordant pairs. The Wikipedia page states: The McNemar test statistic is: $$ \chi^2 = {(b-c)^2 \over b+c}. $$ I have a lengthy explanation of McNemar's test here: What is the difference between McNemar's test and the c...
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test?
I don't see how this would be helpful, or even possible. McNemar's test only uses the discordant pairs. The Wikipedia page states: The McNemar test statistic is: $$ \chi^2 = {(b-c)^2 \over
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test? I don't see how this would be helpful, or even possible. McNemar's test only uses the discordant pairs. The Wikipedia page states: The McNemar test statistic is: $$ \chi^2 = {(b-c)^2 \over b+c}. $$ I have a lengthy exp...
Can McNemar's test be improved upon by adjustments for zeros like those in a sign test? I don't see how this would be helpful, or even possible. McNemar's test only uses the discordant pairs. The Wikipedia page states: The McNemar test statistic is: $$ \chi^2 = {(b-c)^2 \over
54,447
MCMC Modelling - can this even be solved?
I'll record my modelling thoughts as I create it: import pymc as pm How can I recreate this data? Well, N_T cars enter. Do I know N_T? No, so it's a random variable. For simplicity, I'll say its a discrete uniform with max 1000 (you can change this to, say, a Poisson) N_T = pm.DiscreteUniform('N_T', 0, 1000) Of these...
MCMC Modelling - can this even be solved?
I'll record my modelling thoughts as I create it: import pymc as pm How can I recreate this data? Well, N_T cars enter. Do I know N_T? No, so it's a random variable. For simplicity, I'll say its a di
MCMC Modelling - can this even be solved? I'll record my modelling thoughts as I create it: import pymc as pm How can I recreate this data? Well, N_T cars enter. Do I know N_T? No, so it's a random variable. For simplicity, I'll say its a discrete uniform with max 1000 (you can change this to, say, a Poisson) N_T = pm...
MCMC Modelling - can this even be solved? I'll record my modelling thoughts as I create it: import pymc as pm How can I recreate this data? Well, N_T cars enter. Do I know N_T? No, so it's a random variable. For simplicity, I'll say its a di
54,448
One sample median test: Wilcoxon, sign test or chi squared
One-sample sign test tests that the median in the population equals the value. One-sample Wilcoxon test tests that the distribution in the population is symmetric around the value. More technically, that the sum of two randomly chosen deviations from the value has equal probability to occure positive or negative. Note ...
One sample median test: Wilcoxon, sign test or chi squared
One-sample sign test tests that the median in the population equals the value. One-sample Wilcoxon test tests that the distribution in the population is symmetric around the value. More technically, t
One sample median test: Wilcoxon, sign test or chi squared One-sample sign test tests that the median in the population equals the value. One-sample Wilcoxon test tests that the distribution in the population is symmetric around the value. More technically, that the sum of two randomly chosen deviations from the value ...
One sample median test: Wilcoxon, sign test or chi squared One-sample sign test tests that the median in the population equals the value. One-sample Wilcoxon test tests that the distribution in the population is symmetric around the value. More technically, t
54,449
R-squared to compare forecasting techniques
In-sample fit such as $R^2$ is even more frowned upon as a measure of model quality in forecasting than in other statistical subdisciplines, for all the well-known reasons (if you make your model more and more complex, you will get better and better in-sample fits... but ever worse out-of-sample forecast accuracy). If ...
R-squared to compare forecasting techniques
In-sample fit such as $R^2$ is even more frowned upon as a measure of model quality in forecasting than in other statistical subdisciplines, for all the well-known reasons (if you make your model more
R-squared to compare forecasting techniques In-sample fit such as $R^2$ is even more frowned upon as a measure of model quality in forecasting than in other statistical subdisciplines, for all the well-known reasons (if you make your model more and more complex, you will get better and better in-sample fits... but ever...
R-squared to compare forecasting techniques In-sample fit such as $R^2$ is even more frowned upon as a measure of model quality in forecasting than in other statistical subdisciplines, for all the well-known reasons (if you make your model more
54,450
When to divide data into training & test set in logistic regression?
I do not think you need to divide the set if you are interested in the significance of a coefficient and not in prediction. Cross validation is used to judge the prediction error outside the sample used to estimate the model. Typically, the objective will be to tune some parameter that is not being estimated from the...
When to divide data into training & test set in logistic regression?
I do not think you need to divide the set if you are interested in the significance of a coefficient and not in prediction. Cross validation is used to judge the prediction error outside the sample u
When to divide data into training & test set in logistic regression? I do not think you need to divide the set if you are interested in the significance of a coefficient and not in prediction. Cross validation is used to judge the prediction error outside the sample used to estimate the model. Typically, the objectiv...
When to divide data into training & test set in logistic regression? I do not think you need to divide the set if you are interested in the significance of a coefficient and not in prediction. Cross validation is used to judge the prediction error outside the sample u
54,451
When to divide data into training & test set in logistic regression?
(1) Split sample is likely not the conventional way to approach this problem. Obviously conventions differ by fields of research and subject area. But I don't think it is unreasonable to say that bootstrapping for optimism would be the standard here, and I think you would have to justify in some detail if you were plan...
When to divide data into training & test set in logistic regression?
(1) Split sample is likely not the conventional way to approach this problem. Obviously conventions differ by fields of research and subject area. But I don't think it is unreasonable to say that boot
When to divide data into training & test set in logistic regression? (1) Split sample is likely not the conventional way to approach this problem. Obviously conventions differ by fields of research and subject area. But I don't think it is unreasonable to say that bootstrapping for optimism would be the standard here, ...
When to divide data into training & test set in logistic regression? (1) Split sample is likely not the conventional way to approach this problem. Obviously conventions differ by fields of research and subject area. But I don't think it is unreasonable to say that boot
54,452
When to divide data into training & test set in logistic regression?
Why not use cross validation, maybe with a higher X, like 10X. LOOCV might also be interesting but that could go really slowly. You could alternatively do some kind of more fancy custom CV where you leave one of the 420 positive events out, and the same proportion of the negative events (1/420 of them to preserve the ...
When to divide data into training & test set in logistic regression?
Why not use cross validation, maybe with a higher X, like 10X. LOOCV might also be interesting but that could go really slowly. You could alternatively do some kind of more fancy custom CV where you
When to divide data into training & test set in logistic regression? Why not use cross validation, maybe with a higher X, like 10X. LOOCV might also be interesting but that could go really slowly. You could alternatively do some kind of more fancy custom CV where you leave one of the 420 positive events out, and the s...
When to divide data into training & test set in logistic regression? Why not use cross validation, maybe with a higher X, like 10X. LOOCV might also be interesting but that could go really slowly. You could alternatively do some kind of more fancy custom CV where you
54,453
Fitting data sample to a distribution
The bins in your histogram are a bit too wide (the default has too few bins), making it hard to discern the shape clearly. The QQ-plot suggests that a finite mixture of perhaps two or three components, possibly of something right skew, perhaps like gamma distributions.
Fitting data sample to a distribution
The bins in your histogram are a bit too wide (the default has too few bins), making it hard to discern the shape clearly. The QQ-plot suggests that a finite mixture of perhaps two or three component
Fitting data sample to a distribution The bins in your histogram are a bit too wide (the default has too few bins), making it hard to discern the shape clearly. The QQ-plot suggests that a finite mixture of perhaps two or three components, possibly of something right skew, perhaps like gamma distributions.
Fitting data sample to a distribution The bins in your histogram are a bit too wide (the default has too few bins), making it hard to discern the shape clearly. The QQ-plot suggests that a finite mixture of perhaps two or three component
54,454
Fitting data sample to a distribution
Have you tried a gamma distribution? That is a little more flexible than a log-normal and typically has thinner tails, which appear to be where your fit is lacking. If that doesn't work, you might want to click through this list on wikipedia. There are many choices for distributions with positive support, and of cours...
Fitting data sample to a distribution
Have you tried a gamma distribution? That is a little more flexible than a log-normal and typically has thinner tails, which appear to be where your fit is lacking. If that doesn't work, you might wa
Fitting data sample to a distribution Have you tried a gamma distribution? That is a little more flexible than a log-normal and typically has thinner tails, which appear to be where your fit is lacking. If that doesn't work, you might want to click through this list on wikipedia. There are many choices for distributio...
Fitting data sample to a distribution Have you tried a gamma distribution? That is a little more flexible than a log-normal and typically has thinner tails, which appear to be where your fit is lacking. If that doesn't work, you might wa
54,455
What are pros and cons of empirical Bayesian methods?
So we are clear, the idea is that I have data $Y \sim f(Y \mid \theta)$ and have a prior $\theta \sim \pi(\theta \mid \eta)$. Then the joint is $$ J(Y, \theta \mid \eta) = f(Y\mid \theta)\pi(\theta\mid \eta) $$ and the marginal of $Y$ is $$ m(Y\mid\eta)=\int f(Y\mid\theta) \pi(\theta\mid\eta) \ d\theta. $$ The empiric...
What are pros and cons of empirical Bayesian methods?
So we are clear, the idea is that I have data $Y \sim f(Y \mid \theta)$ and have a prior $\theta \sim \pi(\theta \mid \eta)$. Then the joint is $$ J(Y, \theta \mid \eta) = f(Y\mid \theta)\pi(\theta\mi
What are pros and cons of empirical Bayesian methods? So we are clear, the idea is that I have data $Y \sim f(Y \mid \theta)$ and have a prior $\theta \sim \pi(\theta \mid \eta)$. Then the joint is $$ J(Y, \theta \mid \eta) = f(Y\mid \theta)\pi(\theta\mid \eta) $$ and the marginal of $Y$ is $$ m(Y\mid\eta)=\int f(Y\mi...
What are pros and cons of empirical Bayesian methods? So we are clear, the idea is that I have data $Y \sim f(Y \mid \theta)$ and have a prior $\theta \sim \pi(\theta \mid \eta)$. Then the joint is $$ J(Y, \theta \mid \eta) = f(Y\mid \theta)\pi(\theta\mi
54,456
Entropy of generalized distributions?
Typical Shannon entropy, on discrete set of probabilities, needs to be positive, as it is average of non-negative numbers, i.e. $$\sum_i p_i \left(\tfrac{1}{p_i}\right).$$ Differential entropy need not to be positive. It is $$\int p(x) \log\left(\tfrac{1}{p(x)}\right) dx,$$ which does not need to be positive. $p(x)$ is...
Entropy of generalized distributions?
Typical Shannon entropy, on discrete set of probabilities, needs to be positive, as it is average of non-negative numbers, i.e. $$\sum_i p_i \left(\tfrac{1}{p_i}\right).$$ Differential entropy need no
Entropy of generalized distributions? Typical Shannon entropy, on discrete set of probabilities, needs to be positive, as it is average of non-negative numbers, i.e. $$\sum_i p_i \left(\tfrac{1}{p_i}\right).$$ Differential entropy need not to be positive. It is $$\int p(x) \log\left(\tfrac{1}{p(x)}\right) dx,$$ which d...
Entropy of generalized distributions? Typical Shannon entropy, on discrete set of probabilities, needs to be positive, as it is average of non-negative numbers, i.e. $$\sum_i p_i \left(\tfrac{1}{p_i}\right).$$ Differential entropy need no
54,457
What can be inferred from a 95% confidence interval on a correlation coefficient?
All you can say is the sample Pearson's correlation coefficient (r) in contained in the interval from 0.24 to 0.78. You are 95% confident that you will detect a significantly different correlation when testing values outside this interval. What this means is that variable X has some degree of positive linear relationsh...
What can be inferred from a 95% confidence interval on a correlation coefficient?
All you can say is the sample Pearson's correlation coefficient (r) in contained in the interval from 0.24 to 0.78. You are 95% confident that you will detect a significantly different correlation whe
What can be inferred from a 95% confidence interval on a correlation coefficient? All you can say is the sample Pearson's correlation coefficient (r) in contained in the interval from 0.24 to 0.78. You are 95% confident that you will detect a significantly different correlation when testing values outside this interval...
What can be inferred from a 95% confidence interval on a correlation coefficient? All you can say is the sample Pearson's correlation coefficient (r) in contained in the interval from 0.24 to 0.78. You are 95% confident that you will detect a significantly different correlation whe
54,458
What can be inferred from a 95% confidence interval on a correlation coefficient?
I make this comment from the perspective of someone who is analytical but who is not an expert in statistics. One of the reasons for doing a linear regression is to get an answer to the question as to whether the values of two variables, x and y, are independent of each other. Alternatively, the data set may contain...
What can be inferred from a 95% confidence interval on a correlation coefficient?
I make this comment from the perspective of someone who is analytical but who is not an expert in statistics. One of the reasons for doing a linear regression is to get an answer to the question as
What can be inferred from a 95% confidence interval on a correlation coefficient? I make this comment from the perspective of someone who is analytical but who is not an expert in statistics. One of the reasons for doing a linear regression is to get an answer to the question as to whether the values of two variables...
What can be inferred from a 95% confidence interval on a correlation coefficient? I make this comment from the perspective of someone who is analytical but who is not an expert in statistics. One of the reasons for doing a linear regression is to get an answer to the question as
54,459
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Randomization/Bootstrap)
I am not a big expert on statistical testing, but the approach you are considering decidedly does not make sense. Imagine that the groups are indeed identical (i.e. null hypothesis is true). Then you will observe p<0.05 in exactly 5% of the cases, and e.g. p<0.01 in 1% of the cases (those would be false positives). So ...
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Rand
I am not a big expert on statistical testing, but the approach you are considering decidedly does not make sense. Imagine that the groups are indeed identical (i.e. null hypothesis is true). Then you
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Randomization/Bootstrap) I am not a big expert on statistical testing, but the approach you are considering decidedly does not make sense. Imagine that the groups are indeed identical (i.e. null hypothesis is true). Then you...
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Rand I am not a big expert on statistical testing, but the approach you are considering decidedly does not make sense. Imagine that the groups are indeed identical (i.e. null hypothesis is true). Then you
54,460
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Randomization/Bootstrap)
Your approach does not make sense. The usual Wilcoxon-test will answer you with high power. Your approach looses this advantage. It may however be reasonable to be afrait of too much power, because even irrelevant differences will show up significant, which would in fact distract the scientist interested in a relevant ...
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Rand
Your approach does not make sense. The usual Wilcoxon-test will answer you with high power. Your approach looses this advantage. It may however be reasonable to be afrait of too much power, because ev
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Randomization/Bootstrap) Your approach does not make sense. The usual Wilcoxon-test will answer you with high power. Your approach looses this advantage. It may however be reasonable to be afrait of too much power, because e...
How to compare two non-normally distributed samples with very different sizes? (Mann-Whitney vs Rand Your approach does not make sense. The usual Wilcoxon-test will answer you with high power. Your approach looses this advantage. It may however be reasonable to be afrait of too much power, because ev
54,461
What is the name of a plot of - log 10 of p values in multiple testing?
Geneticists call this a "Manhattan plot". Usually the bars are thicker, with no gap in between, so it looks (sort of kind of) like the New York skyline.
What is the name of a plot of - log 10 of p values in multiple testing?
Geneticists call this a "Manhattan plot". Usually the bars are thicker, with no gap in between, so it looks (sort of kind of) like the New York skyline.
What is the name of a plot of - log 10 of p values in multiple testing? Geneticists call this a "Manhattan plot". Usually the bars are thicker, with no gap in between, so it looks (sort of kind of) like the New York skyline.
What is the name of a plot of - log 10 of p values in multiple testing? Geneticists call this a "Manhattan plot". Usually the bars are thicker, with no gap in between, so it looks (sort of kind of) like the New York skyline.
54,462
What is the name of a plot of - log 10 of p values in multiple testing?
A plot of vertical lines is often called a "Needle Plot". See Graphics with R (section 3.7.3) or SAS doc. Normally there is a shared baseline for the needles, making it conceptually like a bar chart. Your code suggests a baseline of 0 segments(seq(sigs), 0, seq(sigs), -log(sigs, base=10)), but your image looks more lik...
What is the name of a plot of - log 10 of p values in multiple testing?
A plot of vertical lines is often called a "Needle Plot". See Graphics with R (section 3.7.3) or SAS doc. Normally there is a shared baseline for the needles, making it conceptually like a bar chart.
What is the name of a plot of - log 10 of p values in multiple testing? A plot of vertical lines is often called a "Needle Plot". See Graphics with R (section 3.7.3) or SAS doc. Normally there is a shared baseline for the needles, making it conceptually like a bar chart. Your code suggests a baseline of 0 segments(seq(...
What is the name of a plot of - log 10 of p values in multiple testing? A plot of vertical lines is often called a "Needle Plot". See Graphics with R (section 3.7.3) or SAS doc. Normally there is a shared baseline for the needles, making it conceptually like a bar chart.
54,463
Convert a categorical variable to a numerical variable prior to regression
1) Why do you want to convert race into numbers? I'm assuming you want to do something like a regression model, is that correct? I'm going to assume you're asking how to handle "categorical data" (categories like different races) in regression. So, you want numerical variables, and you could just assign a number to e...
Convert a categorical variable to a numerical variable prior to regression
1) Why do you want to convert race into numbers? I'm assuming you want to do something like a regression model, is that correct? I'm going to assume you're asking how to handle "categorical data" (c
Convert a categorical variable to a numerical variable prior to regression 1) Why do you want to convert race into numbers? I'm assuming you want to do something like a regression model, is that correct? I'm going to assume you're asking how to handle "categorical data" (categories like different races) in regression...
Convert a categorical variable to a numerical variable prior to regression 1) Why do you want to convert race into numbers? I'm assuming you want to do something like a regression model, is that correct? I'm going to assume you're asking how to handle "categorical data" (c
54,464
Convert a categorical variable to a numerical variable prior to regression
Answer for your questions: 1) how do I convert the race into numbers to make my model more accurate? -> I think answer lies in which tool you are using for analysis. Most of the tool have facility to convert attributes/factor in appropriate inputs. To explain your first question you can refer following link: You can fi...
Convert a categorical variable to a numerical variable prior to regression
Answer for your questions: 1) how do I convert the race into numbers to make my model more accurate? -> I think answer lies in which tool you are using for analysis. Most of the tool have facility to
Convert a categorical variable to a numerical variable prior to regression Answer for your questions: 1) how do I convert the race into numbers to make my model more accurate? -> I think answer lies in which tool you are using for analysis. Most of the tool have facility to convert attributes/factor in appropriate inpu...
Convert a categorical variable to a numerical variable prior to regression Answer for your questions: 1) how do I convert the race into numbers to make my model more accurate? -> I think answer lies in which tool you are using for analysis. Most of the tool have facility to
54,465
Which neural network is better?
Hint: The main difference between using one network for all the diseases is that in that case, the hidden layer might learn some features that can be shared between the disease-predicting outputs. Why do you think training individual models will take more time?
Which neural network is better?
Hint: The main difference between using one network for all the diseases is that in that case, the hidden layer might learn some features that can be shared between the disease-predicting outputs. Why
Which neural network is better? Hint: The main difference between using one network for all the diseases is that in that case, the hidden layer might learn some features that can be shared between the disease-predicting outputs. Why do you think training individual models will take more time?
Which neural network is better? Hint: The main difference between using one network for all the diseases is that in that case, the hidden layer might learn some features that can be shared between the disease-predicting outputs. Why
54,466
Which neural network is better?
If the diseases are mutually exclusive (i.e. the probability of having more than one disease at the same time is negligible), e.g. for differential diagnosis, then using a single network with a softmax activation function in the output layer would be a good idea. That would make the shared hidden units more effective,...
Which neural network is better?
If the diseases are mutually exclusive (i.e. the probability of having more than one disease at the same time is negligible), e.g. for differential diagnosis, then using a single network with a softma
Which neural network is better? If the diseases are mutually exclusive (i.e. the probability of having more than one disease at the same time is negligible), e.g. for differential diagnosis, then using a single network with a softmax activation function in the output layer would be a good idea. That would make the sha...
Which neural network is better? If the diseases are mutually exclusive (i.e. the probability of having more than one disease at the same time is negligible), e.g. for differential diagnosis, then using a single network with a softma
54,467
Which neural network is better?
Depends on how your data's distributed and if your outcomes are correlated (or not). Why not try out both methods and convince yourself which one is better and why. There's no free lunch and sometimes the results can be completely different from your intuitions / hypothesis. Here are some general hints: Make sure you...
Which neural network is better?
Depends on how your data's distributed and if your outcomes are correlated (or not). Why not try out both methods and convince yourself which one is better and why. There's no free lunch and sometime
Which neural network is better? Depends on how your data's distributed and if your outcomes are correlated (or not). Why not try out both methods and convince yourself which one is better and why. There's no free lunch and sometimes the results can be completely different from your intuitions / hypothesis. Here are s...
Which neural network is better? Depends on how your data's distributed and if your outcomes are correlated (or not). Why not try out both methods and convince yourself which one is better and why. There's no free lunch and sometime
54,468
Hypothesis testing for a correlation that is zero or negative
Strange that no direct answer to the original question has been given (even though @Nick Stauner and @Glen_b nicely elaborated on possibly superior alternatives). The wikipedia article discusses various methods, including the following, which is probably the most direct answer. A one-sided hypothesis test on a correlat...
Hypothesis testing for a correlation that is zero or negative
Strange that no direct answer to the original question has been given (even though @Nick Stauner and @Glen_b nicely elaborated on possibly superior alternatives). The wikipedia article discusses vario
Hypothesis testing for a correlation that is zero or negative Strange that no direct answer to the original question has been given (even though @Nick Stauner and @Glen_b nicely elaborated on possibly superior alternatives). The wikipedia article discusses various methods, including the following, which is probably the...
Hypothesis testing for a correlation that is zero or negative Strange that no direct answer to the original question has been given (even though @Nick Stauner and @Glen_b nicely elaborated on possibly superior alternatives). The wikipedia article discusses vario
54,469
Hypothesis testing for a correlation that is zero or negative
You might achieve what you're really after (if it's not exactly what you've asked, which is interesting in its own right; +1 and welcome to CV!) rather simply by fitting a confidence interval (CI) around the correlation (I see @Glen_b suggested this in a comment too). If your correlation is significantly negative, a 95...
Hypothesis testing for a correlation that is zero or negative
You might achieve what you're really after (if it's not exactly what you've asked, which is interesting in its own right; +1 and welcome to CV!) rather simply by fitting a confidence interval (CI) aro
Hypothesis testing for a correlation that is zero or negative You might achieve what you're really after (if it's not exactly what you've asked, which is interesting in its own right; +1 and welcome to CV!) rather simply by fitting a confidence interval (CI) around the correlation (I see @Glen_b suggested this in a com...
Hypothesis testing for a correlation that is zero or negative You might achieve what you're really after (if it's not exactly what you've asked, which is interesting in its own right; +1 and welcome to CV!) rather simply by fitting a confidence interval (CI) aro
54,470
Hypothesis testing for a correlation that is zero or negative
The simplest way to do so (for Pearson correlation) is to use Fisher's z-transformation. Let r be the correlation in question. Let n be the sample size used to acquire the correlation. tanh is the hyperbolic tangent atanh or $\tanh^{-1}$ is the inverse hyperbolic tangent. Let z = atanh(r), then z is normally distribute...
Hypothesis testing for a correlation that is zero or negative
The simplest way to do so (for Pearson correlation) is to use Fisher's z-transformation. Let r be the correlation in question. Let n be the sample size used to acquire the correlation. tanh is the hyp
Hypothesis testing for a correlation that is zero or negative The simplest way to do so (for Pearson correlation) is to use Fisher's z-transformation. Let r be the correlation in question. Let n be the sample size used to acquire the correlation. tanh is the hyperbolic tangent atanh or $\tanh^{-1}$ is the inverse hyper...
Hypothesis testing for a correlation that is zero or negative The simplest way to do so (for Pearson correlation) is to use Fisher's z-transformation. Let r be the correlation in question. Let n be the sample size used to acquire the correlation. tanh is the hyp
54,471
What could it mean to "Rotate" a distribution? [duplicate]
The direct analogy is pretty clear: To make it simple we'll assume it's for a continuous random variable on $(a,b)$. Without loss of generality, let $c=b-a$ and consider the corresponding variable on $(0,c)$; call that random variable $X$. Now imagine a very thin rod of length $c$, whose density (mass per element of le...
What could it mean to "Rotate" a distribution? [duplicate]
The direct analogy is pretty clear: To make it simple we'll assume it's for a continuous random variable on $(a,b)$. Without loss of generality, let $c=b-a$ and consider the corresponding variable on
What could it mean to "Rotate" a distribution? [duplicate] The direct analogy is pretty clear: To make it simple we'll assume it's for a continuous random variable on $(a,b)$. Without loss of generality, let $c=b-a$ and consider the corresponding variable on $(0,c)$; call that random variable $X$. Now imagine a very th...
What could it mean to "Rotate" a distribution? [duplicate] The direct analogy is pretty clear: To make it simple we'll assume it's for a continuous random variable on $(a,b)$. Without loss of generality, let $c=b-a$ and consider the corresponding variable on
54,472
What could it mean to "Rotate" a distribution? [duplicate]
If you have greater variance, then you need to expend a greater effort (meaning, spend more money collecting the data) to obtain a given level of precision. The precision for $\bar X$ is of course is the inverse standard deviation, $\sqrt{n}/\sigma$.
What could it mean to "Rotate" a distribution? [duplicate]
If you have greater variance, then you need to expend a greater effort (meaning, spend more money collecting the data) to obtain a given level of precision. The precision for $\bar X$ is of course is
What could it mean to "Rotate" a distribution? [duplicate] If you have greater variance, then you need to expend a greater effort (meaning, spend more money collecting the data) to obtain a given level of precision. The precision for $\bar X$ is of course is the inverse standard deviation, $\sqrt{n}/\sigma$.
What could it mean to "Rotate" a distribution? [duplicate] If you have greater variance, then you need to expend a greater effort (meaning, spend more money collecting the data) to obtain a given level of precision. The precision for $\bar X$ is of course is
54,473
What could it mean to "Rotate" a distribution? [duplicate]
In signals, variance is essentially a measure of energy. Of course in this case they are related directly, not inversely.
What could it mean to "Rotate" a distribution? [duplicate]
In signals, variance is essentially a measure of energy. Of course in this case they are related directly, not inversely.
What could it mean to "Rotate" a distribution? [duplicate] In signals, variance is essentially a measure of energy. Of course in this case they are related directly, not inversely.
What could it mean to "Rotate" a distribution? [duplicate] In signals, variance is essentially a measure of energy. Of course in this case they are related directly, not inversely.
54,474
Is this statement about the conditional expectation of a sum true?
Suppose that $X$ and $Y$ are integrable. The conditional expectation $\mathrm{E}[X\mid Z]$ is a random variable that satisfies $$ \int_A \mathrm{E}[X\mid Z]\,dP = \int_A X\,dP $$ for every $A$ in $\sigma(Z)$, the sigma-field generated by $Z$, and is $\sigma(Z)$-measurable. Hence, $$ \int_A \left(\mathrm{E}[X\mid Z]...
Is this statement about the conditional expectation of a sum true?
Suppose that $X$ and $Y$ are integrable. The conditional expectation $\mathrm{E}[X\mid Z]$ is a random variable that satisfies $$ \int_A \mathrm{E}[X\mid Z]\,dP = \int_A X\,dP $$ for every $A$ in $\
Is this statement about the conditional expectation of a sum true? Suppose that $X$ and $Y$ are integrable. The conditional expectation $\mathrm{E}[X\mid Z]$ is a random variable that satisfies $$ \int_A \mathrm{E}[X\mid Z]\,dP = \int_A X\,dP $$ for every $A$ in $\sigma(Z)$, the sigma-field generated by $Z$, and is $...
Is this statement about the conditional expectation of a sum true? Suppose that $X$ and $Y$ are integrable. The conditional expectation $\mathrm{E}[X\mid Z]$ is a random variable that satisfies $$ \int_A \mathrm{E}[X\mid Z]\,dP = \int_A X\,dP $$ for every $A$ in $\
54,475
Jarque-Bera normality test in R
You may have misunderstood something about hypothesis testing or maybe about goodness-of-fit tests, or perhaps specifically about the "Jarque-Bera" test*. Note that you reject when the p-value is small, when happens when the skewness and kurtosis differ from their expected values under normality. The test statistic is...
Jarque-Bera normality test in R
You may have misunderstood something about hypothesis testing or maybe about goodness-of-fit tests, or perhaps specifically about the "Jarque-Bera" test*. Note that you reject when the p-value is sma
Jarque-Bera normality test in R You may have misunderstood something about hypothesis testing or maybe about goodness-of-fit tests, or perhaps specifically about the "Jarque-Bera" test*. Note that you reject when the p-value is small, when happens when the skewness and kurtosis differ from their expected values under ...
Jarque-Bera normality test in R You may have misunderstood something about hypothesis testing or maybe about goodness-of-fit tests, or perhaps specifically about the "Jarque-Bera" test*. Note that you reject when the p-value is sma
54,476
Kaplan Meier survival estimate at t=infinite
When different from zero at the largest event time (i.e. when the largest observation is censored), the Kaplan-Meier estimator is usually undefined from that point on. There exist methods for completing the Kaplan-Meier estimator (for example, see here). In any case, the underlying survival function decreases to zero, ...
Kaplan Meier survival estimate at t=infinite
When different from zero at the largest event time (i.e. when the largest observation is censored), the Kaplan-Meier estimator is usually undefined from that point on. There exist methods for completi
Kaplan Meier survival estimate at t=infinite When different from zero at the largest event time (i.e. when the largest observation is censored), the Kaplan-Meier estimator is usually undefined from that point on. There exist methods for completing the Kaplan-Meier estimator (for example, see here). In any case, the und...
Kaplan Meier survival estimate at t=infinite When different from zero at the largest event time (i.e. when the largest observation is censored), the Kaplan-Meier estimator is usually undefined from that point on. There exist methods for completi
54,477
Kaplan Meier survival estimate at t=infinite
The Kaplan-Meier method computes the actual observed percent survival at each time a subject dies in your experiment. It describes your data, taking into account censoring. No theoretical model. No extrapolation. Any assumption about survival at infinite times needs to be based on a model, so is beyond Kaplan and Meie...
Kaplan Meier survival estimate at t=infinite
The Kaplan-Meier method computes the actual observed percent survival at each time a subject dies in your experiment. It describes your data, taking into account censoring. No theoretical model. No ex
Kaplan Meier survival estimate at t=infinite The Kaplan-Meier method computes the actual observed percent survival at each time a subject dies in your experiment. It describes your data, taking into account censoring. No theoretical model. No extrapolation. Any assumption about survival at infinite times needs to be b...
Kaplan Meier survival estimate at t=infinite The Kaplan-Meier method computes the actual observed percent survival at each time a subject dies in your experiment. It describes your data, taking into account censoring. No theoretical model. No ex
54,478
Using the normal equations to calculate coefficients in multiple linear regression
@MichaelMayer has it right. Try the following: > y <- c(1,2,3,4,5) > x0 <- c(1,1,1,1,1) # vector of ones representing the intercept > x1 <- c(1,2,3,4,5) > x2 <- c(1,4,5,7,9) > Y <- as.matrix(y) > X <- as.matrix(cbind(x0,x1,x2)) > beta = solve(t(X) %*% X) %*% (t(X) %*% Y) ; Update: Even with the above changes you wi...
Using the normal equations to calculate coefficients in multiple linear regression
@MichaelMayer has it right. Try the following: > y <- c(1,2,3,4,5) > x0 <- c(1,1,1,1,1) # vector of ones representing the intercept > x1 <- c(1,2,3,4,5) > x2 <- c(1,4,5,7,9) > Y <- as.matrix(y) > X
Using the normal equations to calculate coefficients in multiple linear regression @MichaelMayer has it right. Try the following: > y <- c(1,2,3,4,5) > x0 <- c(1,1,1,1,1) # vector of ones representing the intercept > x1 <- c(1,2,3,4,5) > x2 <- c(1,4,5,7,9) > Y <- as.matrix(y) > X <- as.matrix(cbind(x0,x1,x2)) > beta...
Using the normal equations to calculate coefficients in multiple linear regression @MichaelMayer has it right. Try the following: > y <- c(1,2,3,4,5) > x0 <- c(1,1,1,1,1) # vector of ones representing the intercept > x1 <- c(1,2,3,4,5) > x2 <- c(1,4,5,7,9) > Y <- as.matrix(y) > X
54,479
Meaning of covariance matrix row sums
The sum of all the elements of the covariance matrix is the variance of the sum of the random variables involved: $$\operatorname {Var} \left(\sum_i^nX_i\right) = \sum_i^n\operatorname {Var}(X_i) + 2\sum_{i\neq j}\operatorname {Cov}(X_i,X_j)$$ The sum of row $i$ is $$\operatorname {Var}(X_i) + \sum_{i\neq j}\operatorn...
Meaning of covariance matrix row sums
The sum of all the elements of the covariance matrix is the variance of the sum of the random variables involved: $$\operatorname {Var} \left(\sum_i^nX_i\right) = \sum_i^n\operatorname {Var}(X_i) + 2\
Meaning of covariance matrix row sums The sum of all the elements of the covariance matrix is the variance of the sum of the random variables involved: $$\operatorname {Var} \left(\sum_i^nX_i\right) = \sum_i^n\operatorname {Var}(X_i) + 2\sum_{i\neq j}\operatorname {Cov}(X_i,X_j)$$ The sum of row $i$ is $$\operatorname...
Meaning of covariance matrix row sums The sum of all the elements of the covariance matrix is the variance of the sum of the random variables involved: $$\operatorname {Var} \left(\sum_i^nX_i\right) = \sum_i^n\operatorname {Var}(X_i) + 2\
54,480
How to find the number of clusters in 1d data and the mean of each
Don't run clustering (such as k-means) on 1-dimensional data. Why: 1-dimensional data can be sorted. Algorithms that exploit sorting are much more efficient than algorithms that do not exploit this. Look at classic statistics And forget about buzzwords such as "data mining" and "clustering"! For your task, I recommend ...
How to find the number of clusters in 1d data and the mean of each
Don't run clustering (such as k-means) on 1-dimensional data. Why: 1-dimensional data can be sorted. Algorithms that exploit sorting are much more efficient than algorithms that do not exploit this. L
How to find the number of clusters in 1d data and the mean of each Don't run clustering (such as k-means) on 1-dimensional data. Why: 1-dimensional data can be sorted. Algorithms that exploit sorting are much more efficient than algorithms that do not exploit this. Look at classic statistics And forget about buzzwords ...
How to find the number of clusters in 1d data and the mean of each Don't run clustering (such as k-means) on 1-dimensional data. Why: 1-dimensional data can be sorted. Algorithms that exploit sorting are much more efficient than algorithms that do not exploit this. L
54,481
How to find the number of clusters in 1d data and the mean of each
You can just estimate the probability density function of price. If they are a mixture of normal distributions, hopefully you will observe several peaks in your mixture of Gaussian kernels. It can be implemented easily with Python, and I believe there are packages for other languages as well. from scipy.stats import ga...
How to find the number of clusters in 1d data and the mean of each
You can just estimate the probability density function of price. If they are a mixture of normal distributions, hopefully you will observe several peaks in your mixture of Gaussian kernels. It can be
How to find the number of clusters in 1d data and the mean of each You can just estimate the probability density function of price. If they are a mixture of normal distributions, hopefully you will observe several peaks in your mixture of Gaussian kernels. It can be implemented easily with Python, and I believe there a...
How to find the number of clusters in 1d data and the mean of each You can just estimate the probability density function of price. If they are a mixture of normal distributions, hopefully you will observe several peaks in your mixture of Gaussian kernels. It can be
54,482
How to find the number of clusters in 1d data and the mean of each
The XMeans algorithm can be used to estimate the total number of clusters directly from the data, without human guidance. The Weka package has a Java implementation. An expectation maximization algorithm can also be used to automatically estimate the total number of clusters as well. There is a Weka implementation o...
How to find the number of clusters in 1d data and the mean of each
The XMeans algorithm can be used to estimate the total number of clusters directly from the data, without human guidance. The Weka package has a Java implementation. An expectation maximization algo
How to find the number of clusters in 1d data and the mean of each The XMeans algorithm can be used to estimate the total number of clusters directly from the data, without human guidance. The Weka package has a Java implementation. An expectation maximization algorithm can also be used to automatically estimate the ...
How to find the number of clusters in 1d data and the mean of each The XMeans algorithm can be used to estimate the total number of clusters directly from the data, without human guidance. The Weka package has a Java implementation. An expectation maximization algo
54,483
How to check for interaction of all pairs of variables, in linear regression in R?
The help for formula tells you how to do this. You should really read that. It's: y ~ (x1 + x2 + ...)^2
How to check for interaction of all pairs of variables, in linear regression in R?
The help for formula tells you how to do this. You should really read that. It's: y ~ (x1 + x2 + ...)^2
How to check for interaction of all pairs of variables, in linear regression in R? The help for formula tells you how to do this. You should really read that. It's: y ~ (x1 + x2 + ...)^2
How to check for interaction of all pairs of variables, in linear regression in R? The help for formula tells you how to do this. You should really read that. It's: y ~ (x1 + x2 + ...)^2
54,484
Frequency of time series in R
Most likely you have two seasonal periods: 48 (number of intervals per day) and 48x5 (number of intervals per week assuming a 5-day week). The tbats() function from the forecast package in R will handle multiple seasonal periods. For example (where x is the data): library(forecast) x <- msts(x, seasonal.periods=c(48, 4...
Frequency of time series in R
Most likely you have two seasonal periods: 48 (number of intervals per day) and 48x5 (number of intervals per week assuming a 5-day week). The tbats() function from the forecast package in R will hand
Frequency of time series in R Most likely you have two seasonal periods: 48 (number of intervals per day) and 48x5 (number of intervals per week assuming a 5-day week). The tbats() function from the forecast package in R will handle multiple seasonal periods. For example (where x is the data): library(forecast) x <- ms...
Frequency of time series in R Most likely you have two seasonal periods: 48 (number of intervals per day) and 48x5 (number of intervals per week assuming a 5-day week). The tbats() function from the forecast package in R will hand
54,485
How to interpret the significance code?
You still have a fair amount of studying to do (that can be a good thing). First the way that you fit your model has 1 dependent variable and 15 independent, unless the definition of those terms have changed. Confusion like this is one of the reasons that I wish the entire field would ban the terms "independent variab...
How to interpret the significance code?
You still have a fair amount of studying to do (that can be a good thing). First the way that you fit your model has 1 dependent variable and 15 independent, unless the definition of those terms have
How to interpret the significance code? You still have a fair amount of studying to do (that can be a good thing). First the way that you fit your model has 1 dependent variable and 15 independent, unless the definition of those terms have changed. Confusion like this is one of the reasons that I wish the entire field...
How to interpret the significance code? You still have a fair amount of studying to do (that can be a good thing). First the way that you fit your model has 1 dependent variable and 15 independent, unless the definition of those terms have
54,486
Estimating hidden transfers of market share
Write your system explicitly for time $t$ as ("$L$" for "loss", as a positive quantity, and "$G$" for "gain") $$ A_t - A_{t-1} = - L^A_{t} + G_{t}^{B\rightarrow A}+G_{t}^{C\rightarrow A}$$ $$ B_t - B_{t-1} = - L^B_{t} + G_{t-1}^{A\rightarrow B}+G_{t}^{C\rightarrow B}$$ $$ C_t - C_{t-1} = - L^C_{t} + G_{t}^{A\rightarrow...
Estimating hidden transfers of market share
Write your system explicitly for time $t$ as ("$L$" for "loss", as a positive quantity, and "$G$" for "gain") $$ A_t - A_{t-1} = - L^A_{t} + G_{t}^{B\rightarrow A}+G_{t}^{C\rightarrow A}$$ $$ B_t - B_
Estimating hidden transfers of market share Write your system explicitly for time $t$ as ("$L$" for "loss", as a positive quantity, and "$G$" for "gain") $$ A_t - A_{t-1} = - L^A_{t} + G_{t}^{B\rightarrow A}+G_{t}^{C\rightarrow A}$$ $$ B_t - B_{t-1} = - L^B_{t} + G_{t-1}^{A\rightarrow B}+G_{t}^{C\rightarrow B}$$ $$ C_t...
Estimating hidden transfers of market share Write your system explicitly for time $t$ as ("$L$" for "loss", as a positive quantity, and "$G$" for "gain") $$ A_t - A_{t-1} = - L^A_{t} + G_{t}^{B\rightarrow A}+G_{t}^{C\rightarrow A}$$ $$ B_t - B_
54,487
Concentration bounds on a sequence of (0,1)-experiments
One of the question's queries is the probability that "the next step will be the last". The OP states this probability as $Pr[Y_{t+1} \geq (p+\delta) \cdot (t+1)|Y_t < (p+\delta) \cdot t]$, but this is not a correct representation. And this is because we require that the process must stop the first time it reaches the ...
Concentration bounds on a sequence of (0,1)-experiments
One of the question's queries is the probability that "the next step will be the last". The OP states this probability as $Pr[Y_{t+1} \geq (p+\delta) \cdot (t+1)|Y_t < (p+\delta) \cdot t]$, but this i
Concentration bounds on a sequence of (0,1)-experiments One of the question's queries is the probability that "the next step will be the last". The OP states this probability as $Pr[Y_{t+1} \geq (p+\delta) \cdot (t+1)|Y_t < (p+\delta) \cdot t]$, but this is not a correct representation. And this is because we require t...
Concentration bounds on a sequence of (0,1)-experiments One of the question's queries is the probability that "the next step will be the last". The OP states this probability as $Pr[Y_{t+1} \geq (p+\delta) \cdot (t+1)|Y_t < (p+\delta) \cdot t]$, but this i
54,488
Concentration bounds on a sequence of (0,1)-experiments
The expected time until the sequence is terminates is infinite. In fact, not only is the expected value of $\text{min}\{t : Y_t>(p+\delta)t\}$ infinite for any $\delta>0$, but even the expected value of $\text{min}\{t : Y_t > pt + \delta\}$ is infinite. This can be proven using the optional sampling theorem (also kn...
Concentration bounds on a sequence of (0,1)-experiments
The expected time until the sequence is terminates is infinite. In fact, not only is the expected value of $\text{min}\{t : Y_t>(p+\delta)t\}$ infinite for any $\delta>0$, but even the expected value
Concentration bounds on a sequence of (0,1)-experiments The expected time until the sequence is terminates is infinite. In fact, not only is the expected value of $\text{min}\{t : Y_t>(p+\delta)t\}$ infinite for any $\delta>0$, but even the expected value of $\text{min}\{t : Y_t > pt + \delta\}$ is infinite. This ca...
Concentration bounds on a sequence of (0,1)-experiments The expected time until the sequence is terminates is infinite. In fact, not only is the expected value of $\text{min}\{t : Y_t>(p+\delta)t\}$ infinite for any $\delta>0$, but even the expected value
54,489
More complicated classifier vs data preprocessing
You assume that you can separate the data linearly in a lower dimensional space after some nonlinear transformation. Kernel methods are popular due to the exact opposite: the data might only be linearly separable in a higher dimensional feature space. For any data you provide a higher dimensional feature space exists ...
More complicated classifier vs data preprocessing
You assume that you can separate the data linearly in a lower dimensional space after some nonlinear transformation. Kernel methods are popular due to the exact opposite: the data might only be linea
More complicated classifier vs data preprocessing You assume that you can separate the data linearly in a lower dimensional space after some nonlinear transformation. Kernel methods are popular due to the exact opposite: the data might only be linearly separable in a higher dimensional feature space. For any data you ...
More complicated classifier vs data preprocessing You assume that you can separate the data linearly in a lower dimensional space after some nonlinear transformation. Kernel methods are popular due to the exact opposite: the data might only be linea
54,490
More complicated classifier vs data preprocessing
If you know what kind of non-linear transformation in the preprocessing could/should give you a linearly separable problem, then do it. This is often the case if physical/chemical/biological/... relations about the type of data are known. E.g. you may have transmittance spectra but know that $- log T = A \propto c$ (co...
More complicated classifier vs data preprocessing
If you know what kind of non-linear transformation in the preprocessing could/should give you a linearly separable problem, then do it. This is often the case if physical/chemical/biological/... relat
More complicated classifier vs data preprocessing If you know what kind of non-linear transformation in the preprocessing could/should give you a linearly separable problem, then do it. This is often the case if physical/chemical/biological/... relations about the type of data are known. E.g. you may have transmittance...
More complicated classifier vs data preprocessing If you know what kind of non-linear transformation in the preprocessing could/should give you a linearly separable problem, then do it. This is often the case if physical/chemical/biological/... relat
54,491
More complicated classifier vs data preprocessing
Theoretically speaking, the two approaches are equivalent. That said, you can tweak your data preprocessing much more than the kernel parameters in most SVM tools, so the second approach will afford you much more flexibility.
More complicated classifier vs data preprocessing
Theoretically speaking, the two approaches are equivalent. That said, you can tweak your data preprocessing much more than the kernel parameters in most SVM tools, so the second approach will afford y
More complicated classifier vs data preprocessing Theoretically speaking, the two approaches are equivalent. That said, you can tweak your data preprocessing much more than the kernel parameters in most SVM tools, so the second approach will afford you much more flexibility.
More complicated classifier vs data preprocessing Theoretically speaking, the two approaches are equivalent. That said, you can tweak your data preprocessing much more than the kernel parameters in most SVM tools, so the second approach will afford y
54,492
Calculate odds ratio confidence intervals from plink output?
For the calculation of confidence intervals you'll need standard errors for the effects, but those are not available in the output. However, the standard errors can be estimated from the Wald statistics and odds ratios. The calculation goes as follows: Take a natural logarithm from the odds ratio. This gives you the ...
Calculate odds ratio confidence intervals from plink output?
For the calculation of confidence intervals you'll need standard errors for the effects, but those are not available in the output. However, the standard errors can be estimated from the Wald statisti
Calculate odds ratio confidence intervals from plink output? For the calculation of confidence intervals you'll need standard errors for the effects, but those are not available in the output. However, the standard errors can be estimated from the Wald statistics and odds ratios. The calculation goes as follows: Take...
Calculate odds ratio confidence intervals from plink output? For the calculation of confidence intervals you'll need standard errors for the effects, but those are not available in the output. However, the standard errors can be estimated from the Wald statisti
54,493
How do difference-in-difference designs account for temporal autocorrelation
Your point about the standard errors in DiD is an important issue which has been mostly ignored or forgotten until a paper by Bertrand et al. (2004) "How Much Should We Trust Differences-In-Differences Estimates?" in the Quarterly Journal of Economics. In there they discuss several methods to overcome the autocorrelati...
How do difference-in-difference designs account for temporal autocorrelation
Your point about the standard errors in DiD is an important issue which has been mostly ignored or forgotten until a paper by Bertrand et al. (2004) "How Much Should We Trust Differences-In-Difference
How do difference-in-difference designs account for temporal autocorrelation Your point about the standard errors in DiD is an important issue which has been mostly ignored or forgotten until a paper by Bertrand et al. (2004) "How Much Should We Trust Differences-In-Differences Estimates?" in the Quarterly Journal of E...
How do difference-in-difference designs account for temporal autocorrelation Your point about the standard errors in DiD is an important issue which has been mostly ignored or forgotten until a paper by Bertrand et al. (2004) "How Much Should We Trust Differences-In-Difference
54,494
How do difference-in-difference designs account for temporal autocorrelation
Another paper that I hadn't thought about in this context until @Andy's comment is Cameron, Gelbach, Miller's "Robust Inference with Multi-Way Clustering". Upon re-reading, it looks like they explicitly replicate the Bertrand (2004) strategy and handle it via their multi-way clustering (which is a generalization of the...
How do difference-in-difference designs account for temporal autocorrelation
Another paper that I hadn't thought about in this context until @Andy's comment is Cameron, Gelbach, Miller's "Robust Inference with Multi-Way Clustering". Upon re-reading, it looks like they explicit
How do difference-in-difference designs account for temporal autocorrelation Another paper that I hadn't thought about in this context until @Andy's comment is Cameron, Gelbach, Miller's "Robust Inference with Multi-Way Clustering". Upon re-reading, it looks like they explicitly replicate the Bertrand (2004) strategy a...
How do difference-in-difference designs account for temporal autocorrelation Another paper that I hadn't thought about in this context until @Andy's comment is Cameron, Gelbach, Miller's "Robust Inference with Multi-Way Clustering". Upon re-reading, it looks like they explicit
54,495
Logistic regression and clustering?
What you call "clustering" is also known as local regression, kernel regression or local likelihood smoothing. The overall framework is generalized additive modelling, and the definitive textbooks are Hastie & Tibshirani (1990) Generalized Additive Models, and Wood (2006) Generalized Additive Models: An Introduction Wi...
Logistic regression and clustering?
What you call "clustering" is also known as local regression, kernel regression or local likelihood smoothing. The overall framework is generalized additive modelling, and the definitive textbooks are
Logistic regression and clustering? What you call "clustering" is also known as local regression, kernel regression or local likelihood smoothing. The overall framework is generalized additive modelling, and the definitive textbooks are Hastie & Tibshirani (1990) Generalized Additive Models, and Wood (2006) Generalized...
Logistic regression and clustering? What you call "clustering" is also known as local regression, kernel regression or local likelihood smoothing. The overall framework is generalized additive modelling, and the definitive textbooks are
54,496
Distribution in logistic regression
Yes: the model is $\operatorname{logit} p_i = \beta_0 +\beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i}$. That's true for bog-standard logistic regression anyway - the term is sometimes used where there's an extra parameter for dispersion, or for an estimating equation approach for which the Bernoulli model isn't assu...
Distribution in logistic regression
Yes: the model is $\operatorname{logit} p_i = \beta_0 +\beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i}$. That's true for bog-standard logistic regression anyway - the term is sometimes used where th
Distribution in logistic regression Yes: the model is $\operatorname{logit} p_i = \beta_0 +\beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i}$. That's true for bog-standard logistic regression anyway - the term is sometimes used where there's an extra parameter for dispersion, or for an estimating equation approach for ...
Distribution in logistic regression Yes: the model is $\operatorname{logit} p_i = \beta_0 +\beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i}$. That's true for bog-standard logistic regression anyway - the term is sometimes used where th
54,497
Distribution in logistic regression
As @Scortchi correctly notes, the answer is yes. However, I think this is not quite the right question. I suspect what you are wondering about is the way that probability, $p_i$, is related to the explanatory variables. In generalized linear models, this is done via a link function. The default link function for b...
Distribution in logistic regression
As @Scortchi correctly notes, the answer is yes. However, I think this is not quite the right question. I suspect what you are wondering about is the way that probability, $p_i$, is related to the
Distribution in logistic regression As @Scortchi correctly notes, the answer is yes. However, I think this is not quite the right question. I suspect what you are wondering about is the way that probability, $p_i$, is related to the explanatory variables. In generalized linear models, this is done via a link functi...
Distribution in logistic regression As @Scortchi correctly notes, the answer is yes. However, I think this is not quite the right question. I suspect what you are wondering about is the way that probability, $p_i$, is related to the
54,498
Robust Wald test for Poisson with Stata
As far as I know there is no ready made command for your purpose in Stata but it does not seem to be necessary because it can be easily implemented by hand. If you run your regression poisson y x, vce(robust) Create a local which holds the coefficient of your variable of interest (call it "bx", for instance) and then ...
Robust Wald test for Poisson with Stata
As far as I know there is no ready made command for your purpose in Stata but it does not seem to be necessary because it can be easily implemented by hand. If you run your regression poisson y x, vce
Robust Wald test for Poisson with Stata As far as I know there is no ready made command for your purpose in Stata but it does not seem to be necessary because it can be easily implemented by hand. If you run your regression poisson y x, vce(robust) Create a local which holds the coefficient of your variable of interes...
Robust Wald test for Poisson with Stata As far as I know there is no ready made command for your purpose in Stata but it does not seem to be necessary because it can be easily implemented by hand. If you run your regression poisson y x, vce
54,499
Robust Wald test for Poisson with Stata
The Robust Wald test in Stata is achieved by using the option robust after the glm or poisson command in Stata. This is not the same as bootstrapped standard error estimates, which are another type of "robust" estimate for standard errors. The nominal "robust standard errors" estimates you receive by using the robust c...
Robust Wald test for Poisson with Stata
The Robust Wald test in Stata is achieved by using the option robust after the glm or poisson command in Stata. This is not the same as bootstrapped standard error estimates, which are another type of
Robust Wald test for Poisson with Stata The Robust Wald test in Stata is achieved by using the option robust after the glm or poisson command in Stata. This is not the same as bootstrapped standard error estimates, which are another type of "robust" estimate for standard errors. The nominal "robust standard errors" est...
Robust Wald test for Poisson with Stata The Robust Wald test in Stata is achieved by using the option robust after the glm or poisson command in Stata. This is not the same as bootstrapped standard error estimates, which are another type of
54,500
Cluster standard error _versus_ fixed effects
Is the cluster something you're not really interested in - just an irritant? Use clustered standard errors. E.g. if you've got kids in classrooms, and want to know their mean score on a test, you can use clustered standard errors. Is the cluster something you're interested in or want to remove? E.g. if you've got kids ...
Cluster standard error _versus_ fixed effects
Is the cluster something you're not really interested in - just an irritant? Use clustered standard errors. E.g. if you've got kids in classrooms, and want to know their mean score on a test, you can
Cluster standard error _versus_ fixed effects Is the cluster something you're not really interested in - just an irritant? Use clustered standard errors. E.g. if you've got kids in classrooms, and want to know their mean score on a test, you can use clustered standard errors. Is the cluster something you're interested ...
Cluster standard error _versus_ fixed effects Is the cluster something you're not really interested in - just an irritant? Use clustered standard errors. E.g. if you've got kids in classrooms, and want to know their mean score on a test, you can