instruction
stringlengths
9
38.7k
Repeating an experiment (about which I asked before) with $n$ possible outcomes $t$ times independently, where all but one outcomes have probability $\frac{1}{n+1}$ and the other outcome has the double probability $\frac{2}{n+1}$, I also obtain an independent information where the outcome with double probability shows ...
I'm running a binary logistic regressions with 3 numerical variables. I'm suppressing the intercept in my models as the probability should be zero if all input variables are zero. What's minimal number of observations I should use?
I have implemented a three-way anova with type III sum of squares in c++. Since some of my experiments (observations) are more important (more informative), I want to give them a higher weight in my analysis. For example, an experiment which is very important has a weight of 10, and a relatively important one has a wei...
This question's context is time series forecasting using regression, with multivariate training data. With a regularization method like LARS w/ LASSO, elastic net, or ridge, we need to decide on the model complexity or regularization parameters. For example, the ridge $\lambda$ penalty or the number of steps to go alon...
A treatment was given to one hand of a subject, and a single outcome metric is measured for both hands, twice pre and several times post treatment. What is best practice for assessing effectiveness of treatment? Treated and Untreated "groups" really are paired.
When characterizing an information measure one desires to have the following 'Grouping' property (cf., Cover&Thomas, Ch.2 exercise 46) $$H(p_1, p_2,\dots, p_n)=H(p_1+p_2, p_3,\dots, p_n)+(p_1+p_2)H(\frac{p_1}{p_1+p_2},\frac{p_2}{p_1+p_2})$$ (a.k.a. recursive). An analogous Grouping axiom is employed for Renyi entropy...
The Pearson's coefficient between two variables is quite high (r=.65). But when I rank the variable values and run a Spearman's correlation, the cofficient value is much lower (r=.30). What is the interpretation of this?
I would like simulate appearance of publications in a forum and I need know what is the probability distribution of new question being asked in a forum. In my first simulation I used to normal distribution, but I think that the best distribution can be exponential distribution.
Does anybody know if there're common known disadvantages of a negbin regression? In my opinion it seems to fit every problem pretty good (measured with the estimated dispersionparameter). So why not always use it?
How do you estimate degrees of freedoms for derived measurements? I want to assess the significance of the distance of an independent data point to a regression line. I can easily calculate the (vertical) distance between the data point and the regression line, and I get the uncertainty of the distance from the uncerta...
I would like to estimate a multi level model in Stata or R (using lmer) where the first level coefficients are the same for all observations, but the coefficients within observation are correlated. An example would look something like this: $$Y_i = \beta_1 x_{1i} + \beta_2 x_{2i} + \beta_3 x_{3i} + ... + \varepsilon_{...
I want to generate series of 0s and 1s that exhibit some clustering. By this I mean that 1s and 0s should occur together. So I envisage series of 0s and 1s that will exhibit similar clustering of these elements, and not just random series of 0s and 1s. In essence, for a single time series, I would go about that by thre...
My question is very general. I am learning extreme value theory to examine tail behavior. The concept of regular variation is still too vague to me. Could anyone help to provide more info to clarify? Any thoughts on its importance on probability theory?
Neural networks are often treated as "black boxes" due to their complex structure. This is not ideal, as it is often beneficial to have an intuitive grasp of how a model is working internally. What are methods of visualizing how a trained neural network is working? Alternatively, how can we extract easily digestible de...
The intercoder reliability statistic Krippendorff's alpha is nice because it can be used across many different types of data: nominal, ordinal, interval, ratio, circular, etc. To do so, you just substitute a different distance metric into the reliability calculation. See wikipedia for a good description. My question:...
In class, we've been learning a myriad of really interesting techniques to sample from a given distribution, filter online data, particle filters, etc. My issue is that when I take some real-world data and plot it, the distribution is clearly not Gaussian. So, I need to estimate some distribution. Or, in the case o...
As a student in physics, I have experienced the "Why I am a Bayesian" lecture perhaps half a dozen times. It is always the same -- the presenter smugly explains how the Bayesian interpretation is superior to the frequentist interpretation allegedly employed by the masses. They mention Bayes rule, marginalization, pri...
In the following bioinformatics paper, "Quantifying environmental adaptation of metabolic pathways in metagenomics", Gianoulis et al. employ the use of two tools to detect multivariate relationships between environmental features and microbiomic features: Regularized Canonical Correlation Analysis Discriminative Parti...
I have compiled a very small set of summary data from the literature, and I wish to compare the variances between aspects of the literature-based data, and to some of my own data. The summary data includes the mean, standard deviation and sample size. In earlier tests, I compared the variances of one continuous depende...
I need to perform a computation of reliability of a 5-point Likert scale having 6 items. From a factor analysis I found that my scale is a multidimensional scale (3 factors), so I cannot use Cronbach's alpha to compute reliability. I have seen in several papers that it is possible to use the multidimensional extension ...
If $$E[f(x)]=0$$ can we derive that $$E[f'(x)]=0?$$ For example $f(x)$ means some noise with zero mean, gaussian distribution.
I have built an unrestricted co-occurrence network of words from a songs corpus. To convert it to a restricted network, Ramon Ferrer Cancho and Ricard V. Sole describe the following approach in their paper The small world of human language: The technique can be improved by choosing only pairs of consecutive words, the...
Say we want to perform a logistical regression analysis (although my question pertains to regressions in general) on sports results to determine the effects of various factors on who wins and who loses. We have the background information we want on the teams and players and now just need a random sample. So we decide ...
I'm working with some large data sets using the gbm package in R. Both my predictor matrix and my response vector are pretty sparse (i.e. most entries are zero). I was hoping to build decision trees using an algorithm that takes advantage of this sparseness, as was done here). In that paper, as in my situation, most i...
In a previous question, I inquired about fitting distributions to some non-Gaussian empirical data. It was suggested to me offline, that I might try the assumption that the data is Gaussian and fit a Kalman filter first. Then, depending on the errors, decide if it is worth developing something fancier. That makes sen...
When we perform a principal components analysis (PCA) on a multivariate data set we are interested in finding orthogonal components that explain maximal variance in the data set. We can form a biplot of the data using the scores and the loadings, and the locations of the sample points in the biplot are an approximation...
I am using a ranksum test to compare the median of two samples ($n=120000$) and have found that they are significantly different with: p = 1.12E-207. Should I be suspicious of such a small $p$-value or should I attribute it to the high statistical power associated with having a very large sample? Is there any such thin...
I have some data on the number of times each of my machines turned off (due to an error) in a particular time period. There are about 6 different classes of machines being used to construct a total population of 50 machines. I wanted to analyze the stability of the 6 classes of machine relative to each other. An acqua...
Assume that you have a regression with a whole set of variables and you know that the residuals are not normal distributed. So you just estimate a regression using OLS to find the best linear fit. For this you disclaim the assumption of normal distributed error terms. After the estimation you have 2 "significant" coeff...
I have tested a regression framework's robustness to noise and I have noticed in some cases that adding noise improves the prediction performance and in other cases the performance degrades. What could be the reasons for this? If there are multiple reasons, how to I determine which is the cause? Edit: Some more details...
Is it possible to take the log of an independent variable in a Poisson regression? What to I have to be aware of, when doing so? (The results are getting better, when assuming that the independent variable is with log link.)
I just need a little bit of a push in the right direction. I'm working my way through Hayashi's Econometrics and hit a snag in section 1.4. Review question 7 asks: Show that, under Assumptions 1.1-1.5, $Var(s^2|X)=\frac{2\sigma^4}{n-K}$ Hint: If a random variable is distributed as $\chi^2(m)$, then its mean is $m...
I teach an introductory economic geography course. To help my students develop a better understanding of the kinds of countries found in the contemporary world economy and an appreciation of data reduction techniques, I want to construct an assignment that creates a typology of different kinds of countries (e.g, high-i...
I have consulted two texts on how to calculate to calculate confidence intervals when N is small and the population standard deviation is unknown. There are some differences in the formulas they give and the end result varies depending on which text I follow (although not by a large amount). Text one says: Calculate t...
I am trying to determine the probability of a "mixed panel" assignment (i.e., a panel of judges w/at least 1 woman). Consider the following: A court has a total of 20 judges, 8 of whom are women. Panels of 5 judges are randomly drawn to decide any given case. What is the probability of drawing a panel on which at leas...
I have been investigating the possibility of using the interval between uncommon events to test for changes in the frequency of such events over time. As an example, say that the event is breaking a record in some sporting competition. This might occur at most a few times a year, and the data segmentation problem (whet...
I have the following dataset (triplicate values of 5 independent measurements and duplicate values of a control): Sample 1 Sample 2 Sample 3 Sample 4 Sample 5 C 181.8 58.2 288.9 273.2 290.9 53.9 120.3 116.8 108.9 281.3 446 39.6 86.1 148.5 ...
Suppose you have a casino with n poker players. Each player has a win rate - the amount of money he wins or loses per hand. We assume that these win rates are normally distributed with a mean of 0. (We also assume that the players don't pay the casino any money.) Our goal is to estimate the variance V of the distributi...
I'm really having trouble finding out how to compare ARIMA and regression models. I understand how to evaluate ARIMA models against each other, and different types of regression models (ie: regression vs dynamic regression with AR errors) against each other, however I cannot see many commonalities between ARIMA model ...
I have 5 checklists with different perfect scores. Say, I have checklist A-E with their corresponding perfect scores: A = 24 B = 17 C = 38 D = 41 E = 25 Each item in all the checklists are equivalent to 1 point. I want to compare one item from one checklist to another item in other checklists. How could I make the weig...
SPSS provides the output "confidence interval of the difference means." I have read in some places that it means "95 times out of 100, our sample mean difference will be between between these bounds" I find this unclear. Can anyone suggest clearer wording to explain "confidence interval of the difference in means"? Thi...
What is the difference between a multiclass problem and a multilabel problem?
How can I compare the following mutual information values ? I'm just wondering what's the most appropriate way to display them in my report table. I'm computing them with this formula where e and c are clusters and the intersection is the number of elements in common. For each couple e and c I have a I value (mutual i...
Assume that you have a Poisson model with overdispersion. Besides negative binomial models, what are other appropriate count-data modeling regression techniques?
I have a broad question about sliding window validation. Specifically, I am looking at using Rapid Miner to predict future values of a financial series using "lagged" values of that series and other covariates. I have been experimenting with the windowing operator in this software and lagging the values to prepare for ...
The "Introductory Statistics with R" book contains a section that deals with correlations (section 6.4 in the second edition). The book shows Pearson, Spearman and Kendall correlation coefficients computed on the blood.glucose and short.velocity columns of the thuesen data set. The p-values associated with these coeffi...
I would be interested in finding ways in R for efficiently updating a linear model when an observation or a predictor is added. biglm has an updating capability when adding observations, but my data are small enough to reside in memory (although I do have a large number of instances to update). There are ways to do thi...
I'm estimating some count data. I have counts for say $m=100$ individuals. Unfortunately when using the Poisson regression overdispersion occurs. So I was thinking to fit a negbin model. But this is not appropriate in my case. So I assume that I can not fit a Poisson regression, because the way the Poisson distribution...
I'm trying to fit a hierarchical model using jags, and the rjags package. My outcome variable is y, which is a sequence of bernoulli trials. I have 38 human subjects which are performing under two categories: P and M. Based on my analysis, every speaker has a probability of success in category P of $\theta_p$ and a pro...
I am analyzing data from two surveys that I merged together: School staff survey, for years 2005-06 and 2007-08 School students survey, for years 2005-06 through 2008-09 For both of these data sets, I have observations (at the student or staff level) from 3 different school districts, each having representative sampl...
In the card game Pitch how do I calculate when my opponents have 12 cards out of 52 if they have the Ace, King or Queen of a suit? I assume there is only about a 22% chance of the Ace being in their hand, but I don't know how to add the other two cards. I want my Jack to be the high card, or my partner to have it, we ...
I collect blood from one human (donor), separate leukocytes and put $2\times10^6$ of them per each well of five: well 1: $2\times10^6$ Lk (leukocytes) well 2: $2\times10^6$ Lk well 3: $2\times10^6$ Lk well 4: $2\times10^6$ Lk well 5: $2\times10^6$ Lk (Lk consists of a mix of different sets of cells and one ...
Why is it so successful for the lasso, though for most other problems standard Quasi-Newton approaches seem to be preferred? I sort of have this vague geometric idea that it might have to do with the shape of the $L_1$ ball, but haven't really been able to formalize it.
I have a dataset with 4025 participants across two time points. I have scored them on a three-point categorical variable (Unlikely, Possible, Probable) at each time point. I would like to visualize the various patterns of change (e.g. going from Unlikely at T1 to Possible at T2 or going from Possible at T1 to Unlikely ...
In the extreme case where all of the components of an $M$-variate observation are pairwise independent from each other, a multivariate normal distribution can be decomposed into the product of $M$ univariate normal distributions. For example, $$p \left( X_{1},X_{2},X_{3};[\mu_{1},\mu_{2},\mu_{3}]^{T},\left[\begin{array...
Short question: What happens to the beta-binomial distribution, when n increases to infinity? Is there a count distribution arising like it's for the classical binomial distribution?
You may have heard about the recent enterohaemorrhagic E. coli (EHEC) outbreak in Germany. What questions would a statistician ask about EHEC analysis ? I'm thinking of Q+As between reporters / public officials ↔ non-experts, say teachers and engineers with a Diplom / Master's degree but at most a smattering of statis...
I have calculated the repeatability of individuals' responses to a stimulus using the methodology of Lessells & Boag (1987) Auk 104:116, where repeatability r = among-groups variance component / (among-groups variance component + within-groups variance component). How do I assign confidence intervals to my estimate of ...
What approaches are there to perform FA on data that is clearly ordinal (or nominal for that matter) by nature? Should the data be transformed our are there readily available R packages that can handle this format? What if the data is of a mixed nature, containing both numerical, ordinal and nominal data? The data is f...
Background Conventional approaches to fitting a priori models to observed data seek to find those model parameters that maximize the likelihood of the data. For more complicated models, this typically necessitates an iterative search across a reasonable parameter space, computing the likelihood of the data given each c...
I am tasked with analyzing data to find "triggers" to an event. Specifically, this is transaction data from a bank (e.g., checking account daily balances, daily over draft fees, daily number of checks cleared etc) and the event of interest is the checking account being closed by the customer. It sounds like I am really...
The "exclusive or" function has a long and arduous history in the AI/machine learning communities. From my understanding of "association rule learning", xor would appear to be a problem for this type of learning. That is, suppose we have the following data: A B C 0 0 0 0 1 1 1 0 1 1 1 0 ...
It's hard to think of a more eloquent way of phrasing this question - I'm basically wondering if a classifier trained on data where examples of some of the classes are infrequent/rare would be a bad model? I'm mainly interested in decision trees (C4.5). I think the answer is no, but that you will get a high error, bec...
I have Case Fatality Rates (deaths per 100 cases) for 2 different states receiving different treatments for 17 years. What is the best statistical method to compare Case Fatality Rates ? The data are like this Year St.1 Cases St.1 Deaths St.1 CFR St.2 Cases St.2 Deaths State2 CFR 1994 1836 383 2...
I've to draw a polygon which will join the four vertexes on the plot in R. For this I need minimum value of X which has minimum Y value. X <- c(-62, -40, 9, 13, 26, 27, 27) Y <- c( 7, -14, 10, 9, -8, -16, 12) plot(x = X, y = Y) abline(h = 0, v = 0, lty = 2.5, col = "green", lwd = 2) I've tough time to fi...
Should covariates be included in regression analyses if they are correlated with the dependent variable or if they are correlated with the predictor variable/s. Alternatively, should they be included as a result of past (fairly robust) findings that they are significantly related to the outcome and/or predictor variabl...
How can I add new variable into data frame which will be percentile rank of one of the variables? I can do this in Excel easily, but I really want to do that in R. Thanks
Could someone tell me what the term 'persistence' mean in time series analysis? It's regarding econometrics and applied regression.
I am starting to use R's dynlm package. Currently I am just looking at the fit and eyeball which choice of lags might be the best. Is there a standard way or a strategy to determine the best k parameters for L(). What I often see is ridiculously high lags like k=10 in a quarterly series delivering the best fit. What co...
I already posted about exploratory factor analysis to understand the difference with PCA. Now, I carried out an exploratory factor analysis on my data set by using the R's psych::fa function. I have some perplexities about the interpretation of the results listed here below. A is the matrix of my data having 16 rows an...
I have data on a variable spanning multiple years. I want to see how the distribution has evolved over the years. Is there an easy way to produce a density plot for each year in single plot with different colours for each year?
Assume there are a number of customers, each of which has made one more orders. You now see a sample/subset of orders (lets say 1,000,000 out of 10,000,000) but do not know the total number of customers. How to estimate the total number of customers in the full dataset, based on the sample? I can assume that the number...
I am using auto.arima() for forecasting. When I am using any in built data such as "AirPassengers" it is capturing seasonality. But, If I am entering data in any other format (in vector form or from an excel sheet) it is not detecting seasonality. Is there any specific format in which it detects seasonality or I am doi...
I have a lin-log regression model like $$Y = b_0 + b_1 \log(x_1 + 1) + e.$$ The distribution of $x_1$ is very skewed, thus I use the natural logarithm to get a more Gaussian like distribution. Because 3 out of 100 values have zero as entry I add a constant c, in my case plus 1, to avoid -Inf. The resulting estimation o...
I have 2 variables, both from class "numeric": > head(y) [1] 0.4651804 0.6185849 0.3766175 0.5489810 0.3695258 0.4002567 > head(x) [1] 59.32820 68.46436 80.76974 132.90824 216.75995 153.25551 I plotted them, and now I would like to fit an exponential model to the data (and add it to the plot) but I cannot find any i...
In stage 1 we test many SNPs, in stage 2 we try to confirm these SNPs. Usually we start with less sample, but then it's hard to detect a signal. For example, if we can afford 3000 samples, how to allocate these 3000 people in two stages?
I have simple linear regression model. What I want to calculate is how "important" each of my input variables are i.e. to make a statement something like this: "60% of predictive power in this model comes from variable var1, wheres var2 and var3 have30% and 10%" respectively" What I need to do to calculate these percen...
Does anybody know how to interpret a whole bunch of effects (main and interaction) in a clever way? Or does anybody have a good example where it's shown? To be more precisely: Assume that you have a lot of effects in your model (main and interaction effects) and you know that standard errrors and coefficients are bias...
I have a bunch of documents (66 quarterly reports on grievances and complaints on health care services provided and growing) and a list of words that I'd like to follow over time. What is the easiest way to do this? I have played with R's text mining library and have got rather frustrated. I have also tried to use R...
From the pdf of the Poisson distribution I would expect $\Pr(x=1)$ to be $$\lambda dt \cdot \exp(-\lambda dt)$$ I can see that as $dt$ gets very small, $\exp(-\lambda dt)$ becomes close to $1$, and so suggests $\lambda dt$, but I don't see why in the limit as $dt \to 0$ of $\lambda dt \cdot \exp(-\lambda dt)$, doesn't...
I have a dataset with 1500 patients with data on recurrence of a disease. Follow-up time varies between 1 and 15 years. Approx 10% have recurrence. What I´d like to do is create a predictive model for recurrence into n similar groups that share the same temporal recurrence risk. This so that I could advise on an optima...
In R the princomp()and the factanal() are somewhat similar. At least their output looks pretty similar. I learned that this is not surprising since the print function of princomp comes from factanal. I understand that SS loadings do not make much sense for princomp as it is bounded to 1 anyway. Moreover, as Joris state...
Consider the following survey question: Q: Choose one or more of the following 5 items: A B C D E How can one test which items are more frequently chosen for a sample with 100 individuals? Is it advisable to fit a distribution to the data?
Context An experiment in agronomy whose aim is to investigate the possible effect of a treatment, with 13 possible levels, on the height of trees. Model $ Y_{ijk} = \mu_{\cdot \cdot \cdot} + \alpha_{i} + \beta_{j} + \gamma_{k(j)} + (\alpha \beta)_{ij} + \epsilon_{ijk} $ $Y_{ijk}$ is the response for the tree lying ...
I have a sample of 200 independent networks and I want to test the hypothesis that majority of vertices belong to one giant component. I wonder what is the appropriate approach to do that. More formally, suppose we have two variables, $A$ and $B$, where $A$ denotes number of vertices belonging to a giant component in a...
In my master thesis I have drawn a few hypotheses. I have answered them all with linear regression. In these linear regressions, I took control variables into account. My question is: do I have to run a mediation analysis? Or is it also possible to report the regressions of all relations separately (for example: X -> ...
I'm trying to understand confidence intervals but having some trouble. I've been doing some exercises I found online and I'm stuck on this question: I have been given a 95% confidence interval for a population proportion: (0.35, 0.40), a sample size of 200, and I need to find a 99% confidence interval. The methods I wou...
I've met the following randomized trace technique in M. Seeger, “Low rank updates for the Cholesky decomposition,” University of California at Berkeley, Tech. Rep, 2007. $$\operatorname{tr}(\mathbf{A}) = {E[\mathbf{x}^T \mathbf{A} \mathbf{x}]}$$ where $\mathbf{x} \sim N(\mathbf{0},\mathbf{I})$. As a person without deep...
I'm trying to generate multivariate data shaped like Saturn (long story). More formally; *cluster 1 is a rank-p Gaussian with correlation matrix R (where every out of diagonal entry of R is the same number in $(0,1)$). cluster 2 is a bunch of points distributed on a hyper-plan of rank p-1, around the equator of cluste...
I will be too happy help me find the exact value or a very tight exponential upper bound for: $$\sum_{k=1}^{N-1} \alpha^k \beta^{\frac{1}{N-k}}$$ where $0 \leq \alpha < 1$, $\beta= \exp(-N^2\zeta)$ and $\zeta$ is a positive small value. Thanks a lot in advance.
I calculate (with flow cytometry) pecentage of lymphocytes with a specific receptor (Lph*) as a ratio to general number of lymphocytes (Lph). Should I consider them (Lph*) as Poisson distributed? (My data set is here.)
I've got a (probably easy) question in how to handle empirical studies, when there are a lot of effects involved. I have a whole bunch of variables and I'd like to analyze just a few of them. But the problem is, that the model is wrong... So standard errors and coeficients itself are probably biased and so t-statistics...
I'm currently working on a plot engine for my project. This engine should be robust for a wide range of inputs. In order to analyse the data, I'm plotting a series of graphs utilising python/matplotlib. Among them is the following: I think this graph is not good because the data being plotted first (high pressures, re...
I have 5 variables and I'm trying to predict my target variable which must be within the range 0 to 70. How do I use this piece of information to model my target better?
Reading the Linear Mixed Model (LMM) literature I am aware that fitting a model using REML provides better estimates of variance parameters than fitting via ML. However, we should not compare nested models fitted with REML that have different fixed effects. Recently, I have been fitting some models using GLS via the gl...
I am now plotting some bars and pictures for use in presentation. Really interested in different ways of showing confidence intervals on the plots.
I'm analyzing pairwise correlations of time series between two different types of microarrays done for several samples as biological replicates. So, I have M1 number of variables on type 1 array, M2 number of variable on type 2 array, N samples and T time points. For each sample, I calculate M1 x M2 correlation coeffi...
I have a large data set containing children's scores on arithmetic tasks with a lot of missing values possibly due to the age of the children? My hypothesis is that the missingness is not completely at random but at random. I need to do a CFA and want to know whether I need to condition on age or not? I know SPSS 17 ha...
Imagine that you repeat an experiment three times. In each experiment, you collect triplicate measurements. The triplicates tend to be fairly close together, compared to the differences among the three experimental means. Computing the grand mean is pretty easy. But how can one compute a confidence interval for the gra...
I'm using offset for the first time (as per a recommendation from a colleague) and have a couple questions about interpreting my results. Our ultimate goal is to look at the effect of some population level treatment on disease incidence (cases/population). We've decided to use poisson models, but there are surely a v...