instruction
stringlengths
9
38.7k
One of the purported uses of L-estimators is the ability to 'robustly' estimate the parameters of a random variable drawn from a given class. One of the downsides of using Levy $\alpha$-stable distributions is that it is difficult to estimate the parameters given a sample of observations drawn from the class. Has there...
General question: Given a dartboard of unit radius, what's the probability that a dart randomly lands within a circle of radius 1/3 centered inside the dartboard? Standard answer: The dart is thrown such that it hits each point with equal likelihood. The probability that it lands within the inner circle is the ratio of...
Permutation tests are significance tests based on permutation resamples drawn at random from the original data. Permutation resamples are drawn without replacement, in contrast to bootstrap samples, which are drawn with replacement. Here is an example I did in R of a simple permutation test. (Your comments are welcome)...
I would like to know if anyone could recommend a book that deals more with the practical issues around conducting a meta-analysis? Thanking you in advance Andrew Vitiello
I've never really grokked the difference between these two measures of convergence. (Or, in fact, any of the different types of convergence, but I mention these two in particular because of the Weak and Strong Laws of Large Numbers.) Sure, I can quote the definition of each and give an example where they differ, but I ...
I would like as many algorithms that perform the same task as logistic regression. That is algorithms/models that can give a prediction to a binary response (Y) with some explanatory variable (X). I would be glad if after you name the algorithm, if you would also show how to implement it in R. Here is a code that ca...
My question is based on the "forecast" package for R used in Forecasting with Exponential Smoothing. The State Space Approach - Hyndman et al. 2008. I am using the ets function to estimate the parameters of a model. Is there a way to obtain standard errors for the estimates of the smoothing parameters?
What is the best package to to do some survival analysis and plots in R? I have tried some tutorials but I couldn't find a definite answer. TIA
In his 1984 paper "Statistics and Causal Inference", Paul Holland raised one of the most fundamental questions in statistics: What can a statistical model say about causation? This led to his motto: NO CAUSATION WITHOUT MANIPULATION which emphasized the importance of restrictions around experiments that consider ...
I have a series of observations that fall into bins (or "scores"); that is, the data can be 0, 1, 2, 3 or 4. There are two groups of such data, control and treated. I know the number of individuals with each score for each group. What is the best way to determine whether these groups are different or not? A colleag...
I have a dataset forwhich i have performed an mds and visualized the results using scatterplot3d library. However i would like to see the names of the points on the 3d plot. How do i accomplish that? Each column belongs to a certain group i would like to see which points belong to which groups on the 3dplot. #generate ...
Given a function mapping between two sample spaces $S_1$ and $S_2$, if $S_2$,$F_2$ is measurable how do I show that preimage of $S_2$,$F_2$ in $S_1$ is measurable set?
Imagine that responses were collected on a 20 item scale which was designed to measure 4 factors with 5 items on each scale. participants were drawn from two groups (Group 1) and (Group 2) with sample size $n_1 = 150$ and $n_2 = 150$. a researcher wanted to assess the factor structure of the scale Common scenarios ...
I am currently into a situation that i don't really know how to solve by myself. I need to calculate the AUC of each peak and then compare these areas in relation to each other. The problem is that the peaks are not completely separated and the only information i got is the mean and the SD of each peak. Does anyone kno...
I've got product ratings for a few thousand products. The number of ratings for each product varies from zero to about fifty. I want to find the expected value of product rating for each product. If there are lots of ratings for the product I'd expect the expected value to be the average of the ratings for the product,...
How can I access tables created in SAS Enterprise Guide Client into SAS Enterprise Miner Client?
Joris and Srikant's exchange here got me wondering (again) if my internal explanations for the difference between confidence intervals and credible intervals were the correct ones. How you would explain the difference?
I do not study statistics but engineering, but this is a statistics question, and I hope you can lead me to what I need to learn to solve this problem. I have this situation where I calculate probabilities of 1000's of things happening in like 30 days. If in 30 days I see what actually happened, how can I test to se...
Following this question, I wish to have some way of counting how many times I am using a package in my daily work. Is there a function/package to do that? In case there isn't, how would you construct such a capability? The way I would do that is by changing it so that at the end of any R session, a log file of the comm...
This is a follow-up to the repeated measures sample size question. I am planning a repeated measures experiment. We record energy usage for 12 months, then give (a randomly assigned) half of the customers continuous information about their energy usage (perform the treatment), and record their energy usage for another ...
I'm working on a small (200M) corpus of text, which I want to explore with some cluster analysis. What books or articles on that subject would you recommend?
I have a four-state, discrete time Markov process with time-dependent transition matrices such that after a given time T the matrices become constant. The idea is people in a program leaving the program in a variety of ways. Everyone starts in state 1, and states 2, 3 and 4 are absorbing, but state 4 represents the fai...
I am interested in fitting a factor analysis-like model on asset returns or other similar latent variable models. What are good papers to read on this topic? I am particularly interested in how to handle the fact that a factor analysis model is identical under a sign change for the "factor loadings".
This is somewhat vague, but suppose you have a black box function $f(x_1,x_2,\ldots,x_k)$, for which you have code, and you are interested in the behaviour of $f$ when the $x_i$ are i.i.d. standard Gaussian random variables. What are some good ways to visualize this function? To make it easier, we may assume that $k$ i...
What broad methods are there to detect fraud, anomalies, fudging, etc. in scientific works produced by a third party? (I was motivated to ask this by the recent Marc Hauser affair.) Usually for election and accounting fraud, some variant of Benford's Law is cited. I am not sure how this could be applied to e.g. the Mar...
I am getting a bit confused about feature selection and machine learning and I was wondering if you could help me out. I have a microarray dataset that is classified into two groups and has 1000s of features. My aim is to get a small number of genes (my features) (10-20) in a signature that I will in theory be able t...
A previous user asked this question specifically for R. I'd like to know what, if any, other software can do this.
I think that dynamic pricing algorithms (used in aviation and ticketing industry) is very statistical based, anyone here has experience with those algorithms with references for it?
I am looking at setting up an experiment concerning a hobby of mine, basically measuring a variety of parameters 'before' and 'after' and see which one, if any, gives the most reliable prediction of a final parameter i.e. do they have a linear relationship, etc. The object being to save some time and effort later not ...
What should be the ratio of number of observations and number of variables? How to detect overfitting in the neural network model and what are the ways to avoid overfitting? If I want to perform classification with Neural Network, should the classes have equal frequency? Please help me out.
I'm trying to interpret the following type of logistic model: mdl <- glm(c(suc,fail) ~ fac1 + fac2, data=df, family=binomial) Is the output of predict(mdl) the expected odds of success for each data point? Is there a simple way to tabulate the odds for each factor level of the model, rather than all the data points?
I have a data-set consisting of N p-dimensional observations (all quantitative variables). I want to apply a hierarchical clustering algorithm to those data. As explained on page 505 in Elements of Statistical Learning, when using weighted average to combine the distances of the individual variables, it is often desira...
I am trying to develop some algorithm to compute probabilities in multi-type branching trees, and I doubt I am doing this right... Let us consider a multi-type branching process with two types, denoted by 0 and 1. The process starts in state 0 with probability 1, so that the root vertex of any tree generated by this pr...
I am using the random forest algorithm as a robust classifier of two groups in a microarray study with 1000s of features. What is the best way to present the random forest so that there is enough information to make it reproducible in a paper? Is there a plot method in R to actually plot the tree, if there are a sma...
I was reading Christian Robert's Blog today and quite liked the new Metropolis-Hastings algorithm he was discussing. It seemed simple and easy to implement. Whenever I code up MCMC, I tend to stick with very basic MH algorithms, such as independent moves or random walks on the log scale. What MH algorithms do people ro...
I am applying a random forest algorithm as a classifier on a microarray dataset which are split into two known groups with 1000s of features. After the initial run I look at the importance of the features and run the tree algorithm again with the 5, 10 and 20 most important features. I find that for all features, top...
In his paper Linear Model Selection by Cross-Validation, Jun Shao shows that for the problem of variable selection in multivariate linear regression, the method of leave-one-out cross validation (LOOCV) is 'asymptotically inconsistent'. In plain English, it tends to select models with too many variables. In a simulatio...
A recent question on the difference between confidence and credible intervals led me to start re-reading Edwin Jaynes' article on that topic: Jaynes, E. T., 1976. `Confidence Intervals vs Bayesian Intervals,' in Foundations of Probability Theory, Statistical Inference, and Statistical Theories of Science, W. L. Harper ...
Are multiple and multivariate regression really different? What is a variate anyways?
I am trying fit a Cox Proportional Hazard model with coxph with a cmoputer of 12GB of RAM. It keeps running out of memory. Is there a biglm equivalent of coxph?
I used to analyse items from a psychometric point of view. But now I am trying to analyse other types of questions on motivation and other topics. These questions are all on Likert scales. My initial thought was to use factor analysis, because the questions are hypothesised to reflect some underlying dimensions. But i...
I am curious if there is a transform which alters the skew of a random variable without affecting the kurtosis. This would be analogous to how an affine transform of a RV affects the mean and variance, but not the skew and kurtosis (partly because the skew and kurtosis are defined to be invariant to changes in scale). ...
Mathematics has its famous Millennium Problems (and, historically, Hilbert's 23), questions that helped to shape the direction of the field. I have little idea, though, what the Riemann Hypotheses and P vs. NP's of statistics would be. So, what are the overarching open questions in statistics? Edited to add: As an exam...
Say I have a series of forecasts and observations like this: EntityF EntityO 2004 120 125 2006 166 173 2008 150 167 2010 152 - And assume that the (i) entity is the same and (ii) the forecasting methodology is constant. I'd like to Produce a meaningful metric of the forecasting...
I have a very large data set which I would like to summarise in as small a space as possible, preferably one side of A4. The data are from a customer satisfaction survey and are Likert-type scales, 5 scales for each work area, with 190 work areas in total. I would also like to represent the response rate on the visuali...
I'm familiar with what the 2nd moment (variance) indicates as well as what the 3rd moment (skewness) indicates. I know that on a histogram the 4th moment (kurtosis) indicates the "peeked-ness" of the data. My question asks what are the practical implications/interpretations of a kurtotic distribution. I'm asking thi...
Suppose that I have three populations with four, mutually exclusive characteristics. I take random samples from each population and construct a crosstab or frequency table for the characteristics that I am measuring. Am I correct in saying that: If I wanted to test whether there is any relationship between the popul...
I'm looking for the limiting distribution of multinomial distribution over d outcomes. IE, the distribution of the following $$\lim_{n\to \infty} n^{-\frac{1}{2}} \mathbf{X_n}$$ Where $\mathbf{X_n}$ is a vector value random variable with density $f_n(\mathbf{x})$ for $\mathbf{x}$ such that $\sum_i x_i=n$, $x_i\in \math...
I've never liked how people typically analyze data from Likert scales as if error were continuous & Gaussian when there are reasonable expectations that these assumptions are violated at least at the extremes of the scales. What do you think of the following alternative: If the response takes value $k$ on an $n$-point ...
Suppose that I have a market research survey with the question "What brand of television are you planning on buying" and then also have a choice that is "I don't plan on buying a television." Respondents may choose more than one brand, but they may not make any other choices if they select that they do not plan on buy...
A colleague in my office said to me today "Tree models aren't good because they get caught by extreme observations". A search here resulted in this thread that basically supports the claim. Which leads me to the question - under what situation can a CART model be robust, and how is that shown?
Is there a a good python library for training boosted decision trees ?
I have some data values of type date/time (the last date that a resource was accessed) and I wish to chart this data on the y-axis against the different categories of resource on the x-axis. What would be a sensible type of chart for displaying this sort of data ? For example is a histogram / bar chart satisfactory o...
Can anyone recommend some books that are considered to be standard references for classical (frequentist) statistics? IE, fairly comprehensive, and also, been around for a while so that typos and mistakes in formulas had a chance to be checked and corrected
I would like to solve Project Euler 213 but don't know where to start because I'm a layperson in the field of Statistics, notice that an accurate answer is required so the Monte Carlo method won't work. Could you recommend some statistics topics for me to read on? Please do not post the solution here. Flea Circus A 30...
I am trying to identify approximate 3% of the population for some characteristic feature. Standard decision tree or logistic regression gives too many false positives. Is there a chance that rules based classifier can improve performance? I would like to get approx 75% of recall with 95% of precission (i.e. FalsePositi...
Is there a modelling technique like LOESS that allows for zero, one, or more discontinuities, where the timing of the discontinuities are not known apriori? If a technique exists, is there an existing implementation in R?
A cursory search reveals that Latin squares are fairly extensively used in the design of experiments. During my PhD, I have studied various theoretical properties of Latin squares (from a combinatorics point-of-view), but do not have a deep understanding of what is it about Latin squares that make them particularly we...
In order to correlate or compare means of two dependent variables. In my case, I need to correlate individual (e.g. subjects=30) slope values from different conditions (e.g. conditions=4), and each slope value summarizes the relation between the dependent variable (e.g. measured 4 times in each level of the independen...
Age pyramid looks like this: I would like to make something similar, namely a 2 barplots (not histograms) with same categories, rotated vertically and extending to both sides as in pyramid. Is it a simple way to do this in R? It would be also nice to control the colour of each bar.
I would just like someone to confirm my understanding or if I'm missing something. The definition of a markov process says the next step depends on the current state only and no past states. So, let's say we had a state space of a,b,c,d and we go from a->b->c->d. That means that the transition to d could only depend on...
Say I have a population of 50 million unique things, and I take 10 million samples (with replacement)... The first graph is I've attached shows how many times I sample the same "thing", which is relatively rare as the population is larger than my sample. However if my population is only 10 million things, and I take 10...
I have analysed several dimensions in a survey. Each part of the survey represents a theoretical dimension and is analysed with factorial analysis. I want to use scores from factor analysis to do a classification. The first factors represents a large part of the variance. Can I keep only first factor or do I need t...
Question: What is a good method for conducting post hoc tests of differences between group means after adjusting for the effect of a covariate? Prototypical example: Four groups, 30 participants per group (e.g., four different clinical psychology populations) Dependent Variable is numeric (e.g., intelligence scores) C...
To cluster (text) documents you need a way of measuring similarity between pairs of documents. Two alternatives are: Compare documents as term vectors using Cosine Similarity - and TF/IDF as the weightings for terms. Compare each documents probability distribution using f-divergence e.g. Kullback-Leibler divergence I...
I have found the term "asymptotic power of a statistical test" only related to the Kolmogorov-Smirnov test (to be precise: asyptotic power = 1). What does this term acctually mean? In my opinion it should be someting like this: "if the alternative hypothesis is true, than for every significance level alpha there exists...
I have reformulated the problem from a "dog barking warning system" to something else which hopefully, has less ambiguity. Instead, I will repose the problem as follows: Let's assume that my neighbour is a "mad scientist", who claims to have invented a "terrorist event" forecasting machine. The machine has three colore...
A former colleague once argued to me as follows: We usually apply normality tests to the results of processes that, under the null, generate random variables that are only asymptotically or nearly normal (with the 'asymptotically' part dependent on some quantity which we cannot make large); In the era of cheap ...
I'm looking for the appropriate theoretical framework or speciality to help me deal with understanding how to deal with the errors that the GPS system has - especially when dealing with routes. Fundamentally, I'm looking for the requirements on the data and any algorithms to use to be able to establish the length of a ...
There are several distinct usages: kernel density estimation kernel trick kernel smoothing Please explain what the "kernel" in them means, in plain English, in your own words.
Is it possible to test for finiteness (or existence) of the variance of a random variable given a sample? As a null, either {the variance exists and is finite} or {the variance does not exist/is infinite} would be acceptable. Philosophically (and computationally), this seems very strange because there should be no diff...
For the more mathematically minded, we have $x \in \mathbb{R}^2$ and the function $h(x)$ defined as: $h(x)=\alpha_1x_1^2+\alpha_2x_2^2+\alpha_3x_1+\alpha_4x_2+\alpha_5x_1x_2+\alpha_6$ and the vector of alpha's is known and further guaranteed to be such that $h(x)$ is a general elliptic paraboloid (i.e. a convex funct...
I have 2560 paired observations from an experiment in which participants provided two ratings for a set of objects, at two different points in time. Half of the objects in the set had the value of an attribute A changed between the two time points, half did not. Of the objects that were changed in each participant's ...
In a recent article of Amstat News, the authors (Mark van der Laan and Sherri Rose) stated that "We know that for large enough sample sizes, every study—including ones in which the null hypothesis of no effect is true — will declare a statistically significant effect.". Well, I for one didn't know that. Is this true? D...
Say we have 5 items, and people are asked which item they like. Multiple answers are possible, but also no answer is possible. The people are categorized according to factors like gender, age, and so on. One possible approach to analyze the differences between genders, age groups and so on is making use of the Generali...
I have read/heard many times that the sample size of at least 30 units is considered as "large sample" (normality assumptions of means usually approximately holds due to the CLT, ...). Therefore, in my experiments, I usually generate samples of 30 units. Can you please give me some reference which should be cited when...
If you look at Wolfram Alpha Or this Wikipedia page List of countries by median age Clearly median seems to be the statistic of choice when it comes to ages. I am not able to explain to myself why arithmetic mean would be a worse statistic. Why is it so? Originally posted here because I did not know this site exi...
In "On Gaussian-like Densities of Order Greater than Two" (Willett, P. Thomas, J. B., 1987), section II, the author state: $\mathcal{N}(x,y,\rho)=\phi(x)\phi(y)\sum_{n=0}^{\infty}\rho^nH_n(x)H_n(y)$ where $\phi(.)$ is the unit normal density, $H_n(.)$ is the $n^{th}$ Hermite polynomial, $\mathcal{N}(x,y,\rho)$ is the ...
The following paper describes an implementation of R in parallel on a graphics processing unit (GPU). Buckner et al., The gputools package enables GPU computing in R, BIOINFORMATICS, Vol. 26 no. 1 2010, pages 134–135 In the experimental section, on a 4-core computer, they compare the performance of the program runnin...
What are some of the best ranking algorithms with inputs as up and down votes?
Could you suggest good articles / books / online materials on correlation stress testing? Correlation stress testing: say, we have a positive semidefinite correlation matrix. We might want to explore the impact on the results if some or all elements of the matrix are increased or a decrease by a given value/s. Of cours...
If we want to visibly see the distribution of a continuous data, which one among histogram and pdf should be used? What are the differences, not formula wise, between histogram and pdf?
I'm working with the results of a survey which has multiple questions. All answers (in this case) are categorical and ordinal (such as very unhappy, unhappy, neutral, happy, very happy). I'm looking for a way to sort the questions from those with "worst results" to those with "best results". Getting the extremes is som...
I have a question related to the time fixed effects when using Swamy Random coefficient model, as you may know in the fixed and random effect context, we use a set of time dummies to estimate the time fixed effects, and I would like if we can use the same approch whith swamy?
I have data with a double peak that I'm trying to model, and there's enough overlap between the peaks that I can't treat them independently. A histogram of the data might look something like this: I've created two models for this: one uses two Poisson distributions, and the other uses two negative binomial distributio...
I have a large sample of market data - that is the prices and amount of goods being sold by vendors at specific, but inconsistent, points in time. Assuming I am a buyer and the quality of the goods are constant across the entire market (consumable goods by one manufacturer, let's say), how would you graph this data? Ke...
Are the two synonymous? The reason I am asking is that I have a paper that calculates a certain p-value as the upper tail of the hypergeometric distribution: $\Sigma_{k}^{m} = \frac{\binom{m}{k}\binom{N-m}{n-k}}{\binom{N}{n}}$ I want to implement their proposal using Python. Scipy offers a hypergeometric distribution a...
If one is testing assumption of homoscedasticity, parametric (Bartlett Test of Homogeneity of Variances, bartlett.test) and non-parametric (Figner-Killeen Test of Homogeneity of Variances, fligner.test) tests are available. How to tell which kind to use? Should this depend on e.g. normality of the data?
After performing principal component analysis (PCA), I want to project a new vector onto PCA space (i.e. find its coordinates in the PCA coordinate system). I have calculated PCA in R language using prcomp. Now I should be able to multiply my vector by the PCA rotation matrix. Should principal components in this matrix...
I have found extensive literature proposing all sorts of criteria (e.g. Glenn et al. 1985(pdf) and Jung et al. 2002(pdf)). However, most of these are not that easy to implement (at least from my perspective). I am using scipy.cluster.hierarchy to obtain a cluster hierarchy, and I am now trying to decide how to form fla...
Let's pretend there are 10 doors in front of me. Behind one of them, there is a treasure and nothing behind all the others. Intuitively, I can easily determine I have 1 chance out of 10 the pick open the right door (the one with the treasure). I repeat this 5 times (i.e. all door closed, open one door). What are my cha...
I often find parts of financial correlation matrices not statistically significantly different from zero. Sometimes, these correlations have a tangible effect on results - low correlations lead to high diversification benefit. Also, the sign of correlations can skew the results. Would you consider it appropriate to mak...
The logic of multiple imputation (MI) is to impute the missing values not once but several (typically M=5) times, resulting in M completed datasets. The M completed datasets are then analyzed with complete-data methods upon which the M estimates and their standard errors are combined using Rubin's formulas to obtain th...
I am advising a small medical study (two groups, treatment is a dummy variable), i.e. a 2x2 contingency table. I'm comparing the value of the Pearson's $\chi^2$ test and a non parametric competitor McNemar's $\chi^2$ test. Edit The answer brings an additional questions: they have matched each case in group1 with 4 con...
Suppose I have some initial correlation matrix. I want to stress each correlation in the matrix by the same constant simultaneously (except the diagonal; lets call this global parallel stress since it affects the entire matrix by the same constant at the same time). I start with adding 0.01% to each correlation and che...
I'm trying to take a normal distribution of points, and force them to become a uniform distribution. I've had little success on S.O., so I thought I'd ask here. Basically, I have a hash function which takes an X, Y, and seed value and generates numbers in a normal distribution with a mean of 0. These numbers vary only ...
I have three variables: distance (continuous, variable range negative infinity to positive infinity) isLand (discrete categorical/ Boolean, variable range 1 or 0) occupants (discrete categorical, variable range 0-7) I want to answer the following statistical questions: How to I compare distributions that have both...
Does the autocorrelation function have any meaning with a non-stationary time series? The time series is generally assumed to be stationary before autocorrelation is used for Box and Jenkins modeling purposes.
Imagine you have to do reporting on the numbers of candidates who yearly take a given test. It seems rather difficult to infer the observed % of success, for instance, on a wider population due to the specifity of the target population. So you may consider that these data represent the whole population. Are results of...
This is a followup to this question. I am currently trying to implement the C-Index in order to find a near-optimal number of clusters from a hierarchy of clusters. I do this by calculating the C-Index for every step of the (agglomerative) hierarchical clustering. The problem is that the C-Index is minimal (0 to be exa...