instruction
stringlengths
9
38.7k
Do you know any datasets other then Google's Google Book n-gram dataset? Especially some datasets about scientific papers would be great.
I have some variables and I want to reduce their number for further analysis. I initially thought of combining them using factor analysis. But since the variables are of all kinds (rating, count, ordinal, continuous dollar amount) I am thinking about using CATPCA for it. However, I have some questions about the techniq...
I don't find a textbook presenting prediction intervals for mixed models. Moreover I'm only looking for a prediction interval for the balanced one-way random effect ANOVA model. Do you know a formula for this interval ?
I'm a clinical researcher and I am comparing children who had fluid in the abdomen (ascites due to liver disease). I have 4 groups based on the kind of fluid analysis and in each group I have incidence of renal failure, bleed, altered sensorium, etc. How should I compare these groups? Should I do multiple chi square ...
The gamma distribution is a commonly used prior distribution for the precision ($1/sd^2$) of a normal distribution in Bayesian hierarchical modeling. I want to use an informed prior for the variance and I ask an expert on the data I'm trying to model. An easy way of describing earlier knowledge about the variance of th...
I'm using libSVM for binary classification and my training data is very unbalanced (-1:90%, +1:10%). According to libSVM's documentation, it's better to set different penalties for positive and negative classes. For example, the SVM problem is: $\min\limits_{w,b,\xi} \frac{1}{2}{\bf w^Tw} + C^+\sum\limits_{y_i=1} \xi_...
I wanted to ask this question on stackoverflow but I think it is more suitable here. If I am wrong, please tell me. My question concerns the use in statistics to analyse physical/engineering data. As statistical tools to be used depend on the context and are rarely universal, it is mandatory that I describe my problem ...
Possible Duplicate: Computation of new standard deviation using old standard deviation after change in dataset I know the sample variance of n samples and its mean and n itself. Now I would like to add one more sample so I have n + 1. Is there a way how to add the sample without recalculation the whole term. (comput...
My dependent variable is continuous, non-normal (skewed left according to Shapiro-Wilk test). I have two independent variables (treatment group by colour, food type). There are 3 levels within each independent variable. The number of observations for each independent variables are not equal. I have looked up non-parame...
Suppose $X \sim N(\mu, \sigma^2)$. After $n$ independent draws $\bar{X} \sim N(\mu, \frac{\sigma^{2}}{n})$. I am assuming that each draw contains $n$ numbers? Because if each draw only had one number then we would only have one mean.
My question is about calculation of confidence interval (CI) for odds ratio (OR) from a SAS output of a logistic regression model for a different reference category without running the SAS program again. I’ve run SAS logistics modeling dichotomized income level (low coded as 1 versus high coded as 0) with 4 dummy coded...
first time asking question here so I hope I will not mess up. I am in the process of calculating the sample size for a study that utilizes an independent t-test design: comparing some outcome before and after a certain policy, subjects in the pre and post periods are not linked. Simply put, the study is about infant we...
The situation Some researchers would like to put you to sleep. Depending on the secret toss of a fair coin, they will briefly awaken you either once (Heads) or twice (Tails). After each waking, they will put you back to sleep with a drug that makes you forget that awakening. When you are awakened, to what degree sho...
Folks, I am working on a credit card defaults and transition probabilities. For example a single credit card account could be in a number of states: up-to-date, 30, 60, 90 days in arrears or in default. Are there packages in R that do estimation of the transition probabilities given historical monthly cohort defaults?...
I used a one-way ANOVA to test if importance levels of attributes have changed over the years (Data comes from a survey of consumers) with the following results (Mean ratings): +-----+---------+ | Year|Attribute| +-----+---------+ | 2000| 4.39| +-----+---------+ | 2010| 4.30| +-----+---------+ | 2011| 4.38|...
Are there any well-designed R packages or other open-source software for training Hidden Markov chains?
I am doing a binary logit analysis, in which I'm trying to fit a model to my data to explain why some towns adopt open space subdivision ordinances (OP), using a handful of discrete and continuous independent variables. One of the explanatory variables, median household income, is coming back with an estimated beta of ...
I have 18 predictors in a binary generalized linear mixed model (repeated measurements, over a 1000 subjects). I would like to trim the model a bit and remove some noise and useless predictors. Unfortunately, PROC GLIMMIX does not have any facility to do this. I could not find an R package that would do this (step() fu...
I have an issue which I could not solve, although I tried and I got some help on R forum. I am trying to calculate Mahalanobis distances on a data.frame, where I have several hundreds of groups and several hundreds of variables. Whatever I do, I get the system is computationally singular: reciprocal condition number er...
I am running a stepwise regression using the F test as the criterion. Is there a way to explicitly set the add and drop thresholds (alpha levels) in R? The documentation does not make it clear.
Can someone explain to me the concept of Mahalanobis distance? For example, what is the Mahalanobis distance between two points x and y, and especially, how is it interpreted for pattern recognition?
I have two groups of participants and they all took the same measurements. When I perform a median split on one of the measurements to test my hypothesis about an interaction, the dependent variable fails Levene's test for equality of variances. When I perform a teritary split, it passes Levene's test - both when I ...
I am working on making a RPG and am trying to understand the statistics of the core mechanic so I can determine how effective leveling and bonuses will be. Right now the core mechanic is a skill die based mechanic where you roll a d4, d6, d8 or d10 based on your skill opposed by either a DC set by the story teller (1-1...
I am interested in modelling the impact of some environmental parameters on a concentration of measured phytoplankton pigment. The concentration of pigment is skewed so that low concentrations are more frequent than high ones and there are occasions of 0 (zero) concentration. I was hoping to use a GLM model with a Gamm...
I am analyzing my data on the relationship between spirituality and negative emotional states (depression, anxiety, and stress) using a hierarchical multiple linear regression. Everything seemed to be "okay" with the results until I checked the signs of the regression coefficients!! The results are showing a positive r...
I'm modeling a Bayes net with OpenBUGS, and I find problems to specify some of the parameters and their priors. The aim of the model is to identify latent groups in the data from a sample of human participants. Eventually, I need a belief distribution over the range of 5 possible latent groups, for each individual, co...
I am interested in how uncertainty can be accounted for when considering the risk of extinction of a species. Forgive me for extending a rather tired thought experiment, but at least it's familiar territory and I hope it illustrates what I am trying to understand. Let's say that Schrödinger was not satisfied with killi...
I am trying to quantify my concerns regarding a proposed incinerator in our community. The company is basing its potential to emit dioxins (a class of chlorinated organic compounds with a reference dose of 1.7E-8 grams per 150 lb person per year) on three emission measurements (mg/m^3 exhaust): 0.0002139; 0.0000014; ...
I am working on distribution on plants and I need to enter the chances that a plant starts reproducing at a certain age in a vector. Only this has to be done for more generations. Now, Imagine I have a plant that starts reproducing at least at 80 years and at last at 81 years. I assume that the chance for a plant to r...
I am choosing summary statistics for percentage data that is clustered near 100%. Each subject takes the same test twice. Each test consists of at least 40 questions. I want to be able to predict which subjects will improve more. I have a hypothesis that subjects with higher variability of performance in the first test...
I have a time series dataset with daily entries over the past 20 years. I would like to see whether the series is autocorrelated. To do so I have done the following> dataset=read.csv(file="https://dl.dropbox.com/u/22681355/dataset.csv", head=TRUE) par(mfrow=c(2,1)) dataset=diff(dataset) acf(dataset) pacf(dataset) Fro...
What is the best way to compute singular value decomposition (SVD) of a very large positive matrix (65M x 3.4M) where data is extremely sparse? Less than 0.1% of the matrix is non zero. I need a way that: will fit into memory (I know that online methods exists) will be computed in a reasonable time: 3,4 days will be a...
I have $\Pr(A)=29\%$ and $\Pr(B)=10\%$, where $A$ and $B$ are two events which are not independent. In fact, a correlation measure suggests they're correlated by $\rho=0.8$. I would like to calculate $\Pr(A \cap B)$, that is the probability both of them occur. Here is what I've done in R: prA <- .29 prB <- .1 Sigma <- ...
I have a question about the effects of shifting the intercept in a logistic fit on the mean of a particular transformation of the scores. Here is the notation I will be using for the question. The logistic regression model is $$ \begin{align} \mathbb{P}[Y_i =1 \mid \boldsymbol{X}_i] &= \dfrac{1}{1+\exp(-\boldsymbol{X}_...
I have two dimensional spatial (x,y - coordinates of meteo stations) data for small region (so I could neglect the shape of earth globe), for each (x,y) I have one observation of wind direction and speed I need to design metric for clustering problem of such data. It's simple to do when we consider only directions or ...
I have an independent categorical variable ($X$ with two categories, $x_{1}$ and $x_{2}$) and two continuous dependent variables ($y$ and $z$). Using a Mann Whitney test, I know that $y$ is significantly associated with $x_{1}$ and $z$ is likewise significantly associated with $x_{1}$. However, it could be that either...
I have read other links on here about when to take the logarithm of a dependent (or independent) variable. I understand that the log transformation gives a % interpretation rather than a levels interpretation, which might be more desirable because a 1 unit increase means different things depending on the initial start...
There is a 1D discrete random walk system where the probabilities at all points are $\frac{1}{2}$ (probability of going forward and backward) except one point at on $l$ (which is an integer). The probability of going right is $p$ at this point ($p$ isn't necessarily $\frac{1}{2}$). There is just one number where the pr...
I'm trying to use k-fold cross validation for model selection for a mixed-effect model (fitted with the lme function). But, what exactly do I use as the score for each fold? Presumably I don't just fit each candidate model to the validation subset, calculating new coefficients based on the new data. If I understand cor...
Imagine that I take two separate measures and I get two separate normal distributions $\mathcal{N}_1(m_1, s_1^2)$ and $\mathcal{N}_2(m_2, s_2^2)$ How can I find a single normal distribution $\mathcal{N}_3$ which is a type of average of these two normal curves? As an extension, how could I find a distribution which rep...
Problem #1: easy, probably solved Suppose someone holds a party (A) and invites $n_A$ people. You're not attending a party, but you get full list of guests' identity card and are told that out of $n_A$ people $m_A$ were male (obviously, $n_A-m_A$ were female). After some time, there's another party (B) coming up. You a...
I want to calculate the best state sequence for a observation sequence. To do that, I want to use Viterbi algorithm. In my problem, there are two properties: There can be only one observation possibility for a state. However the opposite is not true : an observation can be generated by more than one states. States hav...
I am testing the co-movement between 2 exchanges by using the dynamic conditional correlation (DCC) developed by Robert Engle (2002). I want to apply this method in stata 12 and used this command: Mgarch DCC (var1 var2=), arch(1) garch(1) distribution(t) I read that it should give me a column with correlations per ti...
PSY's music video "Gangnam style" is popular, after a little more than 2 months it has about 540 million viewers. I learned this from my preteen children at dinner last week and soon the discussion went in the direction of if it was possible to do some kind of prediction of how many viewers there will be in 10-12 days ...
I want to calculate the VaR with Monte Carlo Simulation, I am referring to this page: http://financetrain.com/calculating-var-using-monte-carlo-simulation/ which was created to the JP Morgan desrciption: http://www.jpmorgan.com/tss/General/Risk_Management/1159380637650 Now I have several questions, where I could not fi...
It seems that it is possible to get similar results to a neural network with a multivariate linear regression in some cases, and multivariate linear regression is super fast and easy. Under what circumstances can neural networks give better results than multivariate linear regression?
I have the model: $y_t = \alpha + \beta_1 x_t + \beta_2 D_t x_t + \epsilon_t$ With $y_t$ and $x_t$ as $I(1)$ processes, and $D_t =1$ during a large financial crisis, $D_t = 0$ during non-crisis periods. I have been asked to test this equation for cointegration. When I test whether $\hat{\epsilon}_t$ is $I(0)$ as you ...
Wikipedia - KL properties says that KL can never be negative. But e.g. for texts where the probabilities are very small I somehow get negative values? E.g. Collection A: - word count: 321 doc count: 65888 probA: 0,004871904 Collection B: - word count: 1244 doc count: 120344 probB: =0,010337034 KL = $0.004871904 \cdo...
I've seen that Pearson's r is typically used for evaluation between non-experimental conditions. However, I've also seen Pearson's r used to indicate effect size - is this acceptable? Is it a useful descriptive statistic at least? For example, there are two groups of students. In one group students are put into pairs ...
What is the meaning of the tilde when specifying probability distributions? For example: $$Z \sim \mbox{Normal}(0,1).$$
I am trying to understand the semi supervised learning in random walk. Lets say I have 10 classes and I have some labelled and unlabelled points. Now, I need to find the labels for the unlabelled points using semi supervised learning in random walk. I can define the transition matrix P for the nodes/elements such that ...
I have a question concerning about one step in the Metropolis algorithm. The algorithm proceeds as following, Generate a proposed new sample value from the jumping distribution $Q(x'|x_t)$ Calculate the acceptance ratio $a = \frac{P(x')}{P(x_t)}$ If $a\geq 1$, accept $x'$ by setting $x_{t+1}= x'$ Else, accept $x'$ wi...
I was looking at the following question from "One Thousand Exercises in Probability" by Grimmett, page 25, question 16 (not homework just self-study): Let $X$ and $Y$ be independent Bernoulli random variables with $p = 1/2$. Show that $X + Y$ and $|X − Y|$ are dependent though uncorrelated. Now, the solution given ...
Suppose we are given a matrix of many rows (different genes for example) and few columns (different time points) and we want to identify the top rows (genes) that are following a trend, like monotonically increasing or decreasing. What is a good method to perform this in R? The answers providing also a statistical sign...
I have a dichotomous variable $A$, which does not have an a priori determined proportion of 0's and 1's, and a continuous variable $b$. In scenario 1, I decide to designate $A$ as the independent variable $X$, and $b$ as the dependent variable $y$. I then test $X$ against $y$ using tests such as Mann Whitney (distribu...
My goal is to find out where a user would cut a curve. During training, whenever a point on a curve is chosen by the user to be a cutting point, we record some features and use the label '+1' to indicate these features correspond to a cutting point. In order to reduce the training efforts, we would like to avoid record...
How can be proven that the entropy of a die with equal probability for all its faces is at its maximum? It's clear that the entropy will be smaller if there are more chances for a particular face, but how can be this proven?
I'm working on a 2D physical simulation and I am collecting data in time at several points. These discrete points are along vertical lines, with multiple lines in the axial direction. This makes the dataset effectively 4D. For instance, let's assume I have collection points at (X,Y) coordinates of: (0,0), (1,0), (2,...
I am interested in predicting shopping behaviour in a shopping center. I have a database with the chosen alternatives (shop) and variables describing that alternative (like type and size) and the individual which made the choice (sex, age). What I would like to get is the influcence of these variables on the behaviour....
I am interested in the moments, we have for instance the mean, $\mathrm{E}(X)$ and $\mathrm{E}(X^2)$. What about values like $\mathrm{E}(X^{1.5})$ or $\mathrm{E}(X^{-1})$? Have they been investigated?
I am totally stuck at my master thesis. I got something which looks like this (3 equation SEM): $y_1 = \alpha_1\cdot y_2 + \alpha_2\cdot y_3 + X\cdot\alpha_3 + u_1$ $y_2 = \beta_1\cdot y_1 + \beta_2\cdot y_3 + X\cdot\beta_3 + u_2$ $y_3 = \gamma_1\cdot y_1 + \gamma_2\cdot y_2 + X\cdot\gamma_3 + u_3$ After I put some tho...
I have one paired data from 7 patients: $$(X_i ,Y_i)=\{(5,1),(-2,-4),(4,2),(-6,-3),(-3,-3),(-5,2),(3,1)\},\quad (i=1,\ldots, 7)$$ where $X$ means placebo $Y$ means the test drug. My classmate asked me can we have permutation test for the sign statistics to identify $X < Y$. I think the coin function can help me shuffle...
A (SAS documentation file) (page 1906) on "The LOGISTIC Procedure" gives the following procedure- proc logistic; model r/n=x1 x2; run; Here, n represents the number of trials and r represents the number of events. Question 1: The response variable - r/n will produce proportions, therefore, it's not either 0 or 1. In ...
I'm looking at Fisher's LDA on various datasets on UCI ML repository and trying to see where LDA might perform badly. One reason I can think of is if the data distribution is not a multi-variate normal distribution. This is from the fact I read in a book where you apply LDA on multivariate normal distribution. Is that ...
I plan to use libSVM for a one-class svm problem, but I'm not sure about the meaning of nu in svm_parameter. Does it mean the probability that a test point lies outside of a set S (estimated from the training data) equals nu?
I have a data set with 853 units. Below, a small sample of it: y [1] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 [10] 0.000000 6.751283 0.000000 0.000000 11.927481 0.000000 0.000000 0.000000 0.000000 [19] 0.000000 0.000000 0.000000 0.000000 0.000000 0.00000...
I am new to statistics and SPSS v 20. I am doing survival analysis - KM and Cox regression with SPSS. I am trying to make Cox models with different variables - clinical, genetic etc. I am interested to know how well each of these models are able to predict the occurrence of metastases. My questions are: Is it possible...
I have a study conducted by a team of doctors: two groups of people were treated for stress urinary incontinence in two ways: TVT and abbrevo. Each group consisted of 23 people. The hypothesis is as follows:neither method is better than the other. To begin, I want to check the comparability of groups. That is, to chec...
Why can a polynomial of degree $>2$ not be a cumulant generating function? I read somewhere that this is impossible but can't retrieve the source. The answer by StasK to Higher order generalization of the multivariate normal distribution mentions a related statement ''Once you depart from zero third cumulant, all hig...
I have data for which I would like to take the log transformation before doing OLS. The data include zeros. Thus, I want to do a log(x + c). I know a traditional c to choose is 1. I am wondering whether there is a way to have the data choose c such that there would be no skew anymore using features like the sample ...
I have no formal training in statistics so please correct me if I use the wrong terms as I try to explain my problem. I have a set of data (less than 80 points) with essentially 1 single outcome (a float we will call dcl) that can potentially depends on 10 of other variables, most of them floats maybe one or two boolea...
I am having a difficult time understanding how to discern whether the regression coefficients I am getting are large or small relative to the data. I have one regression that is cross-sectional. For example, a regression of log(tax revenue per capita + 1) on the share of the U.S. county that is black. The share of th...
In both ordinal regression and ranking you are learning from an ordered dependent variables, so my question is: What is the difference in formulation (if any) between the ordinal regression problem and a learning to rank problem?
I'm analyzing a time series (terms of trades) on which I want to perform a trend estimation by nonparametric methods like the above mentioned. By the way, I'm a total beginner with R and using the help files is already cryptic enough. Using the default settings of R gives me a smoother which simply follows the curve of...
I have a regression with typical Stata output. The only independent variable is a dummy (=1 if person bought certain item). How can I find how many people in the sample bought the item?
I am asking this because I know there are IA's for cross sectional estimators and D-in-D estimators, but am unsure if there are any for IV estimation. Does anyone know if there is or isn't, and if there is - what would it be?
Unfortunately nobody seem to know the answer to my first question...does anyone know how to compute a conditional expectation on absolute value? Let $$\boldsymbol y = \begin{bmatrix} \boldsymbol y_{a}^{\top} \\ \boldsymbol y_{b}^{\top} \end{bmatrix} $$ $$\boldsymbol y \sim \mathcal{N}({\boldsymbol 0},{\Sigma_{y}})$...
If I have a linear regression of the form: $$y \sim 1+\beta_1x_1 + \beta_2x_1x_2,$$ where $x_2$ is a Boolean variable depending on another variable $x_{2cont}$, a positive variable: $$x_2 = \begin{cases} 1 & \mbox{if } x_{2cont} > 5 \\ 0 & \mbox{if } 0 < x_{2cont} \le 5. \end{cases}$$ And I got regression results. How ...
Could someone recommend a link or help me out here: where can I find the formula for the regression without an intercept, and how is it deriveed differently than the formula with the intercept? (matrix form)
first of all, this is a great site and I've already learned a lot from threads here wile searching for answers to my stats questions on the web. Yet here's another one: I understand that the independence of errors assumption in the t-test means that you shouldn't be able to predict the value of the outcome variable in ...
I use linear discriminant analysis and I want to compare different assumptions about the covariance matrix. I want to explore what happens if I use a covariance matrix proportional to the identity matrix although my data does not come from such a covariance matrix. I get the following sample covariance matrix: $$ \begi...
I have three subjects in a qualitative study. I am comparing the features of their writing before and after treatment. I have no idea about the normality of the distribution since they were selected purposefully. I have counted the number of everything (like the complex sentences, correct sentences, etc.) and now I wa...
Consider a regular 52 card deck of playing cars. Suppose 2 cards are drawn at random from the deck with-out replacement. What is the probability that the second card is an ace, given that the first card is a king?
I am looking for a test similar to a 2-way ANOVA that would work on a binary response variable. My response variable is survival of plant seedlings (alive or dead). My explanatory variables are Treatment (3 treatment groups) and Site (3 sites). First, I would like to know whether Treatment, Site and their interactio...
There have been many debates within statistics between Bayesians and frequentists. I generally find these rather off-putting (although I think it has died down). On the other hand, I've met several people who take an entirely pragmatic view of the issue, saying that sometimes it is more convenient to conduct a freque...
I performed an experiment using two different methods on same object, the results of the experiments were Method 1 70,72,70,75 and 77% Method 2 80,81,67,75 and 82% On basis on average I claimed that method 2 performs well. But I am asked to provide p values or t-statistics to confirm the results , how can I do that ? ...
I'm working through Andy Field's Discovering Statistics with R and in the repeated measure's section he shows how to calculate Mauchly's $W$ using ezANOVA from the ez package. He then goes on to say that the chi-squared value (approximation not exact) is to be reported in a write up but doesn't explain how to jump fro...
I am working on a problem where it is expensive to label data and I have sampled a small subset of the available data and labeled it. My classifier is a binary classifier that I use with the hope of removing samples that are "false" but keep samples that are "true". My question is: how well does the classifier performa...
I am empirically studying Fama & French three factors (market, SMB, HML - independent variables) model on a Viet Nam stock exchange. The dataset is daily stocks' return during almost 4 years. The stocks are grouped in six portfolios - each is dependent variable in each regression. I would like to test the validity of F...
While reading The Elements of Statistical Learning, I've encountered the term "point-wise variance" several times. While I have a vague idea of what it likely means, I'd be grateful to know How is it defined? How is it derived?
I have a set of image documents. I extract text keywords from this images using OCR to represent each image as a bag of words (a vector where each value is the number of occurrence of a word in the document). Then I can apply a classification or clustering algorithm on the obtained dataset. However, this vector represe...
I was just wondering if 3 biological samples would be statiscally significant for both precision testing and calibration verification. Precision: to check whether instrument is able to give consistent results when a sample is being run repeatedly. Calibration Verification: to check whether instrument is able to obtain ...
I use spline interpolation within a statistical model, and the transpose of the operator turns up in the gradient of the log-likelihood. Let me set up some notation first. If $x_1 \ldots x_n$ are a set of measurement locations, $f_1 \ldots f_n$ the value of $f(x)$ at these locations, then spline interpolation of $f$ at...
I would like to analyse data from a placebo-controlled within-subject design. For every subject a numeric outcome variable (Y) was measured twice - once following administration of a drug and once following administration of a placebo (order of drug/placebo administration randomized). Also for every subject a numeric c...
I'm trying to look for significant effects on "similarity" (of "isinpair" and controlling for time effects) using repeated measures with an in group sample. The intervention "isinpair" occurs after a short period of time (time intervals aren't equivalent, but there are many occuring with in a relative short time). The ...
I am interested in examples of sources (R code, R packages, books, book chapters, articles, links etc) for learning statistical and mathematical concepts through R (it could also be through other languages, but R is my favorite flavor). The challenge is that the learning of the material relies on the programming, not j...
I am currently working on the classification of pulmonary diseases using spirometry. This is a procedure in which the patient blows air in a tube and we collect air volume, pressure, etc, in order to obtain the spirometric parameters. My question is : If I perform the spirometry in the same patient three times, can I...
I used a log model and a factor model on 2 parameters colonies and log (dose+1) from R library "salmonella" in the faraway library with 18 observations. I need to compare and determine lack of fit. The log model produced Estimate Std. Error t value Pr(>|t|) (Intercept) 19.823 5.064 3.915 ...
I am wondering what are the factors involved in deciding the cutoff value / cut score for a 5-point Likert scale from: 1 = Not ready at all 2 = Not ready 3 = Moderately ready 4 = Ready 5 = Highly ready Is it proper for the cut score (in mean value) to be as such if i want it in 3 categories: Below 2 = Not ready 2 -...
I need a book as a reference for the "principle of indifference" or "principle of insufficient reason". Any suggestion?