Nice R Code Punning code better since 2013 RSS Blog Archives Guides Modules About Markov Chain Monte Carlo 10 JUNE 2013 This topic doesn’t have much to do with nicer code, but there is probably some overlap in interest. However, some of the topics th
As always a more colourful version of this post is available on rpubs. Even if LM are very simple models at the basis of many more complex ones, LM still have some assumptions that if not met would render any interpretation from the models plainly wr
Customizing graphics GraphicsLaTeXLattice (Treillis) plots In this chapter (it tends to be overly comprehensive: consider it as a reference and feel free to skip it), we consider all the configurable details in graphics: symbols, colours, annotations
y,X1,X2,X3 分别表示第 t 年各项税收收入(亿元),某国生产总值GDP(亿元),财政支出(亿元)和商品零售价格指数(%). (1) 建立线性模型: ① 自己编写函数: > library(openxlsx) > data = read.xlsx("22_data.xlsx",sheet = 1) > x = data[,-c(1,2)] > x = cbind(rep(1,17),x) > x_mat = as.matrix(x) > y
#----------------------------------------# # R in Action (2nd ed): Chapter 10 # # Power analysis # # requires packages pwr to be installed # # install.packages("pwr") # #----------------------------------------# par(ask=TRUE) library(pwr) # t te
#----------------------------------------# # R in Action (2nd ed): Chapter 10 # # Power analysis # # requires packages pwr to be installed # # install.packages("pwr") # #----------------------------------------# par(ask=TRUE) library(pwr) # t te