Displaying 20 results from an estimated 2000 matches similar to: "'partial' in sort() inefficient?"
2006 Mar 02
2
Bug/Wishlist: 'partial' in 'sort' and 'quantile' (PR#8650)
Hi,
This is essentially a reposting of
http://tolstoy.newcastle.edu.au/R/devel/05/11/3305.html
which had no responses, and the behaviour reported there persists in
r-devel as of yesterday.
(1) sort() with non-null partial
> x = rnorm(100000)
> keep = as.integer(ppoints(10000) * 100000)
> system.time(sort(x))
[1] 0.05 0.00 0.04 0.00 0.00
> system.time(sort(x, partial = keep))
[1]
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end.
I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis.
I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
1998 Sep 03
2
ppoints
When I look at ppoints I see:
ppoints<-function (x)
{
n <- length(x)
if (n == 1)
n <- x
(1:n - 0.5)/n
}
However Venables & Ripley (2nd ed, p 165) say ppoints() should return
(i-1/2)/n for n>=11; (i-3/8)/(n+1/4) for n<=10.
The version below should work as described:
ppoints<-function (x)
{
n <- length(x)
if (n <= 10)
(1:n - 0.375)/(n + 0.25)
else
(1:n - 0.5)/n
2005 Jan 19
1
ppoints (PR#7538)
Dear r-bugs,
Whilst playing with ppoints I discovered
that when one uses it directly, occasional
NA's in a vector also become data fractions:
ppoints(c(1,2,NA,4))
Would it be a good idea to add a warning message
as in:
ppoints <- function (n, a = ifelse(n <= 10, 3/8, 1/2))
{
if(any(is.na(n))) warning("'n' contains NA's")
if(length(n) > 1) n <-
2008 Sep 15
0
how to calculate PPCC?
hi,
I wrote a set of R functions for estimating what is the probability
function that best fits a set of data. I wrote them based in this response:
/http://tolstoy.newcastle.edu.au/R/help/03b/1714.html/
I extracted the relevant segment of the link above:
//> PPCC <- function(shape, scale, x) { # only for weibull /
+ x <- sort(x)
+ pp <- ppoints(x)
+ cor( qweibull(pp, shape=shape,
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel.
#Reproducible script
Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv")
View(Empdata)
install.packages("systemfit")
2012 May 11
1
identify() doesn't return "true" numbers
Dear R community.
I am using the identify() function to identify outliers in my dataset.
This is the code I am using:
####################################################################
# Function to allow identifying points in the QQ plot (by mouseclicking)
qqInteractive <- function(..., IDENTIFY = TRUE)
{
qqplot(...) -> X
abline(a=0,b=1)
if(IDENTIFY) return(identify(X))
2000 Dec 11
1
qqline (PR#764)
I think qqline does not do exactly what it is advertised to do ("`qqline'
adds a line to a normal quantile-quantile plot which passes through the
first and third quartiles."). Consider the graph:
tmp <- qnorm(ppoints(10))
qqnorm(tmp)
qqline(tmp)
The line (which I expected go through all the points), has a slightly
shallower slope than does the points plotted by qqnorm. I think
2010 Aug 12
3
Regression Error: Otherwise good variable causes singularity. Why?
This command
cdmoutcome<- glm(log(value)~factor(year)
> +log(gdppcpppconst)+log(gdppcpppconstAII)
> +log(co2eemisspc)+log(co2eemisspcAII)
> +log(dist)
> +fdiboth
> +odapartnertohost
> +corrupt
> +log(infraindex)
> +litrate
> +africa
>
2009 Jul 01
0
The step before interfacing to GRASS
Dear all,
A very basic terrain calculated as a matrix from Spatial Points Patterns:
#interpolate using the akima package
library(akima)
terrain=interp(ppoints$x,ppoints$y,ppoints$marks,xo=x0,yo=y0, linear=F)
> class(terrain)
[1] "list"
> class(terrain$x) #these are the x-coord i.e: [1...1000]
[1] "numeric"
> class(terrain$y)#these are the y-coord i.e: [1...1000]
[1]
1999 Aug 31
1
Suggestion for qqplot() improvement
>>>>> On Tue, 31 Aug 1999 14:57, Werner Stahel <stahel@stat.math.ethz.ch> said:
WSt> Here is a suggestion. It seems that qqplots, comparing a sample
WSt> to a distribution other than the normal, are not explicitly
WSt> available in S or R. I found
(in S-plus / Trellis it is, see below)
WSt> qqplot(y, rt(300, df = 5))
WSt> as an
2007 Jun 19
2
Function -return value
Hi, I am trying to write a function with the following codes and I would like
it to return the values for "alpha
beta para parab " seperately. Then I would like to use this funstion for
"variable" with factor "a" and "b". But the result turns out to be a matrix
with element like "Numeric,2" ... I guess they are just the values for
2006 Apr 13
2
Plotting positions in qqnorm?
Do you know of a reference that discusses alternative choices for
plotting positions for a normal probability plot? The documentation for
qqnorm says it calls ppoints, which returns qnorm((1:m-a)/(m+1-2*a))
with "a" = ifelse(n<=10, 3/8, 1/2)? The help pages for qqnorm and
ppoints just refer to Becker, Chambers and Wilks (1988) The New S
Language (Wadsworth & Brooks/Cole),
2007 Jun 09
1
What ECDF function?
Hello!
I want to plot a P-P plot. So I've implemented this function:
ppplot <- function(x,dist,...)
{
pdf <- get(paste("p",dist,sep=""),mode="function");
x <- sort(x);
plot( pdf(x,...), ecdf(x)(x));
}
I have two questions:
1. Is it right to draw as reference line the following:
xx <- pdf(x,...);
yy <- ecdf(x)(x);
l <- lm(
2002 Jan 08
0
chi square and mahalanobis
Hi all.
I am seeking for a statistical suggestion.
My data set comprises 382 measures each having 169 variables. Each measure
is the outcome of a nuclear magnetic resonance experiment, so each of the
169 points has the same unit.
As I want to do some multivariate calibration using these data, I checked
whether some multivariate outliers existed. I calculated Mahalanobis
distances and did a
2007 May 27
0
weibplot (Weibull plot) for R
Hello,
The following script allows for Weibull plots using R.
Its output is similar to the output of the wblplot function (or weibplot function) in MATLAB.
As opposed to the previously mentioned function it does not require proprietary software. Instead, it is based on R.
My code also allows for a graphical visualization of weibull fitted data. In particular, data can be represented by a
2012 Jun 04
0
Negative variance with lavaan in a multigroup analysis.
Hi list members,
I saw a couple lavaan posts here so I think I?m sending this to the
correct list.
I am trying to run a multigroup analysis with lavaan in order to
compare behavioural correlations across two populations. I?m following
the method suggested in the paper by Dingemanse et al. (2010) in
Behavioural Ecology.
In one of the groups, lavaan returns negative variance for one path
and I?m
2013 Apr 01
1
95% Confidence Interval for a p-p plot
Hi,
I want to create upper and lower 95% confidence intervals for a p-p plot of
an empirical distribution with a theoretical gamma distribution.
This is my code:
x<-rgamma(100,shape=2, rate=1) # empirical data
fitdistr(x,"gamma") # fit a gamma distribution
dist<-pgamma(x,shape=1.9884256 ,rate=0.8765314 ) # fitted distribution,
using the loglikelihood estimated parameters
2005 Mar 28
1
Reading data from "clipboard"
Dear List,
As a way to learn R, I am trying out some of the
examples shown in the Reference Cards.
I use the following to read a column of numbers from
Excel:
x <- read.delim("clipboard")
My questions are:
1. Why is it that the first number is omitted from the
selected data range? How do I tell R to pick up the
first number as part of the entire selection?
2. The next thing I
1999 Mar 16
1
qqnorm in R-0.63.3
Dear List,
invoking qqnorm-plots in Version 63.3 produces funny things:
using the option `type="s"ยด on qqnorm should give a nice *line* of
observed quantiles. Now, the line is walking along in order to the
points index instead from lowest to highest, wich makes funny slopes.
try x <- table(rnorm(1000) # or similar and
qqnorm(x,type="s") # in 0.63.2 and 63.3
Well, the