Everything is an ().mode().attributes().names().
library()看都安装了什么包,library(help=AER)看AER包里都有什么函数和数据集。
example(‘plot’)
( - ) == 1
[1] FALSE
( - , 1)
[1] TRUE
identical(-,1)
[1] FALSE
5. If points are plotted, pch can modify the plotting character and cex its character extension. If lines are plotted, lty and lwd specify the line type and width, respectively.
6. pdf("", height = 5, width = 6)
plot(1:20, pch = 1:20, col = 1:20, cex = 2)
()
?jpeg
7. curve(dnorm, from = -5, to = 5, col = "slategray", lwd = 3,
main = "Density of the standard normal distribution")
text(-5, , expression(f(x) == frac(1, sigma ~~
sqrt(2*pi)) ~~ e^{-frac((x - mu)^2, 2*sigma^2)}), adj = 0)
8. Simple Linear Regression
anova(); predict(); deviance() ;RSS; vcov(); logLok(); AIC();
(1) Analysis of variance
anova(jour_lm)
(2) Point and interval estimates
coef(jour_lm); confint(jour_lm, level = )
(3) Prediction
predict(jour_lm, newdata = (citeprice = ), interval = "prediction")
(4) Plotting “lm” objects
plot(jour_lm)默认4个诊断图
(5)Testing a linear hypothesis
需要car包。
(jour_lm, "log(citeprice) = -")
(jour_lm, = c(0, 1), rhs = -)
9. Multiple Linear Regression
分类变量-虚拟变量-factor
I(); Insulate
(1) Comparison of models
anova(cps_noeth, cps_lm)
10. Linea
AER学习笔记 来自淘豆网m.daumloan.com转载请标明出处.