search for: pearson

Displaying 20 results from an estimated 1677 matches for "pearson".

2013 Mar 28
2
hierarchical clustering with pearson's coefficient
Hello, I want to use pearson's correlation as distance between observations and then use any centroid based linkage distance (ex. Ward's distance) When linkage distances are formed as the Lance-Williams recursive formulation, they just require the initial distance between observations. See here: http://en.wikipedia.or...
2001 Nov 16
2
pearson residuals in glm for binomial response (PR#1175)
R version 1.3.0 OS: SunOS 5.7, but I think the same problem occurs with Windows An incorrect formula seems to be used to calculate the pearson residuals for a generalized linear model with a binomial response. Here is a simple program which gives (a) the pearson residuals calculated directly, (b) the pearson residuals from glm, and (c) the deviance residuals from glm. The first and last columns are quite close. The middle differs from...
2012 May 29
2
a question about "by" and "ddply"
...r each group separately (kind of similar to "split file" in SPSS). I've been experimenting with different functions, and I was able to do this correctly using ddply function, but output is a little bit difficult to read when I do the cor.test to get all the data with p values, df, and pearson r (see below). I also tried to do it with by function. Although, with by, it shows the data for two groups separately, it seems like it calculates the same r for both groups. Here is my code for both ddply and by, and the output as well. I was wondering if there is a way to display the output bette...
2011 Dec 27
2
How to create a loop and then extract values from the list generated by cor.test
Dear all, I would like to conduct a Pearson's correlation using cor.test separately for each individual in my data set. Each individual has nine observations of the measurement variable 'Delta13C'. I can figure our how to do it manually one 'Individual_ID' at a time, but I cannot figure out how to automate the process (a...
2001 Dec 19
1
Pearson residuals in quasi family
...edict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^2 4 5 6 7 8 1.165767 1.165767 1.165767 1.165767 1.165767 The standard errors of the fitted values are greater in the quasi-Lik approach, of course. Because of this, it's expected that the pearson residuals are smaller in the quasi-Lik, approach; but > residuals(obj, type="pearson")[1:5]-residuals(obj1, type="pearson")[1:5] 4 5 6 7 8 0 0 0 0 0 That is resid(obj1, type="pearson")!=resid(obj1, "response")/(predict(obj1, se.fit=T)$se.fit Am I wron...
2013 Jul 09
0
probable bugs in stats::loglin calculation of pearson chisq
In running the following example of a loglinear model for the Titanic data, I was surprised to see NaN reported for the Pearson chisq > loglin(Titanic, margin=list(1:3, 4)) 2 iterations: deviation 2.273737e-13 $lrt [1] 671.9622 $pearson [1] NaN $df [1] 15 $margin $margin[[1]] [1] "Class" "Sex" "Age" $margin[[2]] [1] "Survived" Tracing it back, this occurs because there ar...
2010 Apr 02
2
tetrachoric correlations
Hi, Is there any R library/package that calculates tetrachoric correlations from given marginals and Pearson correlations among ordinal variables? Inputs to polychor function in polycor package are either contingency tables or ordinal data themselves. I am looking for something that takes marginal distributions and Pearson correlation as inputs. For example, Y1=(1,2,3) with P(Y1=1)=0.3, P(Y1=2)=0.5, P(...
2011 Mar 14
3
Standardized Pearson residuals
Is there any reason that rstandard.glm doesn't have a "pearson" option? And if not, can it be added? Background: I'm currently teaching an undergrad/grad-service course from Agresti's "Introduction to Categorical Data Analysis (2nd edn)" and deviance residuals are not used in the text. For now I'll just provide the students with a...
2010 Feb 22
1
lmom: plotting log Pearson Type III
Can anyone show me how to add a log Pearson type III plot using the evdistq() command to an extreme value plot using the lmom package? Attached sample code below... Thanks in advance, Dave library(lmom) # annual maximum daily streamflows Mackenzie River mackenzieRiver = c(26600, 30300, 34000, 32000, 29200, 28300, 28600, 26400, 28300, 2...
2003 Feb 10
2
Pearson's residuals in logistic regression (PR#2539)
Full_Name: Bin Nan Version: 1.3.0 OS: Win32 Submission from: (NULL) (141.211.15.110) The function resid(fit, "pearson") seems not giving the same Pearson's residuals for logistic regression as what Splus does. I found the problem when I fitted glm with family = binomial using Crowder's seed data.
2005 Jul 14
0
Pearson dispersion statistic
...e standardized deviance residuals: summary(model.gamma)$deviance.resid /(summary(model.gamma)$dispersion * (1 - hatvalues(model.gamma)))^0.5 I noticed differences with Genstat which outputs these stand. dev. residuals directly, and they are explained by the automatic use of deviance instead of Pearson. Kind regards, Robin Smit -----Original Message----- From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk <mailto:ripley@stats.ox.ac.uk> ] Sent: dinsdag 12 juli 2005 15:12 To: Smit, R. (Robin) Cc: r-help@stat.math.ethz.ch Subject: : Re: [R] Dispersion in glm (was (no subjec...
2008 Jan 02
2
strange behavior of cor() with pairwise.complete.obs
Hi all, I'm not quite sure if this is a feature or a bug or if I just fail to understand the documentation: If I use cor() with pairwise.complete.obs and method=pearson, the result is a scalar: ->cor(c(1,2,3),c(3,4,6),use="pairwise.complete.obs",method="pearson") [1] 0.9819805 The documentation says that " '"pairwise.complete.obs"' only works with the '"pearson"' method for 'cov' and...
2008 Nov 27
2
1-Pearson's R Distance
Hi again List, Well this time I’m writing for a friend (really J). He needs to create a distance matrix based on an abundance matrix using the 1-Pearson’s R index. Well I told him to look at the proxy package, but there is only Pearson Index. He needs it to perform a clustering. Well, as soon as he told me there proxy only had the Pearson index I thought: “He could just do something like >NewObject<-1-PearsonMatrixObject” But I didn’t tell...
2001 Oct 10
2
Pearson residuals (PR#1123)
Full_Name: Carmen Fernandez Version: 1.3.1 OS: Submission from: (NULL) (138.251.202.115) I think there is a problem when computing Pearson residuals, in that they seem to be computed at the raw residuals divided by the square root of the corresponding diagonal element of the weight matrix W evaluated at the last step of the iterative model fitting procedure (IWLS), instead of dividing by the square root of the model variance. Here'...
2008 Apr 05
2
pearson's correlation
Hello, I used the function cor to calculate the pearson correlation coefficient between variables. However, the resulting values do not correspond to the outcome of my excel-calculations, for which I used the formula Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function "cor" compute the pearson correlation coefficient? Th...
2012 Sep 15
1
p-values in agricolae pearson correlation
I have used the correlation analysis (pearson) in the agricolae package to analyse my data and got unexpectedly low p-values (therefore making many more highly significant correlations in my data than I had expected). I am wondering if the p-values given should be subtracted from 1 to give the real p-value, because for each variable compared a...
2011 Jul 12
3
Help in error removal
Dear all, I am new to programming in R. I deal with microarray data,which is a data frame object type. I need to carry out a few statistical procedures on this, one of them being the pearson corelation. I need to do this between each row which is a gene. So the desired result is a square matrix with the pearson corelation value between each row. So the first column would be (1,1)=0,(1,2),(1,3) and so on. I uploaded the data frame as "a":- a <- read.csv("a.csv",...
2013 Dec 18
1
Fwd: Bad \usage lines question
Dear colleagues, In checking a function I am adding to an R package, I get the following warning pair: ... Bad \usage lines found in documentation object 'nominal': "\\method{print}{nominal}"(x, max.print = 10, posthoc = "std.pearson.residuals.sign", assoc = ifelse("univariate" list(c("N", "alpha.X2", "uc.12", "uc.21")), list(c("N1", "N2", "N12", "uc.12", "uc.21"))), sort.key = NULL, ...) &quot...
2009 Jun 03
1
Validity of Pearson's Chi-Square for Large Tables
Is Pearson's Chi-Square test for contingency tables asymptotically unbiased for large tables (large degrees of freedom) regardless of the expected values in each cell? The rule of thumb is that Pearson's Chi-square should not be used when large numbers of cells have expected values < 5. However,...
2012 Jun 01
1
Violation of sample independence in Pearson's product-moment correlation
Hi all: There was a concern raised by reviewers of a manuscript of mine over the proper execution of a Pearson's correlation. In brief, this was undertaken in order to determine the relationship between the extent of wheel running (y axis) and ethanol intake (x axis) across three, separate 10 day periods in 7 animals. In the paper, the correlational plots for each 10 day-period had 70 data points: One...