Displaying 20 results from an estimated 20000 matches similar to: "categorical variable in scatterplot (car)"
2011 Jan 14
1
Question about scatterplot in package car
I am getting an error message from scatterplot:
> library(car)
> scatterplot(Prestige$income~Prestige$type)
Error in Summary.factor(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, :
range not meaningful for factors
In addition: Warning message:
In Ops.factor(x[floor(d)], x[ceiling(d)]) : + not meaningful for factors
>
The command does output the kind of graph that I want (boxplots).
2006 Feb 01
1
Scatterplot color options in CAR package?
Hi All.
I'd like to change the default plotting colors used to construct a
scatterplot with regression line in the CAR package.
So,
scatterplot(y~pred,smooth=FALSE, xlab="X", ylab="Y", lwd=2)
If I change the palette (e.g., palette(ranbow(6)), I can change the color of
the lines and points.
However, the axes and labels remain in black (i.e., the first color in the
2008 Feb 11
1
scatterplot in CAR
I am trying to use scatterplot function in CAR like the following:
scatterplot(X~Y)
I want to label X points and Y ponits using the different color.
Any idea for this?
Aimin
2002 Aug 26
1
(CAR) Scatterplot and problems (?) with abline
Network Blitz
I'm trying to generate a graph to summarize Interest Rate Parity. This
involves a scatterplot of x against y where the x and y limits are set
so to center the graph on 0,0 and then adding each axis line and a 45
degree line. Using CAR's scatterplot (sample code below) everything
except the axes plot fine:
scatterplot( Interest.Rate.Dif ~ ForPrm| profit,
2005 Jan 14
1
Fine tuning scatterplot() (car package)
Hello all!
System: R2.0.1, W2k.
All packages apdated with update.packages().
I use the default graphic device for my system (no active choice).
I?m trying to fine-tune scatterplot() graphs (package car), for
publication.
I want to control plotting symbols and colours to match plots from
other, less flexible, systems. I also need to make all text and
symbols bigger, to enable printing of the
2012 Nov 15
2
Removing default loess line from scatterplot ({car})
scatterplot() is autogenerating a regression and loess line. I want to remove
the loess line, but can only find samples for how to add it. I definitely do
not have code that adds it (see below), so I am puzzling...
scatterplot(Aroused ~ anxious | group,
data=data,
xlab="Aroused",
ylab="Anxious",
main="Arousal and anxiety ratings",
xlim=c(0.5, 9.5),
2010 Feb 12
1
scatterplot in Package CAR
Hi Folks,
Please,
when I ask the option reg.line at the scatterplot in package car, the OLS models includes a constant?
If not how can I do it sing the following code:
scatterplot(lfirms ~ lscale,
data=dataset,
reg.line=lm, smooth=FALSE, labels=FALSE,
span=0.5,
xlab="Relative Plant Fixed Cost",
ylab="Relative Number of Firms",
pch=c(18),
2009 Jun 09
1
scatterplot (car) legend modification
hi,
new to R and using the car package to do some scatterplots with ellipses
hoping to add the area and center points of each ellipse to the legend?
looking for some direction / ideas.... here is the script, the data is
where
golf shots end up by club.
x (dispersion), y (distance), group (Club)
thanks, sam
## usage: Rscript shotScatter.R infile outfile level1 level2 minX maxX
minY maxY
2010 Jul 07
3
Boxplots over a Scatterplot
Hello-
I'm new to R, coding and stats. (Oh no.)
Anyway, I have about 12000 data points in a data.frame (dealing with
dimensions and geological stage information for fossil protists) and have
plotted them in a basic scatter plot. I also added a boxplot to overlay
these points. Each worked fine independently, but when I attempt to
superimpose them with add=true, I get a different scale for
2010 Oct 15
1
multiple car scatterplots on one graph
R version 2.11.1 on WinXP
How do I get 3 scatterplots with marginal boxplots (from the
car package) onto a single plot?
I have a data frame called bank
> dim(bank)
[1] 46 5
head(bank)
x1 x2 x3 x4 pop
1 -0.45 -0.41 1.09 0.45 0
2 -0.56 -0.31 1.51 0.16 0
3 0.06 0.02 1.01 0.40 0
4 -0.07 -0.09 1.45 0.26 0
5 -0.10 -0.09 1.56 0.67 0
6 -0.14 -0.07 0.71 0.28 0
2010 Feb 23
2
scatterplots in car package
Hi, using scatterplot in 'car' package.
There are 4 plots to be pictured together (ignore data used):
library(car)
par(mfrow=c(3,1))
ts.plot(rnorm(100))
ts.plot(rnorm(100))
scatterplot(rnorm(100),rnorm(100),boxplot="",smooth=T) # scatter with
non-parametric fit
problem is that the last one comes 'always' separate.
Is there any way to solve it?? of course can use
2009 Nov 29
1
How to force regression coeffs for some values in a categorical variable
Hi,
I am a new R user. I am using it develop regression models with categorical
variables.
Is there a way to force some regression coefficients to be zero for some of
the values in a categorical variable (with 12 factor levels)?
I am recoding the values to the default value (1st in the order of dummy's).
But I am not sure if this is the correct approach if I want to force
coefficients to be
2009 Dec 04
1
categorical vs numerical
What ways are there to plot categorical vs numerical data in R.
I have two columns: one with categorical data in 5 categories a,b,c,d,e, and
a numerical column with integers between 1 and 100.
I have used a boxplot with a,b,c,d,e on the x-axis and an increasing
numerical scale on the y-axis. This look fine but im looking for other ways
to present the data.
What other ways can i do this???
--
2009 Apr 26
4
Scatterplot of two groups side-by-side?
Dear all
I'm realy new to R, so I hope you can help me, as I didn't find any solution in the common books.
Since some days I'm trying to create the following plot: A scatterplott showning two different groups side-by-side with according regression lines. Both datasets only have the same five factors, so the scatters will form a kind of column at each factor. When I use
2012 Sep 05
2
Recoding categorical gender variable into numeric factors
I currently have a data set in which gender is inputed as "Male" and "Female"
, and I'm trying to convert this into "1" and "0".
I found a website which reccomended using two commands:
data$scode[data$sex=="M"] <- "1"
data$scode[data$sex=="F"] <- "2"
to convert to numbers, and:
data$scode <-
2008 Oct 15
1
Parameter estimates from an ANCOVA
Hi all,
This is probably going to come off as unnecessary (and show my ignorance)
but I am trying to understand the parameter estimates I am getting from R
when doing an ANCOVA. Basically, I am accustomed to the estimate for the
categorical variable being equivalent to the respective cell means minus the
grand mean. I know is the case in JMP - all other estimates from these data
match the
2009 Feb 19
1
modifying legend in scatterplot matrix R
Hello R users,
I have some troubles to modify the "per default" legend in the
scatterplot.matrix using the car package. Here is my code:
--------------------------------------------------------------------
scatterplot.matrix(~ a + b + c,
groups=treatment,
by.groups=F,
data=newfile3,
smooth=T,
pch=c(16,4),
cex=1.3,
2008 Mar 12
4
hello! i need help for a specific graphic issue
hello, ladyes and gentlemans.
check this:
means<-c(4,6,8)
stand.error<-c(0.1,0.3,0.5)
now i've strongly tryed to scatterplot the
means(y-axis),by showing their sd with the
arrow(..,code=3,angle=90) function.
The problem is that my x-axis has categorical values
(say, factor(x)), and the arrows() can't recognize
them as right coordinates.
?????
thank you all in advance
B.F. insubria
2012 Oct 23
1
scatterplot with wrong line offset
Hi All,
I'm trying to do a Scatterplot (package: car), and add a line (just for
reference).
There is my code:
#------------------------------------Code---------------------------------------------------
library("car")
library("calibrate")
G_T<-c("car","bike","boat")
ave<-c(80,10,45)
perf<-c(100,80,75)
df2<-data.frame(G_T,ave,perf)
2012 May 19
3
Q - scatterplot, plot function & trellis linear regressions???
Hi R-listers,
Q1) What is the difference between the scatterplot and plot function?
Q2) I am able to make a graph with the scatterplot function:
scatterplot(DevelopIndex ~ Veg,
+ data = Turtle,
+ xlab = "Vegetation border (m)",
+ ylab = "Embryonic development index")
And have been successful. But I do not know if the lines are for: