Displaying 3 results from an estimated 3 matches for "rgnpc".
2008 Feb 09
2
Reading data from a dataframe
...by entering
pol572a1<- read.dta("C:\\alex\\Graduate Coursework\\Pol 572\\pol572a1.dta")
So now I can do a few things with the data, but I am only able to do so by
entering
with(pol572a1,
before typing another command. So I enter the following for a scatter plot:
with(pol572a1, plot(rgnpc, incmean))
When I run a simple linear regression, I enter the following: with(pol572a1,
lm(incmean~rgnpc))
But when try to get a fitted line, I enter the following: with(pol572a1, lm(
share.gnp)<-lm(incmean~rgnpc)) But I get the following error message: Error
in lm(share.gnp) <- lm(incmean...
2008 Feb 09
1
R is not reading(?) my data properly
...by entering
pol572a1<- read.dta("C:\\alex\\Graduate Coursework\\Pol 572\\pol572a1.dta")
So now I can do a few things with the data, but I am only able to do so by
entering
with(pol572a1,
before typing another command. So I enter the following for a scatter plot:
with(pol572a1, plot(rgnpc, incmean))
When I run a simple linear regression, I enter the following: with(pol572a1,
lm(incmean~rgnpc))
But when try to get a fitted line, I enter the following: with(pol572a1, lm(
share.gnp)<-lm(incmean~rgnpc)) But I get the following error message: Error
in lm(share.gnp) <- lm(incmean...
2008 Feb 09
4
Question
I have recently started learning R. I converted a Stata datafile into an R
image file, but I am unable to do anything with the data. For example, I am
unable to calculate the mean of any variable or create a scatterplot of some
of the data. I always get a message saying, "Error in plot(rgnpc, incmean)
: object "rgnpc" not found" when I attempt to make a simple plot of the two
noted variables. I get the following when I attempt to get the mean of a
particular variable: "Error in mean(incmean) : object "incmean" not found."
What should I do?
Cordiall...