instruction
stringlengths
9
38.7k
We conducted an experiment on hens with seven treatments (medicines) replicated three times. Every treatment was implemented on a flock of fifteen young hens and three of these treated hens were slaughtered after 7, 14, 21, 28, and 35 days and measurements were observed. I wonder whether these data should be analyzed ...
To Burr and other experts on this topic: I tested, well rather ad-hocly the R-package multitaper, and I succeeded getting graphical outputs. I got graphs for (a) spectrum, (b) spectrum with confidence interval and a graph for the F-test. I have a couple of questions related to the package and the output which I hope wi...
In a cross-validation setting (LASSO penalized logistic regression), I'm calculating AUC. However, I'm interested in the variability of these estimates over the folds (this will give me an indication of the stability of my model selection over the folds). As such, I want to find the empirical AUC in each of the 10 val...
I tried to test if I should normalize the dataset before doing distribution fitting. > a1 <- rgev(2000, loc= 0.449, scale=0.7423, shape=0) > a1_scale <- scale(a1) > fgev(a1, shape=0) Call: fgev(x = a1, shape = 0) Deviance: 5159.472 Estimates loc scale 0.4619 0.7495 Standard Errors loc scale 0.01...
Does anybody know the meaning of average partial effects? What exactly is it and how can I calculate them? Here is a reference that might help.
If I have missing values in a time series that has 40 quarters (ten cycles or ten years) of data, what is the best SAS procedure to use to impute the missing values? Part 2: I have 390 series (40 quarters each) that follow similar patterns -- most have missing data points (2-3 each), how do I make use of the other 3...
Background: I’m analyzing data with mixed-models (lmer in lme4) from an experiment that had RTs and Error Rates as dependent variables. This is a repeated-measures design with approximately 300 measurements for each of the 190 human subjects. The fixed-effects are 1 between-subjects experimental manipulation (dichotomo...
Suppose we have two estimators $\alpha_1$ and $\alpha_2$ for some parameter $x$. To determine which estimator is "better" do we look at the MSE (mean squared error)? In other words we look at $$MSE = \beta^2+ \sigma^2$$ where $\beta$ is the bias of the estimator and $\sigma^2$ is the variance of the estimator? Whicheve...
Suppose I have a $95 \%$ confidence interval for $\mu$ with population variance $\sigma^{2}$ known. It will be of the form $$[\bar{X}-1.96 \sigma/\sqrt{n}, \bar{X}+1.96 \sigma/\sqrt{n}]$$ The statistical interpretation of this is that $95\%$ of the confidence intervals will contain the true mean? I know individually, ...
Suppose I have two sets $X$ and $Y$ and a joint probability distribution over these sets $p(x,y)$. Let $p(x)$ and $p(y)$ denote the marginal distributions over $X$ and $Y$ respectively. The mutual information between $X$ and $Y$ is defined to be: $$I(X; Y) = \sum_{x,y}p(x,y)\cdot\log\left(\frac{p(x,y)}{p(x)p(y)}\right...
Suppose I want to compare the difference between means of samples selected from two populations (the treatment and control). Assume both groups have normally distributed observations. Then $$Z = \frac{(\bar{X}_{t}- \bar{X}_{c})-(\mu_{t}-\mu_{c})}{\sqrt{\left(\frac{\sigma^{2}_{t}}{n_t}+ \frac{\sigma^{2}_{c}}{n_c} \right...
I'm having trouble modeling the following scenario: Roll two dice and take the best result. What is the proper way to model the average result from this? I understand intuitively that the average should go up, but I'm having trouble understanding exactly what plays into this increase. Furthermore, is the increase g...
I want to use BIC for HMM model selection: BIC = -2*logLike + num_of_params * log(num_of_data) So how do I count the number of parameters in the HMM model. Consider a simple 2-state HMM, where we have the following data: data = [1 2 1 1 2 2 2 1 2 3 3 2 3 2 1 2 2 3 4 5 5 3 3 2 6 6 5 6 4 3 4 4 4 4 4 4 3 3 2 2]; model = ...
I am a biologist rather than statistician so I might lack some insight. I have measurements on two paired groups (baseline and follow-up) along with a separate group of healthy controls. In addition the design of the study is unbalanced (n = 12 for B and F and n = 5 for HC). Question Is there an ANOVA technique that ...
I am measuring protein in humans using two different types of measurement techniques, X and Y (measured on different scales). I have two replications for type X and four for type Y. I average the two measurements for X and average the four measurements for Y to get the 'true' protein average. There are about 120 sub...
For an examination, scores for 10 students (all from class 4B) were obtained. I want to convert each score to E-value. If I understand correctly, to calculate E-value I have to determine an unrelated population first, so, I also got scores for 30 students in Class 4A. For discussion, I have generated two datasets her...
In principal components analysis, the first $k$ principal components are the $k$ orthogonal directions with the maximum variance. In other words, the first principal component is chosen to be the direction of maximum variance, the second principal component is chosen to be the direction orthogonal to the first with the...
Let's say I got a reading of 5 for a given measurement. For a random population, I got the following dataset of readings: random <- c(2,2,1,1,5,76,3,89,35,66,77,22,99,100,0,34,67,88,95) I want to determine the probability of getting a reading equal or less than my reading of 5 based on this random population. Could ...
I fitted a Bayesian logistic regression in WinBugs and it has an interaction term. Something like this: $$\mathrm{Prob}(y_{i}=1) = \mathrm{logit}^{-1} (a + b_{1}*x_{i} + b_{2}*w_{i} + b_{3}*x_{i}*w_{i})$$ where $x$ is a standardized continuous variable, and $w$ is a dummy variable. In reality the model is more complica...
Table 18.1 in the Elements of Statistical Learning summarizes the performance of several classifiers on a 14 class data set. I am comparing a new algorithm with the lasso and elastic net for such multiclass classification problems. Using glmnet version 1.5.3 (R 2.13.0) I am not able to reproduce point 7. (the $L_1$-pe...
Could someone point me to an introductory-level explanation (think Wikipedia entry) of what sequential change point detection is?
When I insert the p-value 3.2531E-129 into excel's CHIINV function I get #NOMBRE as a result. How do I find or report the chi-square value if this doesn't work? Someone suggested I wrote out the 0 when the value was 6.1203E-05 to 0,0000061203. So, how can I change 3.2531E-129 to 0.000000......32531? Thank you for your...
I have a big dataset in the form: $X_1, X_2, X_3, X_4, Y$. All the $X_i, i \in {1,...,4}$ come from different unknown distributions and $Y$ follows a bernoulli distribution, so it can take only values in $\{0, 1\}$. The problem is how I can predict the value of $Y$ given the observations for $X_i$. From what I know, th...
So my question is asking for recommending good Q&A sites about machine learning, NLP or data mining. I think guys here may often go to these relevant sites.
I have downloaded the most recent GPML Matlab code GPML Matlab code and I have read the documentation and ran the regression demo without any problems. However, I am having difficulty understanding how to apply it to a regression problem that I am faced with. The regression problem is defined as follows: Let $\mathbf{...
I am doing some exploratory data analysis in the Heritage Health Prize , and have come across a weird error using R's caret package. In the dataset, I've created a dataframe counting how many times a patient (by MemberID) has visited a specific primary care physician (denoted by a number) in year 1 insurance claims. Le...
I've recently calculated a hazard ratio doing a multi variable Cox regression analysis (Kaplan Meier) for an assignment. Part of my feedback was to adjust the hazard ratio to a 'crude ratio'. How do I do that? I'm using SPSS 19/PASW.
When I took courses in theoretical statistics as an undergrad 10 years ago, we used Modern Mathematical Statistics by Dudewicz and Mishra. I find myself referring back to the book now and am reminded some of the code examples are in assembly for an IBM 370. While quaint, I cannot help but feel this is somewhat dated....
I find resources like the Probability and Statistics Cookbook and The R Reference Card for Data Mining incredibly useful. They obviously serve well as references but also help me to organize my thoughts on a subject and get the lay of the land. Q: Does anything like these resources exist for machine learning methods? ...
I am carrying out a study to find out meteorological patterns using daily met observations including around 30 met parameters (each day is a case with 30 variables). My methodology includes carrying out a PCA: To reduce 30 variables to smaller number of PCs. Find out the PC scores for all days in the ten years. As fi...
I carrying out a gene set analysis to investigate if a list of genes are differentially expressed before and after a medical treatment (paired analysis). The list of genes was made (a priori) by a promoter analysis, where genes that are likely to bind to a specific DNA promoter region was computationally identified. Th...
As both a stats and R novice, I have been having a really difficult time trying to generate qqplots with an aspect ratio of 1:1. ggplot2 seems to offer far more control over plotting than the default R plotting packages, but I can't see how to do a qqplot in ggplot2 to compare two datasets. So my question, what is the ...
In R, why do the default settings of qqplot(linear model) use the standardized residuals on the y-axis? Why doesn't R use the "regular" residuals?
I play a game online (Heroes of Newerth) which has a large ladder of players, each player having a couple of different ratings. I've manually gathered the rating data for all percentiles of players but am blanking at how to turn this into a histogram and compute the Mean and Standard Deviation. I'd also like to have a ...
I am new to statistics and I currently deal with ANOVA. I carry out an ANOVA test in R using aov(dependendVar ~ IndependendVar) I get – among others – an F-value and a p-value. My null hypothesis ($H_0$) is that all group means are equal. There is a lot of information available on how F is calculated, but I don't kn...
I want to do a time-frequency analysis of an EEG signal. I found the GSL wavelet function for computing wavelet coefficients. How can I extract actual frequency bands (e.g. 8 - 12 Hz) from that coefficients? The GSL manual says: For the forward transform, the elements of the original array are replaced by the discrete...
I thought that 'pooling data' simply meant combining data that was previously split into categories...essentially, ignoring the categories and making the data set one giant 'pool' of data. I guess this is a question more about terminology than application of statistics. For example: I want to compare 2 sites, and withi...
I was looking over the solution to this question on SO and it got me thinking about computing probabilities for a Gaussian mixture model. Let's assume you've fit some Gaussian mixture model so that it results in a mixture of three normals: \begin{equation} X_1 \sim \mathcal{N}(\mu_1,\sigma_{1}^{2}), \quad X_2 \sim \ma...
I am not very good in statistics (ok, I'm really bad), I guess this is a very simple question but I dont understand much of the literature. I have a dataset that is arranged in 2 columns (var1 is my response variable, var2 my predictor). Based on Pearson correlation coefficient, I found that my data is correlated (with...
I have plot ROC for several models. These models were used to classify my samples into 2 classes. Using these commands, I can obtain sensitivity vs. specificity plots for each model: perf <- performance(pred, "sens", "spec") plot(perf) Should I rely on the area under the curve (AUC) for each model to conclude which m...
When performing 5-fold cross-validation (for example), it is typical to compute a separate ROC curve for each of the 5 folds and often times a mean ROC curve with std. dev. shown as curve thickness. However, for LOO cross-validation, where there is only a single test datapoint in each fold, it doesn't seem sensical to ...
I am trying to calculate inter-rater reliability scores for 10 survey questions (on which there were 2 raters)--seven questions are binary (yes/no), and 3 are Likert-scale questions. Should inter-rater reliability be tested on EACH of the 10 questions, or is there an overall inter-relater reliability test that tests r...
I am a bit confused about parameter estimation using evolutionary methods and their ability to do such a job. Since I am not that pro in stat I am describing my problem with giving an example. Given different response variable, say Y and in my example molecular weight there are different constant value/weight that can ...
Suppose people take a 10-item exam. For each item, $k = 1,2,…,10$, exactly one rater assigns a score to exactly one person, with the constraint that no person sees the same rater twice. There are $i = 1,2,…,5000$ people and $j = 1,2,…,500$ raters. So people and raters are partially crossed, with most person-rater pairs...
I know that generative means "based on $P(x,y)$" and discriminative means "based on $P(y|x)$," but I'm confused on several points: Wikipedia (+ many other hits on the web) classify things like SVMs and decision trees as being discriminative. But these don't even have probabilistic interpretations. What does discrimina...
I am looking to train a classifier that will discriminate between Type A and Type B objects with a reasonably large training set of approximately 10,000 objects, about half of which are Type A and half of which are Type B. The dataset consists of 100 continuous features detailing physical properties of the cells (size,...
The dependent variables (DV) have to be normally distributed. I have a problem because some of them aren't. I have one independent variable (IV), namely type of education. The DV's are Externalizing problems, Internalizing problems, Self-image, Motivation, Neuroticism, Perseverance, Social anxiety, Visciousness and Dom...
I often need to forecast for future periods in monthly series of data. Formulas are available to calculate the confidence interval at alpha for the next period in the time series, but this never includes how to treat the second period, and third, etc. I'd visually imagine that if any forecast was graphed with upper and...
How can I obtained the estimated variance of a linear model when using R, i.e. \begin{equation} \widehat{var(y)}. \end{equation}
I have 5 variables for 1000 observations. Given the data, I need to Calculate probability of hitting top 5 pct in each of the distributions separately. For example, for the value of 123.45 I need to calculate how probable is that this vale is from the top 5pct. Calculate probability that a particular observation (give...
I have a question that's been bothering me research wise. The situation is as follows: We are measuring a quantity in subjects for which we assume that it differs significantly between subjects, which we would like to prove. For each subject we have 2 measurements of this quantity at two different times (t...
dependent variable: one of three forms of a word-ending independent variables: age, language, word stem with 3 levels random effects: speaker, sentence Each speaker produces many sentences, so it repeated measures is required.
I am working with a database with missing data. I have done "Roderick J. A. Little’s chi-square statistic" and knew that my data are not MCAR. However, I know don't have can I determine if there are MAR or NMAR. I was wondering if there is a test that you may suggest me. Also, how we can know that how many imputations ...
@RyanB thank you for your quick reply and your help! I conducted an experiment supporting that men are attracted by women in red. I recruited 30 men and 25 women who followed exactly the same procedure: They had to listen to 4 dialogues between a man and a woman which one of them lasts for 30-40 sec. They hear the firs...
Say I have 10,000 data in 2-D and I want to fit a curve to them. There are many functional forms this curve could take -- polynomial, B-spline, trigonometric, and so on. I've decided that I only want to use 4 parameters. Is there a way to figure out what is the most accurate functional form? That is, considering all po...
What is a good rule of thumb for how to choose the question for the null hypothesis. For instance, if I want to check if the hypothesis B is true, should I use B as the null, B as the alternative hypothesis, or NOT B as the null? I hope the question is clear. I know that it has something to do with the error I want to ...
In R, how can I perform a two sample t-test in the case of equal variances? My actual problem is to compare different algorithms for length measurements in machine vision. I have studied Applied Statistics and Probability for Engineers by Montgomery & Runger and I have tried to implement the test in R and compare the r...
I spent three days dabbling with tm after reading a draft paper by a friend where he explored a text corpus with UCINET, showing text clouds, two-mode network graphs and Single Value Decomposition (with graphics, using Stata). I ran under a large number of issues: on Mac OS X, there are issues with the Java behind libr...
Possible Duplicate: Change point analysis using R's nls() I want to do a nonlinear regression with nls() but also include a specific type of segmented or piecewise regression. The Formula I want to implement is: S ~ b0 + (A > T) * b1 * (A - T) T should be the threshold value or breakpoint as identified by the nonli...
I am trying to cluster 6 PC scores for a 1600 cases data (so its a 1600 x 6 matrix). I am using average linkage clustering technique that would be followed by a K mean clustering. The purpose of Average linkage clustering is to provide seed values for K mean clustering. Would somebody explain me how to extract the resu...
I have a point (x,y) that I need a linear regressor to pass through given a data set (X,Y). How do I implement this in R?
I have a dataset that I can collect some quantities from, eg. sum,mean,variance... I want to perform a simple regression on column(x,y). According to Wikipedia, the closed form for $\alpha,\beta$ is \begin{equation} \alpha=\frac{Cov(x,y)}{Var(x)} \quad \mbox{and} \quad \beta=\bar{y}-\beta\bar{x}. \end{equation} Howeve...
I ran an ad campaign on Facebook and I have impressions (ad-views), clicks, and sign-ups broken down by gender and age. Certain demographics have a higher rate of clicks and sign-ups when compared to their respective percent of impressions. What is the best way to determine if these differences represent significant re...
I understand the Max likelihood estimators for mu and sigma for the lognormal distribution when data are actual values. However I need to understand how these formulas are modified when data are already grouped or binned (and actual values are not available). Specifically, for mu, the mle estimator is the sum of the ...
Mathematically speaking, for which data does a logistic regression model have a unique solution?
I'm talking with my advisor about how to compute standard deviations for, say, combined standardized test scores for admissions purposes. For example, we'd be interested to compute the sum of the verbal and quantitative scores from the GRE, which are correlated, and normed to be approximately normal. More formally, say...
Can anyone point me out a k-means implementation (it would be better if in matlab) that can take the distance matrix in input? The standard matlab implementation needs the observation matrix in input and it is not possible to custom change the similarity measure.
In this case, "generic" being the entire gauntlet of macroeconomic time-series that private and government statistical offices put out. Some background - I recently started working at a data provider - we collect data releases and repackage them in a presumably more convenient and accessible fashion for our clients, an...
(I am far from an expert in the field of statistics, so I apologize beforehand if my question is irrelevant or my use of any terms is incorrect) Let's suppose that we have a discrete variable $X$, and a set of $n+1$ observations $\{x_0, x_1, \dots, x_n\}$. The values of $X$ may not be numeric and all observations are c...
I am trying to estimate number of different unique visitors who visited a given website (online store). There are hundreds of millions of visits to the store and so this task is too difficult to handle by my database. Note that one visitor may have more than one visit so it is not enough to count number of all records,...
I have 10 years of backtested simulated performance of some trading strategy (using historical prices), and N months of actual trading performance. I want to compare the two. How big does N have to be to get a statistically significant comparison? I'm comparing returns and Sharpe ratios.
I'm using latin hypercube sampling to draw parameter values for an epidemiological simulation model (about 30 parameters, following various distributions), and so far I haven't been able to find any good rule of thumb/heuristics/theory for choosing the number of samples (i.e. the number of equiprobable intervals).
There are two forms for the Gamma distribution, each with different definitions for the shape and scale parameters. Rather than asking what the form is used for the gsl_ran_gamma implementation, it's probably easier to ask for the associated definitions for the mean and standard deviation in terms of the shape and scal...
This is a supervised learning problem. Ideally would like to work in R due to having an easy way to pre-process the input data, but could work around that as well. For each sample, input consists of tens of thousands of features. These are genomics data and will likely need to be reduced to a manageable amount, somehow...
I have 10 years of backtested simulated performance of some trading strategy (using historical prices), and N months of actual trading performance. What statistical test can I do find out if I'm on target with the backtesting numbers? (both, in terms of expected annual returns and expected annual Sharpe ratio)
I have the following setup. Parameters $W$ with density $\pi(w)$. Observed data $X_1,...,X_n$ iid. Density of $X_i|W=w$ is $f(x_i|w) = \int_{\Delta(x_i)} f(\mathbf c|w) \,d\mathbf c$. The simplex $\Delta(x_i) = \{\mathbf c \geq 0 : c_1 + \cdots + c_m = x_i\}$. I want to find the distribution of $W|X_1=x_n,\dots,X_n=...
Can you please recommend good reads on statistical analysis related to online fraud detection and prevention of account abuse? Thank you.
I'm trying to minimize a custom function. It should accept five parameters and the data set and do all sorts of calculations, producing a single number as an output. I want to find a combination of five input parameters which yields smallest output of my function.
What is the best imputation method for a dataset consisting of stochastic data? For example, let's say you have a table of security returns. In some cases the missings are random, in other cases are not. For example, a new IPO would have a relatively short time-series. Suggestions: Expectations-Maximization algorithm ...
I have two dataset that i want to compare. each dataset contain the weight of 10 different person measured for 3 different day. I am interested in measuring the probabily that the two sample originate from the same population. People seem to suggest doing a Kolmogorov-Smirnov test but i need a measurement. I was think...
I have two dataset that i want to compare. each dataset contain the weight of 10 different person measured for 3 different day. I am interested in measuring the probabily that the two sample originate from the same population. People seem to suggest doing a Kolmogorov-Smirnov test but i need a measurement. I was think...
Is there any software package to solve the linear regression with the objective of minimizing the L-infinity norm.
I have pairs of values from two runs (replicate) for each sample along with total count for each run. I assumed each value as random binomial. I used log-likelihood ratio test to compare each pair, but my data range is wide, e.g. X1, X2 = (0,0), (0,1), (0,2), ..., (20, 20) with total counts for each run (n1, n2) range ...
How can I transform a variable (non linear transformation) such that its values are more evenly spread, that is reduce the peak in the middle of the histogram and move more into tails?
What parameterization to glmnet will give the same results as glm? (I'm mainly interested in logistic and linear regressions, if that matters.)
I have two sets of data where I have at ~250.000 values for 78 and 35 samples. Some of the samples are members of a family and this may have an effect of the data. I have calculated pairwise correlation and it varies between 0.7 and 0.95 but I would like to know if there is significant difference in correlation coeffi...
I am new to Machine Learning, and am trying to learn it on my own. Recently I was reading through some lecture notes and had a basic question. Slide 13 says that "Least Square Estimate is same as Maximum Likelihood Estimate under a Gaussian model". It seems like it is something simple, but I am unable to see this. Can...
I have an experiment that perturbs variable x and causes a change in variable z. There is a concurrent change in variable y. How can I determine whether variable y is on the causal path between x and z or if it is an irrelevant epiphenomenon?
In the wikipedia article on Credible Interval, it says: For the case of a single parameter and data that can be summarised in a single sufficient statistic, it can be shown that the credible interval and the confidence interval will coincide if the unknown parameter is a location parameter (i.e. the forwar...
Could someone compare k-means and kernel PCA in the domain of vector quantization (memory, speed, effectivity, ...)?
The transfer entropy, from information theory, is an effective way to measure the one-way information dependence between two variables. A nice high-level summary is here: http://lizier.me/joseph/presentations/20060503-Schreiber-MeasuringInfoTransfer.pdf I see that there is a package for entropy and mutual information e...
Here i am again. From this script: model1 <- zelig(Decision ~ as.factor(age) + as.factor(income) + as.factor(town.type) + tag(town.type|town), model="logit.mixed", data=Fish) Does it mean that town.type is treated both as fixed effects and random effects and town treated as random effects nested in tow...
First off, let me say that I'm extremely poorly versed in statistics, and this is a question purely about terminology. I have a distribution for some quantity (height of person, say) and the most likely 95% of outcomes are within some range $h_0$ to $h_1$. I want to know what to call (ideally a 2 or 3 word phrase) this...
I used the following example code from latticeExtra to understand two-way clustering in R library(latticeExtra) data(mtcars) x <- t(as.matrix(scale(mtcars))) dd.row <- as.dendrogram(hclust(dist(x))) row.ord <- order.dendrogram(dd.row) dd.col <- as.dendrogram(hclust(dist(t(x)))) col.ord <- order.dendrogram(dd.col) li...
This is crossposted from StackOverflow. Someone suggested I should post it here. Though I don't have enough karma to post images. I'm working with gathering data from a biological monitoring system. They need to know the average value of the plateaus after changes to the system are made. This is data for about 4 minu...
I have already asked a question on this forum about this, but as I changed my experiment a bit and I am still confused. I conducted an experiment in which 25 men and 25 women listened to an attractive conversation and picked a photo (between a woman with red and a woman with green shirt) and next, they heard a neutra...
I conducted a t-test / ANOVA (both repeated measurements) and I want to represent the difference in the mean via a bar graph. There are several different views about the appropriate error bars for repeated-measurements: personal preference (Field, 2009), Root Mean Square Error (Estes, 1997) or rather Statistical Signif...
I would like to do something in R that SAS can do using SAS's proc mixed (there is some way to do in STATA es well), namely fitting the so called Bivariate model from Reitsma et al (2005). This model is a special mixed model where the variance depends on the study (see below). Googling and talking to some people famili...
If i have the relative proportion for two sample. For example : group 1: Male: 50% Female: 25% children: 25% group 2: Male: 50% Female: 20% children: 30% How can I measure the % of similarity between the two group?
I am not a statistics expert so please bear with me. It is about making predictions about how long something should take based on measurements of how long things took in the past. (Things like fixing software bugs) Up until now I have been using a normal standard deviation to be able to state things like "the average b...