instruction stringlengths 9 38.7k |
|---|
I have a multiple regression with an interaction term and I would like to run it on two separate DVs. The two DVs are quite highly intercorrelated (but conceptually different). How can I control for that intercorrelation?
|
I am scoring my dataset using a logistic model. For getting the betas (coefficients) I used proc logistic y = x1 x2 x3.
To tell the model which are class variables I am usingclass statement. Now, lets say if I have a categorical variable (with name ppsc), which has 4 categories, the betas are generated for top 3 catego... |
I am reading up on the EM algorithm for Gaussian Mixture Models, and there is consistent reference to the $i$th sufficient statistic. What is this, and why is it relevant to the algorithm?
|
How well do weather forecasts predict the future weather?
For example, I would like to know how likely it is to be raining when forecasts predict 70% raining risk 3 days ahead of time.
I know there are plenty of weather data sets, but are there any data sets which contain information about forecasts specifically?
... |
I will break my question appropriately to make it easier to explain. This is actually a short question but looks longer due to my plots so I apologize for that. Any input would be greatly appreciated.
Setup
I have a few locations that I am monitoring with sensors. The dataset that I have is a set of events that the sen... |
I am looking for software for teaching text mining to business students. Unfortunately, I cannot consider programming languages like R. Does anyone have experience with other text mining software? Can you recommend it? (or not!)
Ideally, software that is easy to learn for non-technical people, not overly expensive (not... |
This seems like a dumb question, but does PMML have a way to represent a data set? And if not, why not? There's detailed support for defining the name, type, and legal values of each feature that will appear in the data, as well as which of those features to use in the trained model, and what transformations to apply... |
Horrible title, so let me explain - I think this must be a very basic statistical problem, but I don't remember what little statistics I once knew.
I'm writing a low-level emulator of an old IBM CPU. Each machine instruction of the IBM1620 was accomplished by a sequence of various "machine cycles". On the original ... |
Let's say I have 4 plants and I measure something under 2 conditions. For example:
The entries in the table show how many times I saw something under condition (C1 or C2) for plant (P1, P2, P3 or P4).
P1, P2, P3, P4
C1 0 20 0 19
C2 100 80 180 150
Now I would like to answer the question "wha... |
I have a time series data, see jpg. It goes straight up and then straight down, later tailing off. This seems to fit my textbook’s description of a deterministic trend being an almost exact function of time on the way up and on the way down.
Using the D-F test I found that I could reject the existence of a unit root at... |
What might be the general form of the equation can be fitted to the below scatter plot? The result should look like an smooth Z
|
I have a sample size of 6.
In such a case, does it make sense to test for normality using the Kolmogorov-Smirnov test? I used SPSS.
I have a very small sample size because it takes time to get each.
If it doesn't make sense, how many samples is the lowest number which makes sense to test?
Note:
I did some experiment ... |
I would like to combine the forecasted and backcasted (viz. the predicted past values) of a time-series data set into one time-series by minimizing the Mean Squared Prediction Error.
Say I have time series from 2001-2010 with a gap for the year 2007. I have been able to forecast 2007 using the 2001-2007 data (red line... |
Are there tutorials you recommend that teach how to draw an ROC curve?
Thanks.
|
First I have to tell my experience in development is extremely thin (a few bash scripts that's all) so bear with me if I can't keep up :)
A little background story to begin:
A few years ago during my sysadmin formation I had the chance to meet a senior security expert which showed me something I found wonderful, phase ... |
I have a very large (36k items) spatial dataset of locations of commercial landuses with their corresponding square footages. I am hoping to use the pam() command in R (from {cluster} package) to form clusters around a set of centers determined by other methods.
I am trying to figure out how to weight the individual po... |
The answers to this question on SO returned a set of approximately 125 one- to two-letter names:
https://stackoverflow.com/questions/6979630/what-1-2-letter-object-names-conflict-with-existing-r-objects
[1] "Ad" "am" "ar" "as" "bc" "bd" "bp" "br" "BR" "bs" "by" "c" "C"
[14] "cc" "cd" "ch" "ci" "CJ" "ck" "Cl" "cm" ... |
How are PCA and classical MDS different? How about MDS versus nonmetric MDS? Is there a time when you would prefer one over the other? How do the interpretations differ?
|
I've read some of the answers here (specifically the 'Inter-rater reliability for ordinal or interval data' one). I'm still somewhat perplexed though!
I have data for 4 raters, who each rated every subject's CT scan, on two occasions, for the presence or absence of 9 signs. The two readings were separated by a washout ... |
I'm trying to understand how exactly factors work in R. Let's say I want to run a regression using some sample data in R:
> data(CO2)
> colnames(CO2)
[1] "Plant" "Type" "Treatment" "conc" "uptake"
> levels(CO2$Type)
[1] "Quebec" "Mississippi"
> levels(CO2$Treatment)
[1] "nonchilled" "chilled"
>... |
I took a probability course in university a few years ago, but I'm going through some machine learning algorithms now and some of the math is just befuddling.
Specifically right now, I'm learning the EM algorithm (expectation maximization) and it seems that there is a large disconnect between what is required and wha... |
Assume that there are 15 subjects and that a quantitative feature is measured for all subjects at three equally-spaced times points. The research of interest is to find out wether there is a linear trend across time. Admittedly the number of time points is quite limited, but what are the options for trend analysis? I c... |
I ran two programs A and B, and their corresponding features are a,b,c, and d. I would like to represent their features data in a better way instead of a table as shown below to explain why A is better than B or vice-versa. First, I thought about barplot representation, but feature a data is very small and that makes b... |
I am trying to understand naive Bayes and its application to text classification.
I have a doubt or this may be my misconception.
Suppose we have two categories "News" and "Sports" in which we need to classify any given document. Let the dictionary contain only 3 keywords ${news,football,tennis}$ with the following pa... |
This question might be too naive, but I need to understand this point. Suppose I ran a survey for a product for 1000 individuals & collected the data for various aspects of it. Let's say the categories are X1, X2, X3, X4, X5 and X6.
So, now I have 6 variables. I want to know the type of the distribution of the sample. ... |
I found that learning how MCMC and HMM work went best by writing the code of simple examples myself. I would now like to learn how random forests work, but it's again not that trivial to transform the theoretical texts and pseudocode to real scripts (well... for me at least).
Could anybody point me to simple examples ... |
I have conducted a one-way ANOVA on 8 groups. I understand that the degrees of freedom for that test is 7, but I don't understand how to ascertain the degrees of freedom for the post hoc tests:
I conducted a series of t-tests as the multiple comparison post-hocs using the Holm-sidak method of familywise error rate red... |
From ?combine in randomForest:
The confusion, err.rate, mse and rsq components (as well as the
corresponding components in the test compnent, if exist) of the
combined object will be NULL.
Why are the err.rate, mse and rsq components for the combined NULL? Is there an efficient way to re-calculate these metrics?
... |
I have used aplpack package faces() method in R for drawing a Chernoff graph of the following data. I would like to draw a face with only four variables a, b, c, and d in order to explain why program A is better than program B. However, the faces() method is also using these variables for several other face features. C... |
This question is more about an approach to a complicated data situation rather than particular statistical methods.
I'm modeling our organization's electricity bills, and I have monthly billing data from 2008 to the present. I have a fairly accurate model for electricity usage, based on the month's average temperature.... |
Thanks for reading my question.
I have several thousand data points scattered on an (x,y) grid that I am trying to cluster. The data points are not uniformly distributed across the grid, but are concentrated in certain areas. I am most interested in identifying the centers of the clusters as representing starting poi... |
It is common to use weights in applications like mixture modeling and to linearly combine basis functions. Weights $w_i$ must often obey $w_i ≥$ 0 and $\sum_{i} w_i=1$. I'd like to randomly choose a weight vector $\mathbf{w} = (w_1, w_2, …)$ from a uniform distribution of such vectors.
It may be tempting to use $w_i = ... |
I am trying to use the 'density' function in R to do kernel density estimates. I am having some difficulty interpreting the results and comparing various datasets as it seems the area under the curve is not necessarily 1. For any probability density function (pdf) $\phi(x)$, we need to have the area $\int_{-\infty}^\in... |
I am trying to understand the mathematical difference between Cpk and Ppk used in Statistical Process Control (SPC). I have gone through the web but all I found a confusing and more confusing theoretical implication of the two. Before I can try to induce their application, I will need to find out What mathematical diff... |
(I think this question is appropriate as a community wiki? If not, please close it, no hard feelings.)
Does anybody have links to webpages/PDF files of advice for grad students in statistical theory (or even better if econometric theory) trying to come up with good research questions?
I have been able to find such adv... |
Context
A popular question on this site is " What are common statistical sins?".
One of the sins mentioned is assuming that "correlation implies causation..." link
Then, in the comments with 5 upvotes it is suggested that: "Google makes $65B a year not caring about the difference."
At the risk of over-analysing a light... |
Suppose you have recently run a survey on a known population (N=1000). You surveyed a subset of that population randomly (n=250). Now, suppose that you have a number of variables that are known. Like geography, expenditures, number of sales.
Are there statstical tests that takes into account the known variables from t... |
Does anyone know of examples of wrapping an existing piece of supervised learning software to output models in PMML format? Of particular interest are learners that just take in labeled vectors of numbers as training data and put out models that are pretty much just coefficient vectors (liblinear, SVMlight, BXRtrain, ... |
I have read that PP unit root is often used in economy. Is it sensible to do both tests (PP & ADF) or is PP test enough?
|
I have performed a repeated measures ANOVA in R, as follows:
aov_velocity = aov(Velocity ~ Material + Error(Subject/(Material)), data=scrd)
summary(aov_velocity)
What syntax in R can be used to perform a post hoc test after an ANOVA with repeated measures?
Would Tukey's test with Bonferroni correction be appropriate?... |
My problem is that I have weekly data from 2008, 2009 and 2010 but the number of weeks in each of these years are not the same since in we (in Denmark) code the last week in 2009 as 53. This means that I have 52 weeks in 2008 and 2010 but 53 weeks in 2009. Is there some way to make R understand this and treat the time ... |
I am a doctoral student in clinical neuropsychology, and am in the process of creating z-unit weighted composite scores based on a battery of ability tests (i.e., attention/executive functions composite = Z scores for Trails A&B, Stroop, Digit span, RBANS coding, Symbol search). The scores will be used in a regression... |
I am trying to move from using the ez package to lme for repeated measures ANOVA (as I hope I will be able to use custom contrasts on with lme).
Following the advice from this blog post I was able to set up the same model using both aov (as does ez, when requested) and lme. However, whereas in the example given in that... |
Wikipedia explains:
For a data set, the mean is the sum of the values divided by the number of values.
This definition however corresponds to what I call "average" (at least that's what I remember learning). Yet Wikipedia once more quotes:
There are other statistical measures that use samples that some people confus... |
I have a computational experiment that takes a size parameter $s$ and returns true or false.
It has been suggested that the result of the experiment is independent of $s$, but I don't think so. I expect a general decrease in the numbers, though only logarithmically dependent on $s$. (This makes it hard to detect and ... |
I am looking at some problems, and in some, to test the coefficients, sometimes I see people using Student's distribution, and sometimes I see Normal distribution. What is the rule?
|
Question:
I want to be sure of something, is the use of k-fold cross-validation with time series is straightforward, or does one need to pay special attention before using it?
Background:
I'm modeling a time series of 6 year (with semi-markov chain), with a data sample every 5 min. To compare several models, I'm using... |
I am using ggplot and I would like to label the scales in each facet of a plot manually. The concept is discussed here:
http://groups.google.com/group/ggplot2/browse_thread/thread/d2044ed0f91de98a
The solutions provided there work but I am still wondering if ggplot yet supports the option to provide scale labels per fa... |
I'm testing ADF, PP and KPSS unit tests with tseries library. I get strange result with ADF and PP.
I have this vector:
x <- rnorm(1000)
obviously this vector is trend stationary. OK, I've done ADF, PP and KPSS tests and all of these confirm it.
I have noticed that if I have a strong trend like:
f<-jitter(1:1000)
ADF... |
I have the following statistical problem:
I have two boxes, each has exactly 10000 numbers in it. Each number is either 0, 1, or 3. What I need to know is if the average amount in one box is bigger or smaller than the average amount in the other box.
Unfortunately, picking numbers is very costly for me. So what I would... |
Is there an R package that I can use to explore whether there exist relationships between variables?
Typically when I am looking for patterns I look at correlations, and then a facet plot. Then I manually apply some transformations to variables in the data. I was wondering if I could accelerate this process through an ... |
Is there a R package that I can use to specify Smooth Transition Models. I'm looking specifically for something that allows me to specify a TAR model for a given time series.
In 2008, a package, RSTAR, was presented in the R User Conference by Mehmet Balcilar. However, the packages doesn't seems to be published and I w... |
I'm doing an unit root test using Phillips-Perron in the tseries library (pp.test).
I tried this code:
> pp.test(c(1:1000))
and the result is:
Error in pp.test(c(1:1000)) : Singularities in regression
doing a research I found the lines on the pp.test function with this error:
if (res$rank < 3)
stop ("singularities... |
I am looking for a statistical test to compare frequencies in a particular dataset. In a long string, a particular sequence of characters occurs at a frequency of x per 1000 characters. In some portions of the string, the frequency is higher at y per 1000 characters. Can we tell if y and x are significantly different o... |
I would like to plot four barplots on a single graph in R. I have used the following code. Here, how can keep a legend on top of the graph, specifically the legend should be between 2 and 3 barplots. I also tried with par(mar=c(4.1,4.1,8.1,4.1) but there is no success. Moreover, I also tried to run legend() after the s... |
I am attempting to use the monomvn package to impute monotone missings. I've followed the basic example:
data(cement.miss)
out <- monomvn(cement.miss)
However none of the outputs seem like the original input with missing imputed. I'm sure I'm missing something. Apologies in advance if this question is amateurish. ... |
I have the following timeseries
obtained using the data posted below.
For a sliding window size of 10, I am trying to compute the KL-divergence between the PMF of values within the current sliding window and the PMF of the history with the final goal of plotting the value of KL-divergence across time so that I can com... |
The mean distance is probably zero due to averaging out. But what about the mean of the absolute distance?
|
I'm asked to write an introduction to statistics and I'm struggling how to graphically show the way p-value and power relate. I've come up with this graph:
My question: Is there a better way of displaying this?
Here is my R code
x <- seq(-4, 4, length=1000)
hx <- dnorm(x, mean=0, sd=1)
plot(x, hx, type="n", xlim=c(-4... |
I am currently working on a research project that requires a reliable method for non-parametric kernel density estimation. Some specifics about my problem:
I have $N$ sample points $X_1,X_2...X_N$, each of which corresponds to an outcome of an $M$ dimensional random variable $W = (w_1..w_M)$. I would like to assign a ... |
I have been running a repeated measures mixed model in SAS and the denominator degrees of freedom for the F statistic seems to be really high. In this case I have roughly 200 individuals and three measurements for each individual (the repeated statement) and degrees of freedom are over 500. So it seems to be roughly re... |
Given a minimal dataset where am looking for the occurrence of a certain motif within a dataset of 500 observations. with_motif represents obervations with the specified motif and without_motif are observations without the motif.
with_motif <- 100
without_motif <- 400
dt <- data.frame(with_motif,without_motif)
The fol... |
If I have the following sensitivity and specificity values, what is the best decision we can say in this case?
sensitivity specificity
----------- -----------
66.3 74.7
87.2 65.9
56.4 76.4
79.5 94.3
Thanks.
|
I want to plot using GNUplot a bunch of data that is in this form:
123 130 5
... where the first number is the x starting value, the second is the x ending value, and the 3rd number is the y value.
Ideally I would plot these in an accumulative/stacked manner.
Is there any easy way to do this with GNUplot?
|
Let's say that I have a categorical variable which can take the values A, B, C and D. How can I generate 10000 random data points and control for the frequency of each? For example:
A = 10%
B = 20%
C = 65%
D = 5%
Any ideas how I can do this?
|
Just want to make a little survey,
What are, according to you, the best approach to model categorical time series?
I'm building a model able to generate time series reproduicing the characteristics of a set of data. The available data is a discrete time, discrete-valued time serie.
I have generated synthetic time serie... |
What exactly is the meaning of the "degree of interaction" or "interaction degree" in the MARS model?
e.g. R: earth(..., degree=2)
|
Possible Duplicate:
How to generate random categorical data?
For example, let's say I have two variables, Var1 and Var2.
Var1 can have values A, B and C and Var2 can have values 1, 2 and 3.
Now the tricky bit:
I want to achieve that conditional probabilities of observing 1, 2 and 3 depend on Var1.
For example if Var... |
I'm interested in any references for simulating ordinal random variables to be used in a Bayesian (multilevel) analysis.
|
I have a table with a couple hundred columns and a few hundred thousand rows and want to determine which combination of 5-10 columns best correlate with a target column.
I have SQL Server and Excel but no budget beyond that.
My current plan is:
Pull the table into Excel
Use the correl() function on each column
Combine... |
How can I generate binary time series such that:
Average probability of observing 1 is specified (say 5%);
Conditional probability of observing 1 at time $t$ given the value at $t-1$ ( say 30% if $t-1$ value was 1)?
|
Say that you're making a political research, and you want to know how many people vote to Party A and how many vote to Party B. (There are only two choices.)
You make a random survey of 10 people, and find that 1 out of your 10 votes A, while the other 9 vote B.
What would you conclude is the average expected ratio of ... |
I am having an input data set( 14 x 250 ) which has attached a labels set ( 1 x 250 ).
The labels set is discrete( 0 vs. 1). The problem is that the each one of the 14 characteristics are continuous. For example, for characteristic 1 I am having :
10.18 ; 11.18 ; 9.89 ; 22.45
0 ; 1 ; 0 ; 0
I want to transf... |
I'm not good at Statistics but I need to use it to summarize my case study.
So I consult with a person who're good at Statistics. He suggested that
My data is discrete because all the values are integer and some are duplicated as shown below. I want to find correlation between x and y of the two data sets below. In dat... |
In follow up to a question posted here: Constrained linear regression through a specified point
What are some ways that we can tell if a simple linear regression model is "good" when we constrain it through a specified point?
|
Suppose you have recorded a set of paths in the $y,t$ plane, with $y = f(t)$, $f$ is a stochastic function (i.e. there is a noise term), and $t$ might be time or some other monotonic increasing independent variable.
Suppose further that you know the underlying process is random, meaning the same set of initial condit... |
I am working on an ANN-based forecasting model for a financial time series. I'm using 5-fold cross-validation and the average performance is so so. Performance on the last fold (the iteration where the last segment is omitted from training and used for validation) is better than average.
Is this a coincidence / data-de... |
I have a processed dataset where patients took a medication and gained a varying amount of weight. In addition, any ICD9 diagnoses the patients have received while being monitored are recorded. I'd like to see if certain diagnoses are correlated with amount of weight gained. What would be a good procedure for testing t... |
All,
I am estimating a multilevel logistic regression with group predictors, but am unclear about some of the advice given by Gelman and Hill (2007) in their book. Therein, they recommend allowing every coefficient to possibly vary, given a large enough N. Does that include group predictors as well? They weren't cle... |
I am using SVM to predict diabetes. I am using the BRFSS data set for this purpose. The data set has the dimensions of $432607 \times 136$ and is skewed. The percentage of Ys in the target variable is $11\%$ while the Ns constitute the remaining $89\%$.
I am using only 15 out of 136 independent variables from the data ... |
I've 110 variables & 200 data points. Of this 110 variables, one is group variable (say "brown eye","blue eye"). I want to use discriminant analysis to classify the groups based on remaining 119 variables. Since the variables are large, to get a meaningful result I need to reduce the number of variables. So, the are 3 ... |
It is a known fact that median is resistant to outliers. If that is the case, when and why would we use the mean in the first place?
One thing I can think of perhaps is to understand the presence of outliers i.e. if the median is far from the mean, then the distribution is skewed and perhaps the data needs to be exami... |
The bootstrap, in its standard form, can be used to calculate confidence intervals of estimated statistics provided that observations are iid. I. Visser et al. in "Confidence Intervals for Hidden Markov Model Parameters," used a parametric bootstrap to calculate CIs for HMM parameters. However, when we fit an HMM on an... |
I am trying to develop a logic to identify association between different time series for association mining. I have a lot of series and need to find whether or not the association exists. I figured two ways to do this:
Constructive: try to find relation in given two series.
Destructive: try to prove that relation does... |
I am trying to get upto speed with R. I eventually want to use R libraries for doing text classification. I was just wondering what people's experiences are with regard to R's scalability when it comes to doing text classification.
I am likely to run into high dimensional data (~300k dimensions). I am looking at using... |
Is there a function to test the hypothesis that the correlation of two vectors is equal to a given number, say 0.75? Using cor.test I can test cor=0 and I can see whether 0.75 is inside the confidence interval. But is there a function to compute the p-value for cor=0.75?
x <- rnorm(10)
y <- x+rnorm(10)
cor.test(x, y)
|
Given that software can do the Fisher's exact test calculation so easily nowadays, is there any circumstance where, theoretically or practically, the chi-squared test is actually preferable to Fisher's exact test?
Advantages of the Fisher's exact test include:
scaling to contingency tables larger than 2x2 (i.e any r x... |
I need some advice on how to proceed with my data analysis. I have 3 groups (Archaea, Bacteria and Eukarya). Each group has unequal number of individual species (70, 651, and 244 respectively). Each specie was given 7 different treatments (A, B, C, D, E, F, and G) and I counted the number of domains (you can call it 'y... |
Consider a simple time series:
> tp <- seq_len(10)
> tp
[1] 1 2 3 4 5 6 7 8 9 10
we can compute an adjacency matrix for this time series representing the temporal links between samples. In computing this matrix we add an imaginary site at time 0 and the link between this observation and the first actual obse... |
Let's say I have 1 success in 4 bernoulli trials, and I wish to plot the distribution of the parameter $p$ of the corresponding binomial distribution. I'm using R.
The probability of seeing 1 sucess and 3 failures in 4 tests for $p=0.25$ is, for these parameters:
> n <- 4
> p <- 0.25
> dbinom(1, n, p)
[1] 0.421875
To ... |
I don't really have a motivation for this - but I was thinking about this and couldn't work it out.
Suppose I have a random variables $X$ and $Y$ which are correlated. Is it possible that the partial correlation between $X$ and $X\cdot Y$ is zero after taking into account Y? In other words, would a regression of $X$ o... |
First off, I know little about statistics, so some of this question may seem naive.
I'm trying to perform linear regression to model the relationship between x and y where:
-x is a company's daily stock volume on a date
-y is variable that is taken from the same date, however is something unrelated to stock volume. It... |
I have circular data such that multiple human participants were, each shown a color from a color wheel, asked to remember it for a "retention interval", then report it back by clicking a color wheel. Each participant was tested many times in each of two conditions testing conditions (short retention interval vs long r... |
I recently analyzed an experiment that manipulated 2 categorical variables and one continuous variable using ANCOVA. However, a reviewer suggested that multiple regression with the categorical variable coded as dummy variables is a more appropriate test for experiments with both categorical and continuous variables.
W... |
An basic question came to my mind while I was working on sample size calculation. I have some possible explanation and I would like to compare it to yours.
Let us say I would like to explain some response variable $Y$ from explanatory variables $A$ and $B$.
Further, let us assume that $B$ has no effect on $Y$; the corr... |
So in order to better acquaint myself with Gibbs sampling, I've been working on a fairly simple linear model, written in Python/R. Basically, I have 2-dimensional input data (the xi) and a scalar output vector (the yi). I am looking to fit a beta vector, i.e. βT * xi = yi + εi (εi is the noise).
So I decided I'd use a ... |
I refer to this article http://www.scientificamerican.com/article.cfm?id=the-mind-reading-salmon.
Is there a p-value equivalent for a set of significance tests, especially in the case where some of the tests are correlated? By correlated I mean that they are not completely independent, and considering them completely i... |
Is it possible to put a nominal explanatory variable as a continuous variable in a GLM in R (instead of telling R that its a factor with different levels) to see if this variable (treatment) is a significant driver of the response variable that we are interested in before looking at the levels?
Thanks!
|
I'm running AB tests on my website homepage, with 8 different variations. You can read about the purpose of the test here if you need to (not essential) - http://westiseast.co.uk/blog/ab-split-testing-a-promise-ogilvy/
My question is this - at what point can I remove the worst performing variants from the test?
Can I ... |
I have a dataset that includes individual responses to a series of questions.
Participants played a game with one of two roles (hider, seeker) and indicated their response with a binary variable (0:BLUE, 1:RED).
There were 4 within subject conditions and 3 between subject conditions.
I would somehow like to graphically... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.