Displaying 20 results from an estimated 2000 matches similar to: "Help Transforming sums into observations"
2011 Dec 12
1
Is there a way to print branch distances for hclust function?
The R function hclust is used to do cluster analysis, but based on R
help I see no way to print the actual fusion distances (that is, the
vertical distances for each connected branch pairs seen in the cluster
dendrogram).
Any ideas? I'd like to use them test for significant differences from
the mean fusion distance (i.e. The Best Cut Test).
To perform a cluster analysis I'm using:
x
2011 Dec 09
1
Help understanding cutree used for Dunn Index
Basic question:
Is it correct to assume that when using cutree to set the # clusters
(say k=4), cutree determines the clusters by the largest distances
among all potential clusters?
I've read the R help for cutree and am using it to define the number
of groups to obtain Dunn Index scores (using clValid library) for
cluster analysis (using Euclidean Distance and Ward's method)
More
2011 Dec 21
1
Diptest- I'm getting significant values when I shouldn't?
>From library(diptest):
Shouldn't the following almost always be non-significant for
Hartigan's dip test?
dip(x = rnorm(1000))
I get dip scores of around 0.0008 which based on p values taken from
the table (at N=1000), using the command: qDiptab, are 0.02 < p <
0.05.
Anyone familiar with Hartigan's dip test and what I may not be
understanding?
Thanks,
kbrownk
2010 Nov 11
2
Kolmogorov Smirnov Test
I'm using ks.test (mydata, dnorm) on my data. I know some of my
different variable samples (mydata1, mydata2, etc) must be normally
distributed but the p value is always < 2.0^-16 (the 2.0 can change
but not the exponent).
I want to test mydata against a normal distribution. What could I be
doing wrong?
I tried instead using rnorm to create a normal distribution: y = rnorm
2000 Jul 28
2
Loop removal?
Dear all,
I've got a quite large dataframe (stor) with rows subject and rt (reaction
time). I would like to split the reaction times per subject into 6 bins of
equal size. Right now, I'm using the following code:
bindata <- function(rt) {
bindata <- rep(-1,length(rt))
binwidth <- length(rt)/6
bindata[order(rt)[(0*binwidth)+1:(1*binwidth)]] <- 1
2002 Sep 03
1
Bindata package problems
Dear list
I am having a couple of problems with the package 'bindata'.
Having installed it using install.packages("bindata"), I am finding that
when I load it up as a library I get the following errors:
> library(bindata)
Loading required package: e1071
Loading required package: mvtnorm
Warning messages:
1: There is no package called `e1071' in: library(package, char
2007 Feb 07
3
generate Binomial (not Binary) data
Dear All,
I am looking for an R function or any other reference to generate a series of correlated Binomial (not a Bernoulli) data. The "bindata" library can do this for the binary not the binomial case.
Thank you,
Bernard
---------------------------------
[[alternative HTML version deleted]]
2012 Jul 04
2
How to generate a correlated binary data set?
Hi.
I am trying to generate a correlated binary data set.
I've tried to use mvtBinaryEP, binarySimCLF, and bindata packages but none
of them works in R version 2.15.1.
Do you know any package to generate correlated binary covariates and work
in R version 2.15.1, or how to generate it?
Thanks,
[[alternative HTML version deleted]]
2009 Dec 16
1
number of observations used in cor when use="pairwise.obs"
Dear R gurus,
to compute the correlation matrix of "n" variables with "n_obs" observations
each,
possibly including NA, I use cor(M, use="pairwise.obs")
where m is a "n" x "nobs" matrix.
Now I want to know the number of observations actually used in this
computation,
namely for each pair of columns in M, say pair (i,j), I want to compute
sum(
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of
social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a
continuous numeric variable. The age variable (Index1) has been coded as 0
for age 12, 1 for age 15 and 2 for age 18. I am currently using a time
varying predictor, stress (LSI), which was measured at ages 12, 15 and 18,
to examine whether trajectory/variation
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of
social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a
continuous numeric variable. The age variable (Index1) has been coded as 0
for age 12, 1 for age 15 and 2 for age 18. I am currently using a time
varying predictor, stress (LSI), which was measured at ages 12, 15 and 18,
to examine whether trajectory/variation
2007 Jul 03
3
generating correlated Bernoulli random variables
Hi all,
I was wondering how to generate samples for two RVs X1 and X2.
X1 ~ Bernoulli (p1)
X2 ~ Bernoulli (p2)
Also, X1 and X2 are correlated with correlation \rho.
Regards,
Vineet
[[alternative HTML version deleted]]
2001 Oct 11
2
Where's MVA?
Hi All:
Package TSERIES is stated to depend on MVA. However, there is no MVA package to be found under the list of package sources.
Best wishes,
ANDREW
tseries: Package for time series analysis
Package for time series analysis with emphasis on non-linear and non-stationary modelling Version: 0.7-6
Depends: ts, mva, quadprog
Date: 2001-08-27
Author: Compiled by Adrian
2007 Feb 22
1
Diagnostic Tests: Jarque-Bera Test / RAMSEY
Hello R-Users,
The following questions are not R-technical, but more of general statistical
nature.
1. NORMALITY
I built a normal linear regression model and now I want to check for the
residual normality assumption. If I check the distribution graphically and
look at the descriptive characteristics (skewness and kurtosis are below 1),
I would confirm that the residuals are normally
2009 Oct 29
1
correlated binary data and overall probability
Dear All,
I try to simulate correlated binary data for a clinical research project.
Unfortunately, I do not come to grips with bindata().
Consider
corr<-data.frame(ID=as.factor(rep(c(1:10), each=5)),
task=as.factor(rep(c(1:5),10)))
[this format might be more appropriate:]
corr2<-data.frame(ID=as.factor(rep(c(1:10),5)),
tablet=as.factor(rep(c(1:5),each=10)))
Now, I want to
2008 Nov 06
4
mean computation for external data
I have an external data (.txt) for
annual peak flood. The first column is the year, second column is the
observation date, and the last is the observed discharge. My task is to
calculate the mean, skewness and kurtosis of the said data. I was advised to use
read.table() to read the entire data. Please help me on how to perform the
required computation. I am obviously a new user of this statistical
2011 Oct 02
2
Scatterplot with the 3rd dimension = color?
I have 3 columns of data and want to plot each row as a point in a
scatter plot and want one column to be represented as a color gradient
(e.g. larger values being more red). Anyone know the command or
package for this?
Thanks,
KB
2009 Mar 17
1
Need a little help setting the upper median using "layout"...
The code I'm using is shown below.
I would like to have a larger median at the top of the plot so that I can show the entirity of "title_text".
Several times I tried messing with "par(mar", but that seemed to make matters worse.
By any chance can anyone provide any insight as to the best way to increase the top/upper/northern margin, so the entirity of the title is
2003 Oct 28
1
stacking histograms
Hi,
I have a set of observations which are divided into two sets A and B.
I have some code that bins the dataset into 10 bins based on the max and
min of the observed values.
I would like to make a histogram of A & B using my calculated bins but
plot the distribution of B on top of A (like a stacked barplot). This is
possible since both sets A & B are binned using the same bin ranges.
2002 Apr 12
1
correlated binary random numbers
Dear all,
does any of you know a source for R code for
the generation of correlated binary random numbers?
Thanks a lot
Peter Schlattmann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not