[R] scatterplot in Package CAR

John Fox jfox at mcmaster.ca
Fri Feb 12 03:47:55 CET 2010


Dear Ricardo,

Yes, the least-squares line fit when reg.line=TRUE (the default) includes a
constant.

Regards,
 John

--------------------------------
John Fox
Senator William McMaster 
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox

> -----Original Message-----
> From: Ricardo Gonçalves Silva [mailto:ricardogs at terra.com.br]
> Sent: February-11-10 9:26 PM
> To: R-Help; jfox at mcmaster.ca
> Subject: 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),
>     boxplots=FALSE,
>     main = "Relative Number of Firms x Relative Plant Fixed Cost",
>     pty='s',lty = "solid", las = 1, adj=0.5)
>     grid(nx = 10, ny = 10, col = "black", lty = "dotted",lwd = par("lwd"),
> equilogs = TRUE)
> 
> 
> A variable, ctt, of ones is in the dataset.
> Thanks in advance,
> 
> Rick



More information about the R-help mailing list