instruction stringlengths 9 38.7k |
|---|
I'm trying to estimate the design effect of a series of relatively small sample size surveys ($n\sim 70$) with multiple responses. Design effects roughly correspond to how much larger actual sample variance than would be expected from naive random sampling. The simplest way to parametrize this is for Effective Sample S... |
In a technique that uses CUSUM for change-point detection in this paper, the first step is given below:
Let $x_1, x_2,..., x_n$ be the $n$
samples in an event-series. The
samples are ranked in increasing order
and the rank $r_i$ for each sample is
calculated. In case of ties, we assign
average rank to each s... |
I know that "deviations in the data are devil", and when the distribution is highly skewed, it is better to consider median as average rather than mean, but how to decide these hard-limits.
For example:
CASE 1:
Assume X = 10,20,30,40,50,60,70
In this case, I think that it is better to use mean and that it will give v... |
I received this question by email from a Neuroscience PhD student.
I would greatly appreciate if you
could please let me know whether
Factor Analysis could load positively
and inversely correlated variables
onto the same latent factor, whereas
Cluster Analysis can only cluster into
the same factor either p... |
I'm decently familiar with mixed effects models (MEM), but a colleague recently asked me how it compares to latent growth models (LGM). I did a bit of googling, and it seems that LGM is a variant of structural equation modelling that is applied to circumstances where repeated measures are obtained within each level of ... |
I've been doing some Machine Learning, and have been using k-fold cross-validation to assess the generalisation performance of the algorithm. I've tried k-fold cross-validation with k = 5 and k = 200 and get very different results for Support Vector Machine classification.
k SVM accuracy
-----------------
5 75%
2... |
I have noticed that there are a few implementations of random forest such as ALGLIB, Waffles and some R packages like randomForest. Can anybody tell me whether these libraries are highly optimized? Are they basically equivalent to the random forests as detailed in The Elements of Statistical Learning or have a lot of... |
Given a predicted variable (P), a random effect (R) and a fixed effect (F), one could fit two* mixed effects models (lme4 syntax):
m1 = lmer( P ~ (1|R) + F )
m2 = lmer( P ~ (1+F|R) + F)
As I understand it, the second model is the one that permits the fixed effect to vary across levels of the random effect.
In my resea... |
Background
I read about StatProb.com from a comment on Andrew Gelman's Blog.
According to the website, StatProb is:
StatProb: The Encyclopedia Sponsored
by Statistics and Probability
Societies combines the advantages of
traditional wikis (rapid and
up-to-date publication, user-generated
development, hyperlinking, and ... |
I have a table I want to convert into a graph (bar-graph or line-graph)
The first column has fixed values. Twenty different values are simulated for these fixed values and kept in the next columns. I want to plot a graph of the fixed column against all the different twenty simulated columns.
How do I go about it?
Edit
... |
Suppose $X\sim \operatorname{InvWishart}(\nu, \Sigma_0)$. I'm interested in the marginal distribution of the diagonal elements $\operatorname{diag}(X) = (x_{11}, \dots, x_{pp})$. There are a few simple results on the distribution of submatrices of $X$ (at least some listed at Wikipedia). From this I can figure that the... |
I have a scenario where I have a User which likes 10 different sports and there is another user which likes 20 different sports. I need to find the correlation between them. What kind of correlations can be used in such a scenario. Any kind of guide would be helpful. I tried with Pearson correlation but was not helpful... |
I am currently trying to do the following in R:
I have thousands of measured spectra (x,y; see below). Each spectra has one or two peaks. Also I have sets of "training" spectra obtained in more controlled conditions and I would like to know which of my training spectra has the closest match to the measured spectra!?
I... |
I have a set of samples in which I assume there are 2 definite subsets in it. I plotted their values in a histogram and found that there are two distinct modes as shown in the figure below.
My question is how do I differentiate two groups. i.e how do I choose a value that differentiates the two subsets?
|
I found the following posts interesting and I was wondering if any of you guys know of good academic papers that describe methods/relationships of exogenous variables in VECM models. If so could you kindly point them out to me as I am very interested in learning. Thank you.
Finding coefficients for VECM + exogenous var... |
I am trying to understand standard error "clustering" and how to execute in R (it is trivial in Stata). In R I have been unsuccessful using either plm or writing my own function. I'll use the diamonds data from the ggplot2 package.
I can do fixed effects with either dummy variables
> library(plyr)
> library(ggplot2)
> ... |
I was advising a research student with a particular problem, and I was keen to get the input of others on this site.
Context:
The researcher had three types of predictor variables. Each type contained a different number of predictor variables. Each predictor was a continuous variable:
Social: S1, S2, S3, S4 (i.e., fo... |
Given a Gaussian distribution $N(\mu_1,\sigma_1^2)$, i would like to choose another mean $\mu_2$ which is $2\sigma_1$ away from $\mu_1$.
In this case our new mean $\mu_2=\mu_1\pm 2\sigma_1$.
How do we calculate the new mean($\mu_2$) in multivariate case?
I mean to say, when your multivariate Gaussian distribution is ... |
According to wiki the most widely used convergence criterion is "assigment hasn't changed". I was wondering whether cycling can occur if we use such convergence criterion? I'd be pleased if anyone pointed a reference to an article that gives an example of cycling or proves that this is impossible.
|
On the Internet there is an example of k-s test being applied relative to distribution of number of bird varieties over different five hour periods.
The observed distribution was:
a=c(0,1,1,9,4)
The expected distribution (if there is no difference between the five hours) could be:
b=c(3,3,3,3,3)
After I found the two... |
I have a multinomial logistic regression model.
One of the output categories is not observed in the data set that I'm using.
Example:
4 different diagnoses (response variable) in the population, but in the sample, Type 3 never occurred
5 hormone level measurements (predictors)
Question
What books/papers discuss t... |
I am using R to replicate a study and obtain mostly the same results the author reported. At one point, however, I calculate marginal effects that seem to be unrealistically small. I would greatly appreciate if you could have a look at my reasoning and the code below and see if I am mistaken at one point or another.
My... |
let v to be forecasted value for periods 1 through T and $v_{t}$ be its forecasted value at time $t$. We express $v_{t}$ as the sum of two terms, its mean at time $t$, and its deviation from the mean at time $t$, $\epsilon_{t}$. In other words, $$ v_{t}= \overline{v_{t}} + \epsilon_{t} $$
The $\overline{v_{t}}$ are ... |
I am trying to discern the best way to calculate a correlation and perform a one-way ANOVA on data I am taking from a PostgreSQL database.
What tools should I use?
Can I do this using the SQL language itself?
Is there an easy way to export the data?
|
I have 100 patients and each patient have 10 longitudinal serum creatinine measurements. The estimated glomerular filtration rates (eGFR) were calculated from a MDRD formula comprising gender, age and serum creatinine. eGFR is the dependent variable and time is the independent variable in linear regression for each pat... |
I have hourly and daily temperature reports for many stations at
http://data.barrycarter.info/
I encourage people to download it, but, at 6.6G, it uses up a lot of
bandwidth.
Is there a service that hosts "public interest" data for free?
I know about http://aws.amazon.com/publicdatasets, but you need an
Amazon EC... |
I am working on the BRFSS dataset with the goal of predicting Diabetes. The dataset has 500,000 rows and 405 columns. It is a 0/1 classification problem, the ratio of 0 to 1 is 90:10. I tried using decision trees, logistic regression an ensemble of decision trees and logistic regression and my misclassification rate is... |
I am looking for a repeated measures version of the Logrank test. If I am correct, I am looking for an equivalent of the Friedman test for survival data.
Any suggestions on where to look? (and R code will always be welcomed :) )
Thanks.
|
I am attempting to test the goodness of fit for a vector of count data to a binomial. To do so I am using the goodfit() function in the vcd package. When I run the function, however, it returns NaN for the p-value of the Chi-squared test. In my setup, I have a vector of count data with 75 elements.
> library(vcd)
> ... |
I have a table I want to convert into a graph (bar-graph or line-graph)
The first column has fixed values. Twenty different values are simulated for these fixed values and kept in the next columns. I want to plot a graph of the fixed column against all the different twenty simulated columns.
How do I go about it? I am ... |
Many academic papers focusing on statistical learning in the applied setting of finance train a model such that their parameter set, B, defines the relationship
y(t) = B*x(t) + e(t)
y could be a 0-1 coded response for an increase (or not) of the asset price at time t. Ignoring the details of the model my question is... |
I need a reality check if you will. I have a data set, where I know how many individual butterflies of two species co-occur at one meadow (not always, though). I have additional variables, for instance wet/dry meadow, intensely cultivated/not cultivated, percent of area around the meadow covered by wet or dry meadows..... |
Is it possible to do 2-stage cluster analysis in R?
Can anybody provide me resource on it?
|
I would like to fit a mixture model to Monte Carlo generated data with probability densities which typically look like those in the attached image.
It would seem from visual inspection that a normal mixture model might be applicable but on checking the CRAN task view I really do not know which package might be appropr... |
I am attempting to test the goodness of fit for a vector of count data to a binomial. To do so I am using the goodfit() function in the vcd package. When I run the function, however, it returns NaN for the p-value of the Chi-squared test. In my setup, I have a vector of count data with 75 elements.
> library(vcd)
> ... |
I have a collection of $10^5$ essays, each of which on average contains $10^3$ distinct words. There are $10^6$ distinct words in the entire collection. If I index every word what is the mean and median size of the inverted index lists?
My guess is that median would be 1, but I have no clue how without the parameters c... |
I am trying to perform a canonical correlation analysis to investigate the relationship between attitudes (14 variables), perceived consumer effectiveness (6 variables) AND Intention to dine (DV) 14 variables. However when SPSS generates the Manova Output there are no tables on redundancy index and as far as I underst... |
I am a software engineer by trade doing stats in my free time. I am playing around with an implementation of Microsoft's TrueSkill rating system for ranking players and openings in from a data set of ~700,000 Dominion games. I want to measure the log loss of predictions that the system gives for multiplayer games so ... |
After a little searching, I was able to find data from the 1990 US census on the frequency of male and female first names, and on surnames. That data is here. I'm not able to find similar data for any other census years, however. Does anyone know where I can get data for other years, both earlier and later?
|
I'm teaching myself probability theory, and I'm not sure I understand any use for variance, as opposed to standard deviation. In the practice situations I'm looking at, the variance is larger than the range, so it doesn't seem intuitively useful.
|
Within the context of a research proposal in the social sciences, I was asked the following question:
I have always gone by 100 + m (where m
is the number of predictors) when
determining minimum sample size for
multiple regression. Is this
appropriate?
I get similar questions a lot, often with different rules of thum... |
What's it called when I'm trying to remove the effect of a variable on another variable? Am I in the right ballpark using the terms "detrending" or "normalizing" or "controlling for Y on X"? What's the general process for doing this?
The problem I'm working with currently is as follows:
I work at a mine that loads trai... |
I have 6 random number generators. They are "black boxes", i.e. I do not know if they are the same or different. For example I do not know if they provide the same arithmetic averages and/or root mean square deviations. My goal is to check if they are the same or different. The problem is that I can generate a limited ... |
For a multilabel dataset, i would like to find the number of clusters involved in it. The below example gives more details about the problem:
Label_A: feature values
Label_B: feature values
Label_A, Label_C: feature values
Label_C: feature values ... etc
We have say $n$ datarecord. Label field may have single label/m... |
I have 3 arms in a trial. I want to compare results of a survey before during and on completion of a treatment. Data is not normally distributed. What test should I use?
|
I am trying to understand Logistic Regression in relation to credit scoring model. I wish to understand the significance of "20/ln(2)" in logistic regression. Why and how is it used?
|
I performed both a SVD decomposition and a multidimensional scaling of a 6-dimensional data matrix, in order to get a better understanding of the structure of the data.
Unfortunately, all the singular values are of the same order, implying that the dimensionality of the data is indeed 6. However, I would like to be abl... |
Assumptions:
In an ANOVA where the normality assumptions are violated, the Box-Cox transformation can be applied to the response variable. The lambda can be estimated by the using maximum likelihood to optimize the normality of the model residuals.
Question:
When the estimates for lambda in the null model and the full ... |
I am currently monitoring the daily energy consumption of a house since January of this year. That daily consumption depends on several variables, including outdoor temperature, solar irradiance etc.
At regular intervals (once every two weeks) I am changing the algorithm of the heating controller, to see if I can impro... |
Online marketers often need to choose a "winning" variation among, say, 2 possible variations.
Example:
PageVariation1 had 1000 sessions with 20 conversions (2.0% response rate) and
PageVariation2 had 800 sessions with 8 conversions (1.0% response rate).
I'm using the "unpooled" Two-Proportion z-Test for estimating ... |
Because all clinical and laboratory data are continuous random variables larger than zero (i.e. they are bounded above zero), is it impossible for them to be normally distributed? Can they only be log-normally distributed?
Thank you.
|
I am trying to use R to develop a corporate financial model.
The model includes various line items, X, of the following form with actual values for time period 1, 2.. n and projected values for periods n+1, n+2,.. n+k. g is the average growth rate for the forecast period.
I need to construct a vector of the following ... |
100 periods have been collected from a 3 dimensional periodic signal. The wavelength slightly varies. The noise of the wavelength follows Gaussian distribution with zero mean. A good estimate of the wavelength is known, that is not an issue here. The noise of the amplitude may not be Gaussian and may be contaminated wi... |
I would like to compute the p-value of my two-way ANOVA. The score that I am using to detect significant samples is the eta score which is computed as SS(between)/SS(total).
In many sites I saw that F=Var(between)/Var(within).
I want to know if I can consider the eta score as the F-statistic value, and then compute ... |
I sincerely apologize if there is another thread already that will answer this question. I'm so incredibly out of my league here that I don't even know what keywords to search for :-).
I'm a computer programmer by trade, and while I have a basic background in math, statistics was never really my cup of tea.
I currentl... |
I would like to generate a random correlation matrix such that the distribution of its off-diagonal elements looks approximately like normal. How can I do it?
The motivation is this. For a set of $n$ time series data, the correlation distribution often looks quite close to normal. I would like to generate many "normal"... |
I'm looking for a clustering implementation with the following features:
Support for high-dimensional data. Now I have approximately 160.000 dimensions/features.
Be able to manage sparse matrix. That is, not only to read sparse matrices, but also capable of making operations in this format.
Properly shows the centroid... |
I ran a GEE model, with a dependent variable of "percent of total students with an unexcused absence," using a binomial family. My dependent variable is basically a proportion, with range from 0 to 1 to obey the rules of the binomial family.
I understand that the difference between the non-event/event 0-1 is "zero perc... |
Question for the experienced data miners out there:
Given this scenario:
There are N shopping carts
Each shopping cart is filled with an arbitrary number of M items from an infinitely large set (with the current amount of data I have, that arbitrary number can hit numbers around 1500)
The order in which each cart is f... |
Related to an earlier question on power analysis for multiple regression, a social science researcher asked me about power analysis for moderator regression (i.e., an interaction effect).
The researcher asked me:
I seem to recall that power of tests
for moderation with two continuous
predictor variables is low - d... |
I know this question might have been around before like in this SO thread, but maybe (hopefully) its answer has changed over time.
Is there any package in R or an outline how to do panel regressions with a discrete dependent variable?
Is there any other open source package that does it and that would help coding some... |
How can the following tables be computed:
Chi-Square table
Student t-table
I'm looking for a formula or procedure used to make these tables.
For example:
If I have a given 'x'-value, as df(degree of freedom) with some confidence percentage 'y', I should be able to plug these x and y values into that formulae or proce... |
I am writing my master´s thesis in finance on the topic of voluntary disclosure of financial targets in annual reports of manufacturing firms.
Context
I have created a dependent variable that is an index of level of disclosure.
At the moment I am gathering firm characteristics as independent variables from around 10... |
I have been doing multinomial logistic regression analysis using SPSS 19.
I have encountered the following problem when I run the analysis procedure:
"Unexpected singularities in the
Hessian matrix are encountered. This
indicates that either some predictor
variables should be excluded or some
categories should... |
Is there a function in R that given a vector of numbers, returns another vector with the standard units corresponding to each value?
where...
standard unit: how many SDs a value is + or - from the mean
Example:
x <- c(1,3,4,5,7) # note: mean=4, sd=2
su(x)
[1] -1.5 -0.5 0.0 0.5 1.5
Is this func already incl... |
If I have a list of values throughout time, say a list of values for every minute throughout an hour of monitoring something, can I somehow 'predict' or estimate what the value would probably be in the future, say another 20-30 minute after my last known value? And if so, how can this be done?
I figure maybe I could d... |
I learned about the zero-inflated negative binomial distribution a few months ago when I was trying to do regression on some discrete data. I have a different data set now, and it seems to be very similar except that the value 1 seems to be over-represented (as opposed to 0). Is there such a thing as a one-inflated neg... |
First of all I have to mention, that I'm not a statician at all, I'm just a simple programmer and I have some curiosities ... and the wrost of all, I don't know where to start from.
Let's assume the following working scenario:
A big company, a internet service provider (ISP) with unlimitd bandwith choose to change how ... |
When using a binomial family, logit link for GLM (or GEE in my case), I notice that my model estimates diverge when my response variables (which are continuous probabilities with range 0 to 1) include 0 or 1 (or 0 <= y <= 1) as observed values, but the models with response variables that don't include 0 or 1 (or 0 < y ... |
I'm going to start out by saying this is a homework problem straight out of the book. I have spent a couple hours looking up how to find expected values, and have determined I understand nothing.
Let $X$ have the CDF $F(x) = 1 - x^{-\alpha}, x\ge1$.
Find $E(X)$ for those values of $\alpha$ for which $E(X)$ exists.
... |
The ultimate goal is to show users, at a glance, if their data is normally distributed.
The first attempt is a kludge that plots the data in a frequency graph. Then, the observed mean and standard deviation are used to build a "normal curve" graph. The frequency chart is laid over the the normal-curve chart and put... |
I'm new to machine learning, and I have been trying to figure out how to apply neural network to time series forecasting. I have found resource related to my query, but I seem to still be a bit lost. I think a basic explanation without too much detail would help.
Let's say I have some price values for each month over a... |
Context:
Within the context of structural equation modelling, I have non-normality according to the Mardia test but univariate indices of skewness and kurtosis are less than 2.0.
Questions:
Should parameter estimates (coefficient estimates) be evaluated using bootstrapping (1000 replicates) with bias-corrected methods... |
I have a three-way contingency table in which the marginal totals for two sides are fixed and for the third are random. I'm wondering how to perform a chi-square test for homogeneity for such a three-way contingency table.
Example
Assume both Trt and Gender marginal totals are fixed.
Thanks
|
I am confused about permutation analysis for feature selection in a logistic regression context.
Could you provide a clear explanation of the random permutation test and how does it applies to feature selection? Possibly with exact algorithm and examples.
Finally, How does it compare to other shrinkage methods like Las... |
Is there a function that does smart date parsing in R?
I know the strftime/as.POSIXct/as.POSIXlt commands, but they require a date formatting string, or throw the error "character string is not in a standard unambiguous format". This happens even when I pass a string with more than enough information to be parseable, ... |
I work quite often with Google's Website Optimizer, essentially it allows you to make small changes to a site to determine if they have an effect on the ratio of clicks to a web page to sales. The stats look like this:
Combination 1: 500 clicks 10 sales
Combination 2: 498 clicks 11 sales
Combination 3: 503 clicks 1... |
I'm a little confused regarding the intraclass correlation coefficient and one-way ANOVA. As I understand it, both tell you how similar observations within a group are, relative to observations in other groups.
Could someone explain this a little better, and perhaps explain the situation(s) in which each method is mor... |
I'm working on a not-too-fancy Bayesian model in R and JAGS. The goal is to isolate coder errors in a content analysis task. Code and output are given below.
The larger question is how to go about debugging JAGS. (I assume that the same advice would hold for BUGS as well.) What am I supposed to make of an error like ... |
The setup is that I'm trying to understand how a computer program works, so I'm capturing some numbers every time a function is called. For example, I might be capturing the number of branches taken and the number of branches incorrectly predicted. During the course of running the program, a particular function might... |
It is said that if the plots of the hypothetical responses are not parallel, but crossed, there is interaction. Suppose we have two factors. Is it possible that the plots cross but we do not have interaction? That is more reasonable when the plots are close to each other.
I noticed the converse is true. We may have int... |
Wikipedia says that the name of concept comes from physics, but I cannot find any similarity between these two concepts.
|
I have a set of sessions and urls that have been accessed in each of these sessions and frequencies with which they have been accessed. I've put them in a matrix-like representation.
Imagine I have the following "Pageview matrix":
COLUMN HEADINGS
books placement resources br aca
Each row represents a session.
Here is... |
I remember hearing an argument that if a certain population of people has a mean IQ of 110 rather than the typical 100, it will have far more people of IQ 150 than a similarly-sized group from the general population.
For example, if both groups' IQs are normally distributed and have the same standard deviation of 15, w... |
I have measured frequency of a certain behavior on 15 individuals.
I would like to create two groups based on the amount of this behaviour that was observed (i.e., a group exhibiting high levels of the behaviour and a group exhibiting low levels of the behaviour).
I want to see whether this new binary variable predict... |
Cumbersome technical assumptions (e.g., mixing properties) are used in the literature to prove Central Limit Theorems for dependent sequences. I sketched a proof that does not require any of these technical assumptions. Can you help me figure out what is wrong with this proof? The proof is at: http://www.statlect.com/c... |
How to find the number of runs in the following
aaaabbabbbaabba
bbaaaaaabbbbaaaaaaa
|
Let's say you want to cluster some objects, say documents, or sentences, or images.
On the technical side, you first represent these object somehow so that you could calculate distance between them, and then you feed those representations to some clustering algorithm.
Externally, however, you just want to group similar... |
I am running a structural equation model (SEM) in Amos 18. I was looking for 100 participants for my experiment (used loosely), which was deemed to be probably not enough to conduct successful SEM. I've been told repeatedly that SEM (along with EFA, CFA) is a "large sample" statistical procedure. Long story short, I di... |
I'm doing some reading on topic modeling (with Latent Dirichlet Allocation) which makes use of Gibbs sampling. As a newbie in statistics―well, I know things like binomials, multinomials, priors, etc.―,I find it difficult to grasp how Gibbs sampling works. Can someone please explain it in simple English and/or using sim... |
This may sound like a noob question but I'm unable to find any 'good' resources/examples on the same. The basic question is this: Most variables, depending on the problem will follow certain types of distributions. Normal/Gaussian may not be the most appropriate one for capturing certain types of phenomena.
Although I'... |
Does anyone know an approach to performing model selection in Weka through cross validation for regression problems?
As far as I can tell, the cross validation is implemented in Weka just to assess the performance of the classifier. I guess that calling Weka API from Java might solve the problem, but is there a GUI-ba... |
I'm running experiements that record the time my algorithm takes to solve a set of problem instances on a particular benchmark. Each problem has an associated difficulty in the range [1, n]. Ideally these should be evenly distributed across the difficulty spectrum but this is not the case: the problem sample I have is ... |
If I have a matrix M of 15 columns, what is R syntax to extract a matrix M1 consisting of 1,7,9,11,13 and 15 columns?
|
I have a matrix M of float values, how to shuffle M line-wise?
|
I use kmeans for clustering a set of data. However, I have to specify the number of clusters. The problem is that sometimes I need 2 and other times I need 3 clusters.
Is there a clustering algorithm that could incorporate that feature in it?
|
What is the difference in meaning between the notation $P(z;d,w)$ and $P(z|d,w)$ which are commonly used in many books and papers?
|
I have a dataset in which the event rate is very low ( 40,000 out of $12\cdot10^5$).
I am applying logistic regression on this. I have had a discussion with someone where it came out that logistic regression would not give good confusion matrix on such low event rate data. But because of the business problem and the wa... |
This follows on from the previous question on differences between K-S manual test and K-S test with R.
My frequency sample was
a=c(0,1,1,4,9).
Then the observed sample is
obs=c(2,3,4,4,4,4,5,5,5,5,5,5,5,5,5)
The expected sample is then
exp=c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5)
I hope you agree.
First, I use ks.test, ... |
I have two variables for some districts in the UK:
Number of crimes per habitant
Median yearly income
Here's what it looks like:
I would like to determine if there is a dependence between the two. I ran a Pearson's correlation test, which gave me the following result:
Pearson's product-moment correlation
data: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.