instruction
stringlengths
9
38.7k
Let's say that I have a dependent variable, the probability of winning on ebay, and I want to model that on various variables. Let's say I have data on each individual ebay item I am bidding on and whether I won or not. Is there a way to model the probability of winning. Or would it better to think of the dep var as a ...
I would like to assess the correlation between a 7-category ordinal variable (X) and a number of other variables some of which are ordinal with 3-6 categories, others are continuous and a couple are dichotomous. The dataset includes only 24 observations and lack of normality and tied observations are therefore issues t...
I have box plots of 13 groups that I show in one plot. The groups have unbalanced populations and are not normally distributed. I want to show which pairs are statistically similar (i.e., have kruskal.test p-value < 0.05) by putting a,b,c, etc. on top of boxes that match. Here is a pseudo code to show what I have: A = ...
About combining multiple test statistics, Wikipedia says This Z-score (for the overall meta-analysis) is appropriate for one-sided right-tailed p-values; minor modifications can be made if two-sided or left-tailed p-values are being analyzed. What are those minor modifications?
Well, to figure out a distribution we need to do a histogram. We can also do a quantile normal plot. Is there some specific test/graph plotting (in Stata) that will help determine if a distribution is exponential or not? To be more specific, I am looking for something like normal quantile plot. Thanks.
Lehmann and Casella (http://www.springerlink.com/content/978-0-387-98502-2) state it as an example (Example 1.6.10) that for arbitrary continuous distributions, the order statistics are always sufficient. Is this a theorem, or are pathological examples known to exist? Are there necessary conditions for the order statis...
I wish to make a contrast matrix in the case of a linear model. I have one factor with three levels: T, N and A. I want the contrasts T vs N, T vs A and T vs (N and A combined). It is the last contrast with combined levels that cause troubles. The "correct" result I can get by redefining N and A to a new combined leve...
I'm looking to analyze data coming from a study for reduction in dependence on an addictive substance. We're looking at 4 subjective measures of clinical dependence called clinical global impression (CGI) scores. They have a domain of at most 7 possible outcomes. We're interested in looking at continuous differences be...
Does anybody know of any data sets that are publicly available and huge (i.e., in the petabyte ballpark). Ideally, the data set would be relevant to machine learning analyses. Maybe something from the physics, chemistry, natural-language-processing domains? I guess you could say the Web itself is such a data set, but I...
Can someone please help me with this? I need to do a regression in order to estimate the alpha's in this following equation, but I can't seem to get this equation to be in a format that i could use regression with.Ii was just looking to simplify this equation so that I can get something in the form of Y = constant + al...
Say I have a data set in the following format: {a:200, b: 100; c:400} The sum of a, b and c equals 700. Now, I have another value which is supposed to be the actual total say 500. How do I adjust this difference of 200 in the initial data set (the values for a, b and c must be proportionately decreased summing 200 - s...
I have a system whose output I am analyzing. I've used a very simple hypothesis test with great results and now am curious why did I get such great results -- did I perhaps stumble on some kind of an "optimal" test without much formal statistics training? My system can be in two states. When it's in state 0 the outpu...
I would like model some variables using a distribution that is not neither JAGS' nor OpenBUGS core distributions. Do you know how can I implement it? Thanks.
I have a dataset that comprises 200 males and 250 females and I am testing their responses on the relationship between X and Y. X and Y are continuous and X1 (gender) is categorical. I am using the general linear model in SPSS to test for main effects and interaction. As I understand it, this is an 'unbalanced' desig...
In my regression model, I am testing for main effects and interaction on Y as follows: X, X1, X*X1 (X1 is gender and there are 200 males and 250 females in the dataset.) The interaction is not significant but one main effect (X) is significant. My research context suggests that there should be an interaction (and the g...
With regard to this question about classifications of groups which differ significantly, I have two somewhat newbie / general questions: Lets say I'm doing a hypothesis test (the difference between two means) and I reject the null with 95% confidence (alpha = 0.05). Does this imply that I can predict/classify new valu...
May you help me to decide what is the minimal sample size for a uniform distributed sample. Assume that I've find the sample average, standard deviation and the $\alpha$.
If I have a variable with 4 levels, in theory I need to use 3 dummy variables. In practice, how is this actually carried out? Do I use 0-3, do I use 1-3 and leave the 4's blank? Any suggestions? NOTE: I'm going to be working in R. UPDATE: What would happen if I just use one column that uses 1-4 corresponding to A-D...
I have come across some formula for calculating the confidence interval (CI) of data from an Inverse Gaussian distribution. But, being really new in stats, I am unable to figure out what to do. On page 51 of this document, there is a formula. But I am not sure how to compute the different elements of the formula. Can a...
The result is shown in: [1] W.D. Penny, KL-Divergences of Normal, Gamma, Dirichlet, and Wishart densities, Available at: www.fil.ion.ucl.ac.uk/~wpenny/publications/densities.ps But could anyone help me out to understand the lines on top of page 3: $L=\int \log(\Gamma) Wishart(\Gamma|a,B) d\Gamma$ $=\log(\tilde\Gamma(a,...
The problem involves trying to characterize the probability: P.f = Pd*Pr{t1 < t2} using jags or WinBUGS. The issue is the last term where both t1 and t2 are random variables. A sample, stripped down, model using this is given below and hopefully provides insight into what I am trying to do. As expected, I get an error...
It is a general and maybe basic question, but it will help me to avoid a mistake. To test the dependence of continuous variable on nominal with parametric test (t-test, ANOVA), "the data has to be normally distributed" (distribution have to be not much violated from normal). But I don't clearly understand: I have to t...
I am trying to determine colors to best grab a web-users attention. I have a simple system which randomly chooses one of 4 foreground colors, and one of 6 background colors. I then save the stats in a table like this: fore_color back_color shown clicked ---------- ---------- ----- ------- red ...
I'm using the DLM package to estimate a multivariate time series, I wanna check the out of sample forecasting, by estimating the residuals for 1, 6, 12 months ahead forecast? How can I calculate the 6 and 12 months ahead forcast like the kalman filter does for 1 month ahead forecast? Thanks Since this question is too g...
I have a multifactor model (with 7 factors currently) and 754018 observations. In order to check for multicollinearity issues as the model grows I wrote an R script to compute a correlation matrix from the factors (so with 7 factors it's a 7x7 matrix). I then apply the function: $$\frac{r}{(1-r^2) / (N-2)}$$ where $N =...
Assume a multiple linear regression model with $F$ features and $N$ samples. For each feature, a standard error on the $\beta$ coefficient and a Student's T P-value can be calculated. The P-value tests the null that the $\beta$ coefficient is zero against the alternative that the $\beta$ coefficient is nonzero. If I w...
I am new to R and want to assess validity of some scales using R. Is there a package that I can use to test for convergent and discriminant validity in R?
Does anyone have a suggestion of any relatively recent and good book about data clustering? More specifically, I'm looking for incremental clustering.
My data consists of 6 independent variables (continuous and categorical) and 8 dependent variables on likert scale (categorical). I want to use multinomial logistic regression to find out the relationship between dependent and independent variables. I reduced the 8 dependent variables by principal component analysis (...
Is there a distribution that resembles the gaussian (normal) distribution, but such that it's probability density is nonzero only over a defined segment. The question emerged when I tried to model the 'bullet spread' within a circle. Gaussian distribution works fine, but there is always a chance that the bullet would h...
There are several popular resampling techniques, which are often used in practice, such as bootstrapping, permutation test, jackknife, etc. There are numerous articles & books discuss these techniques, for example Philip I Good (2010) Permutation, Parametric, and Bootstrap Tests of Hypotheses My question is which resam...
Akaike information criterion is a measure for goodness of fit of a model that compensates for the number of parameters that were used to build that model. Consider two linear models, one that is built using person's weight ($w$) and height ($h$): $f_1 = a w + b h + c$. Obviously, this model contains two parameters: w a...
As said in a respected blog, "Maybe it’s too early to call, but [...] it looks like Neural Networks are making a comeback." Some of the networks that are currently developed are Autoencoders and Convolution Networks. Where could one find some tutorials/articles on these topics?
Where I can find comparison of variances (or design effect) of different sampling methods? Same population, same sample size: I want to know which one has smaller variance than other; in simple random sampling, systematic sampling, stratified sampling, cluster sampling and so on.
I would like to understand why, under the OLS model, the RSS (residual sum of squares) is distributed $$\chi^2\cdot (n-p)$$ ($p$ being the number of parameters in the model, $n$ the number of observations). I apologize for asking such a basic question, but I seem to not be able to find the answer online (or in my, more...
I've seen references to learning Bayesian probability theory in R, and I was wondering if there is more like this, perhaps specifically in Python? Geared towards learning Bayesian probability theory, inference, maximum likelihood estimation, graphical models and the sort?
I am looking for a way to estimate the variance of a summed sub-set based on the variance of those sums. Si = sum( Ai ) S = { S0...Sn } V = variance( S ) That is, each sample value Si is actually the sum of a set Ai. V is then the normal variance of the set S. Is there any way to estimate the variance of the values in...
I use matlab a lot to fit functions to datasets. I then need to determine some kind of error estimate on the fitted parameters. Say I have a dataset of $N$ points which is given by the points $(x_i,y_i),\ i=1,\ldots,N$. I need to fit a function $f(x,P)$ where $P$ is the parameter matrix $$P = \left[\begin{array}{cc} a...
This is somewhat related to this question. I have two full rank matrices $A_1,A_2$ each of dimension $p \times p$ and a p vector $y$. These matrices are closely related in the sense that matrix $A_2$ has $p-1$ row in common with matrix $A_1$. Now, I'm interested in the vector $\beta_2$, where $\beta_2=(A_2'A_2)^{-1...
I have started my PhD in statistics this year, and I am looking for your best-practices, advice and (meta-advises) regarding how to grow and become a good academic researcher in the fields of statistics/ML. General thoughts and links are welcomed, but in order to start the ball rolling, here are a bunch of questions ga...
I am testing a hypothesis that states that participants after an intervention will be more likely to perceive themselves as being at risk for disease. Two questionnaires will be used. One will consist of 5 questions and will measure perceived susceptibility and the the other will consist of 7 questions and will measur...
I'm writing a set of unit test for a function that draws random numbers from an arbitrary distribution, defined as a PDF (example of such a function can be seen here). I am confused about the proper way of obtaining a good confidence that the function output indeed follows that specified distribution. I know that prov...
I need to classify large numbers of short answer, free response data from a study with a between-group design. In order to reduce the amount of manual labor costs, I was thinking of manually coding a small sample set, running the rest of the responses through an SVM classifier, and then coding a random sample of the SV...
Will the random number generator in SPSS be serviceable if I need 250,000 random numbers, or will the randomness start to degenerate? Asked another way, what practical limits are there to using the random number generator in SPSS to generate large numbers of random numbers?
Is SPSS command code available for doing Monte Carlo research? Thanks.
With the arima function I found some nice results, however now I have trouble interpreting them for use outside R. I am currently struggling with the MA terms, here is a short example: ser=c(1, 14, 3, 9) #Example series mod=arima(ser,c(0,0,1)) #From {stats} library mod #Series: ser #ARIMA(0,0,1) with non-zero...
I am looking for a graph or data for relative growth of human body organs, more importantly head size and total body height. The full data I would like to have—each as a function of time from birth (and preferably until death)—are: Head size, preferably for both male and female, Hand size, Leg size, Cerebrum weight...
Assuming I have the following model: $$ y(t) = \alpha {e}^{- \beta t} + \gamma + n(t) $$ Where $ n(t) $ is additive white Gaussian noise (AWGN) and $ \alpha, \beta, \gamma $ are the unknown parameters to be estimated. In this case linearization using the logarithm function won't help. What could I do? What would be the...
I'm training a support-vector machine (SVM). Each training vector includes 2 features which are equal in magnitude and have opposite signs, i.e., $F_1 = -F_2$. Is there any sense in doing so? Is one of the features redundant and better to be removed? Are the answers to the above dependent on the kernel being used? I'm ...
I want to analyze functional MRI (fMRI) data as follows: I am comparing the brain networks of two groups of subjects (patients and matched). For each subject I have a correlation (Pearson) matrix with the correlations between multiple brain regions (above 50000 correlations). I want to get a single measure to represen...
Julian Faraway, in his book on linear model with R, used half normal plot to find hat(a value in hat matrix) with too large value. That's the only example where I saw half normal distribution is used. But other than that, I can't come up with real application of it though I guess it might be useful for approximating so...
I am working on a problem to predict a value between 0 and 1. The data is skewed, so that only 18% of the values are greater than 0. I implemented a machine learning system, and what is happening is that the lowest error rate on the validation set (18%) is found when all predictions are 0. So, I wanted to implement pre...
The holiday season has given me the opportunity to curl up next to the fire with The Elements of Statistical Learning. Coming from a (frequentist) econometrics perspective, I'm having trouble grasping the uses of shrinkage methods like ridge regression, lasso, and least angle regression (LAR). Typically, I'm interested...
I'm debating taking some classes on statistics.com and was curious if anyone has taken classes there or knows any one who has or has any suggestions for good ways to learn stats/machine learning on the cheap-ish and on-line. NOTE: I'm already signed up for Andrew Ng's ML class for spring '12.
Would appreciate any references to specific places where these terms are clearly defined. Thanks!
Is it possible to get the Confidence Interval of a couple of numbers (or more) without knowing the distribution or anything like that ? Thanks.
I am reading the book Bayesian data analysis written by Gelman. And I do not confirm the answer of this question: suppose it is known a priori that the $2J$ parameters $\theta_1,\ldots,\theta_{2J}$ are clustered into two groups, with exactly half being drawn from a $N(1,1)$ distribution, and the other half being drawn ...
After finding a significant treatment in two-way anova, how do I report where the differences are? Every text I have read has left me at: Ah, the results are significant, so let's move on. In one-way anova I could use Tukey's HSD to find the means that differed, making my report much more effective. Right now I don't ...
Assume there are 16 people in a group, and each day 11 people are randomly selected from the group. Over a year, some people will be selected more times than other people. The question is, assume the person selected most often was selected $M$ times, and the person selected least often was selected $m$ times, what is t...
We're using logistic regression to predict events probability. Logistic regression tries to minimize the residual variance (sum of squared residuals). However, in our specific problem we would like to use a different loss function (for the errors in the logistic regression). Does anyone knows any implementation (or ho...
The upper and lower prediction intervals for the forecast periods are provided by the forecast() function. However, neither prediction or confidence intervals seem to be available for the fitted values within the range of the actual data. Why is this?
Background: I am developing a Python Statistics Framework, not because the ones out there are bad but because it will help me learn Python and Statistics. I have taken AP Stats, and read scattered books and articles beyond. I am more than willing to read up on whatever shiny technique will solve my problem: The issue i...
So I run logistic regressions of same dependent variables and independent variables on two sets of data $S_1$ and $S_2$. I obtained two sets of coefficients $\beta_1$ and $\beta_2$. Now I suspect that $\beta_1$ and $\beta_2$ should really be equal, since I don't think there are distinctive difference between $S_1$ and ...
I'm forecasting gold prices using an ARIMA model. An ARIMA model requires a stationary, non-seasonal, linear series. However, after reading a few books, it seems that gold price data is nonstationary, seasonal, and non linear. Can anyone please give me some suggestions and solutions for the question?
F-score can be used to measure the discrimination of two sets of real-numbers and can be used for feature selection. However, I once read that A disadvantage of F-score is that it does not reveal mutual information among features. How to understand this statement, or why F-score has this kind of disadvantage.
I was reading this article, and wanted to check whether 203/2000 was statistically different from 1/12. Is this a comparison between two means? How can I do this without knowing the standard deviations?
Is it, in general, possible that two variables are endogenous even if they are not correlated with each other at all?
I read quite a bit of hidden Markov models and was able to code a pretty basic version of it myself. But there are two main ways I seem to learn. One is to read and implement it into code (which is done) and the second is to understand how it applies under different situations (so I can better understand how it relates...
In my problem, each individual can be categorized on two binary dimensions, A and B (each individual can be A or not-A, and B or not-B). It is not known whether there is some dependency between A and B. I have picked a random sample (about 15 % of the population). I know which individuals in the sample are A and whic...
I'm working on an algorithm that estimates two parameters of its input data. I have a representative set of samples with the true parameters, to act as a ground truth. As this algorithm uses a threshold that has to be adjusted manually by the user, I was wondering if it could be possible to use my "ground truth" sample...
I'm considering using the following simple function as an SVM kernel. It basically computes the distance between the 2 input vectors (norm): $K(\vec{x}_1, \vec{x}_2) = \left\| \vec{x}_1- \vec{x}_2 \right\|$, where $\vec{x}_1$ and $\vec{x}_2$ are $N$-dimensional vectors. I'm not familiar with documentation of such a k...
I'm currently working on energy demand forecasting using daily load data. I'm using data since 1990 and, in order to use ARIMAX models, I detrended the data (using a first-order polynomial) and then I removed seasonality. As we can see on this image , in the last two years there is (unfortunately) a different trend wi...
I came across interesting article on application of canonical correlation analysis (CCA). Authors apply classical CCA on a mixed variables dataset (both independent and dependent sets include continuous and binary variables). To sum up their main contribution: "usual" correlation matrix (i.e., based on Pearson's correl...
Possible Duplicate: Sine wave with a constant period: what else is constant? Which statistic that you can calculate on a window remains constant on a sine wave with a constant period? This is for a window function for a proprietary filter.
I have a pdf function as follows: $$\dfrac{1}{s+a-b} [bs e^{-bt} + (a-b)(s+a)e^{-(s+a)t}]$$ I want to fit this against a weibull pdf with shape=1.12 and scale=461386. I want to calculate the values of s,a and b. Is there any standard tool for doing this? Prasenjit
I've read in a couple places about people using residuals from predictions of other models to improve the model's accuracy. Anyone have a link about how to carry this out in R, ideally with some example code? UPDATE: This is in the context of reading the papers about the Netflix prize where k-nearest neighbors (KNN) ...
I was having a discussion with a statistics professor a while ago about the different 'flavours' of statistics (frequentist, Bayesian, ...). He posed that he would subdivide statistics in four categories: non-parametric-, robust-, frequentist- and Bayesian statistics. The subdivision is characterized by the amount of a...
I'm currently in search of an algorithm that can determine whether or not it's time to buy something (an item, a stock, a service, etc.) given an history of prices (30, 50, 100, ...). My idea is something like this : Given the history of prices, you should buy now because the price is likely to be going up. Or, Giv...
In linear models, in my book, the condition index is defined as $\sqrt{\lambda_{max} \over \lambda_{min}}$ where $\lambda_{max}$ is the maximum eigenvalue of $ZZ^*$, i.e., the correlation matrix of the independent variables, and $\lambda_{min}$ is the minimum eigenvalue. I could not find out why the condition index hel...
Let me explain what my goal is: I would like to define a hidden markov model with two hidden states and say, five possible observations. As I understand (I'm quite new to HMMs), in each state HMM will output one of the observations, based on the given output probabilites. I would like to extend this behaviour in such a...
I have a training data set for a binary classification problem. There exist two possible scenarios, one is that all of the training data set are labeled as positive; another one is that the training data set includes labeled positive ones and labeled negative ones. Assume that I use this training data set to train a de...
My situation is: I have 1 continuous dependent and 1 continuous predictor variable that I've logarithmically transformed to normalise their residuals for simple linear regression. I would appreciate any help on how I can relate these transformed variables to their original context. I want to use a linear regression to...
I was referred to this site from mathoverflow. After some brief searching, I haven't seen another thread on my particular question, but if it's already been answered elsewhere then I hope you'll forgive the spam. Has anyone ever "ranked" the various commonly-used parametric and non-parametric hypothesis tests in terms...
In the Bayesian version of (binary) hypothesis testing one has to decide which of two hypotheses $A$ and $B$ holds true. The two hypotheses are given prior probability $p(A)$ and $p(B)$, summing up to 1. $A$ and $B$ induce two probability distributions on a set of possible observations $X$, say $p(x|A)$ and $p(x|B)$. O...
I have a number of predictors to use for a binary (Classes 0 and 1) classification task. Let us call them $x_1, x_2, x_3, ... x_n$. The way these are calculated, my naive heuristic assumption is that $S = \sum_{k=1}^n x_k$ should predict Class 1. That is higher $S$ means it is more likely that it is Class 1. Since this...
I have done a simple test using R, take a look at the code below: First of all I have created three samples: > a = rnorm(10) > b = rnorm(10) > c = rnorm(10) > a [1] -0.2485833 -1.3077108 0.4019243 0.4453618 0.3024991 -0.4228684 [7] -0.3817301 0.2195161 1.3693408 -1.1030199 > b [1] 0.1795048 -0.8764778 0.60974...
I want to compute the value of $\frac{1}{\sqrt{a + b + c}}$. Say I can observe a and b, but not c. Instead, I can observe d which is a good approximation for c in the sense that $P( |c-d| \leq 0.001 )$ is large (say 95%), and both c and d are known to have $|c| \leq 1, |d| \leq 1$ so a difference of 0.001 is actually...
I'm actually writing an implementation of Random Forests but I believe the question is specific to decision trees (independent of RFs). So the context is that I'm creating a node in a decision tree and both the prediction and target variables are continuous. The node has a split threshold to partition data into two set...
I am working on a Monte Carlo study of bootstrapping in an AR(1) model for a homework assignment (I'm using Matlab). The goal is to say something about the empirical rejection probabilities of the bootstrap in this specific context. However, I've been running into some computational problems. Some context first. Suppo...
Is there a plot library for R that could turn a dataframe of start and stop times into a timeline plot something like the following: The Y axis only meaning is that it stacks with concurrency, but doesn't always represent concurrency (see the gap in the middle). Each grey box is an event -- a row from the dataframe. ...
I'm using smooth.spline with some success, but I need to control the degree of the regressions between knots (cubic is too high for my needs). I looked at the bs function, which allows controllable degree but requires manual specification of knot locations. Is there a function in R which will find knots for me automat...
I am conducting my thesis on Evolutionary Algorithm. To perform various type of mutation I have to generate random numbers from Gaussian, Levy, Cauchy distributions. How can I implement this? I need pseudocode or algorithm. Thanks in advance.
Possible Duplicate: having trouble applying hidden markov/machine learning models Happy New Year! I’m having a problem applying hidden Markov models to a game I’m building to learn about programming. Background: I have a game that tries to intelligently guess what’s in your shopping basket. As a user, you are give...
I ask a group of 100 people a question to which each individual either agrees, disagrees or cannot answer - e.g. 70/100 agree, 10/100 disagree and 20/100 have no opinion. Is there any statistical test I can apply to give the probability that the correct answer is to agree with the question?
I'm just getting my feet wet in statistics so I'm sorry if this question does not make sense. I have used Markov models to predict hidden states (unfair casinos, dice rolls, etc.) and neural networks to study users clicks on a search engine. Both had hidden states that we were trying to figure out using observations. ...
I have used the following Likert scale for a series of questions in a survey: $0=$ Not Important $1=$ Slightly Important $2=$ Moderately Important $3=$ Very Important $4=$ Extremely Important As I understand it, this is a 5-point Likert scale. (Unsure, though!) I have then used a weighting formula that has result...
When working with Markov chain Monte Carlo to draw inference, we need a chain that mixes rapidly, i.e. moves throughly the support of the posterior distribution rapidly. But I don't understand why we need this property, because from what I understand, the accepted candiate draws should and will concentrated in the high...
I fitted a GEE model using the function genZcor with user defined correlation matrix. I want to get the var-cov matrix of the regression coefficients. But the output provides only limited information. I would be very much thankful if you could kindly let me know how to get it since I am struggling lot getting this.
I have three datasets as follows: Dataset A can have a maximum score of 30. (Individual scores can be from 1 to 30) Dataset B can have a maximum score of 45. (Individual scores can be from 1 to 45) Dataset C can have a maximum score of 25. (Individual scores can be from 1 to 25) The three datasets contribute equally ...
Both the likelihood ratio test and the AIC are tools for choosing between two models and both are based on the log-likelihood. But, why the likelihood ratio test can't be used to choose between two non-nested models while AIC can?