Displaying 20 results from an estimated 600 matches similar to: "Box-Cox Transformation: Drastic differences when varying added constants"
2003 Aug 29
3
Creating a new table from a set of constraints
Hi Everyone,
Here's a silly newbie question. How do I remove unwanted rows from an
R table? Say that I read my data as:
X <- read.table("mydata.txt")
and say that there are columns for age and gender. Call these X[5] and
X[10], respectively.
Here, X[5] is a column of positive integers and X[10] is binary valued
i.e., zero (for male) and one (for female)
Now, say that I
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
2011 Apr 30
4
QQ plot for normality testing
Hi all,
I am trying to test wheater the distribution of my samples is normal with QQ plot.
I have a values of water content in clays in around few hundred samples. Is the code :
qqnorm(w) #w being water content
qqline(w)
sufficient?
How do I know when I get the plots which distribution is normal and which is not?
Thanks, m
[[alternative HTML version
2006 Feb 01
1
Difficulty with qqline in logarithmic context
Hi, R friends. I had some difficulty with the following code:
qqnorm(freq, log='y')
qqline(freq)
as the line drawn was seemingly random. The exact data I used appears
below. After wandering a bit within the source code for "abline",
I figured out I should rather write:
qqnorm(freq, log='y')
par(ylog=FALSE)
qqline(log10(freq))
par(ylog=TRUE)
2009 Nov 02
7
qqplot
Hi,
We could use qqplot to see how two distributions are different from each other. To show better how they are different (departs from the straight line), how is it possible to plot the straight line that goes through them? I am looking for some thing like qqline for qqnorm. I thought of abline but how to determine the slope and intercept?
Best wishes,
Carol
2010 Aug 06
1
qqline error: Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?
Hi all,
I'm modeling using lme in the nlme package. qqnorm makes plots just find,
but when I try to add a line with qqline, I get the following error:
"Error in sort.list(x, partial = unique(c(lo, hi))) :
'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?"
For example
> modelincr10<-lme(lruin~can.pos.num, data=rwushi30, random=(~1|
2000 Sep 21
2
qqnorm(), is it "backwards"?
Hello R friends,
I'm wondering why I get funny qqnorm() results. It seems that they should
all be reflected in the normal qqline().
For instance: if I qqnorm() bimodal or uniform data I get a sigmoidal in
which the qqnorm() points lie above the qqline() at -ve theoretical
quantiles, and the qqnorm() points lie below the qqline() at +ve
theoretical quantiles. Yet I expect such platykurtic
2008 Aug 05
2
qqline function doesn't plot
I have a data vector x. When I try
qqline(x)
I get the following error:
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
And a blank plot appears.
Can anybody help? What am I doing wrong?
Thanks,
Scotty
_________________________________________________________________
Contest
[[alternative HTML version deleted]]
2011 Jul 25
1
scripting qqplot and qqnorm
Hi all,
I am an R newbie, and I have a question about scripting. I have the
following lines which I want to put int\
o a script which I can call from the shell of a Mac/Linux machine :
myrns <- read.csv(file="/Users/vihan/test.csv",sep="",header=FALSE)
qqnorm(myrns)
qqline(myrns)
This works fine on an interactive R session.
However, as I understand the basic framework of
2005 Apr 03
2
how to draw a 45 degree line on qqnorm() plot?
# I can not draw a 45 degree line on a qqnorm() plot,
jj <- sample(c(1:100), 10)
qqnorm(jj)
abline() don't work.
Thank you.
2010 Dec 18
3
use of 'apply' for 'hist'
Hi all,
##########################################
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfrow=c(2,6))
apply(Q5,2,hist)
myf=function(x){ qqnorm(x);qqline(x) }
apply(Q5,2,myf)
##########################################
These looks ok.
However, I would like to achieve more.
Apart from using a loop,
is there are fast way to 'add' the titles to be
2010 Jun 24
4
Simple qqplot question
I am a beginner in R, so please don't step on me if this is too
simple. I have two data sets datax and datay for which I created a
qqplot
qqplot(datax,datay)
but now I want a line that indicates the perfect match so that I can
see how much the plot diverts from the ideal. This ideal however is
not normal, so I think qqnorm and qqline cannot be applied.
Perhaps you can help?
Ralf
2005 Oct 29
1
how to get colnames of a dataframe within a function called by 'apply'
Hello alltogether,
how is it possible to assign the colnames of a data.frame to a function
called by apply, e.g. for labeling a plot?
Example: I want to plot several qqnorm-plots side by side and there
should be a maintitle for each qqnorm-plot which is identical to the
respective colname.
I checked, but the column which is processed by the function called by
apply does not contain a colname
2008 Jul 06
1
Backgrounds in Multiple Plots made with "fig"
The following code was adapted from an example Vincent Zoonekynd gave on his
web site http://zoonek2.free.fr/UNIX/48_R/03.html:
n <- 1000
x <- rnorm(n)
qqnorm(x)
qqline(x, col="red")
op <- par(fig=c(.02,.5,.5,.98), new=TRUE)
hist(x, probability=T,
col="light blue", xlab="", ylab="", main="", axes=F)
lines(density(x),
2006 Oct 25
1
Drawing a reference line for a qqplot with reference to Weibull distribution
Hi,
I'm trying to create a qqplot with reference to a Weibull distribution
including a reference line. This is my current code:
lights.data <- scan("lights.dat")
#Generate Weibull quantiles
prob.grid <- ppoints(length(lights.data))
prob.quant <- qweibull(prob.grid , 1.5,4)
#Draw QQ plot
qqplot(prob.quant,lights.data)
#add red reference line
qqline(lights.data,col = 2)
2014 Jul 11
2
outliers (Marta valdes lopez)
Tu fichero tiene los decimales como puntos y no como comas como tu le
indicas. Te dejo un ejemplo
#---------------------------------------------------------------------------------------------------------------------
setwd(dir="c:/Users/usuario/Desktop/")
library(outliers)
filename<-"timediff.csv"
time<-read.csv(filename, sep=";",header=TRUE,dec=".")
2012 Feb 10
1
Formatting Y axis.
I've looked around and I just can't find anything that will work for my
needs. This is a bit of a 2 part question but pertaining to the same topic
so bare with me.
The first is with my qq plot. On the Y axis of my qq plot it'll have my
sample quantities but because my data is log-normal it'll show numbers
between 0 - 5 (depending on the data). I'd like to know how to get it,
2002 Apr 16
2
multiple plot devices
Hello,
sorry but i found no way or help to work
with multiple graph devices (Rdocs,SearchIndex).
When is use the function only the graphic device of the last variable is open.
How is it possible to let the several plot-device open or save this in a file with different names ?
(win 2000 - R1.4.1)
thanks for advance
& regards,Christian
normal <- function(x) {
par(mfrow=c(2,2))
2011 May 27
1
Normality test
Dear Sir,
I am writing to inquire about normality test given in nortest package. I
have a random data set consisting of 300 samples. I am curious about which
normality test in R would give me precise measurement, whether data sample
is following normal distribution. As p value in each test is different in
each test, if you could help me identifying a suitable test in R for this
medium size of
2005 Apr 28
3
have to point it out again: a distribution question
Stock returns and other financial data have often found to be heavy-tailed.
Even Cauchy distributions (without even a first absolute moment) have been
entertained as models.
Your qq function subtracts numbers on the scale of a normal (0,1)
distribution from the input data. When the input data are scaled so that
they are insignificant compared to 1, say, then you get essentially the