
R
qq1323362960
这个作者很懒,什么都没留下…
展开
-
分类数据的可视化(mosaic)
谢益辉的《现代统计图形》的电子版在网络上已经受到欢迎并流行开来,国内统计图形方面的书并不多见,这本书算是填补一点空白。我对书中马赛克图形的颇感兴趣,闲来无事便也翻阅了一些文献,发现Michael Friendly做了大量的研究工作。下面是主要基于R和SAS软件的研究简记。1.“Advances in Visualizing Categorical Data Using the vcd,gnm原创 2011-11-29 22:06:02 · 3848 阅读 · 1 评论 -
R Graph cookbook代码(chapter 1-4)
#CHAPTER 1#Recipe 1. Creating scatter plotsplot(cars$dist~cars$speed)plot(cars$dist~cars$speed, # y~xmain="Relationship between car distance & speed", #Plot Titlexlab="Speed (miles per hour)转载 2011-11-23 22:17:33 · 3066 阅读 · 1 评论 -
R Graph Cookbook 代码(chapter5-10)
#CHAPTER 5#Recipe 1. Creating Bar charts with more than one factor variableinstall.packages("RColorBrewer") #if not already installedlibrary(RColorBrewer) citysales<-read.csv("citysales.c转载 2011-11-23 22:25:11 · 2388 阅读 · 0 评论 -
Creditmetrics模型
维基百科里面有详细的介绍:http://wiki.mbalib.com/wiki/Creditmetrics模型。一、概况起来,其中主要的思想有:1.转换矩阵(Transition Matrix):它是一个信用等级的信用工具转移到另一个信用等级的概率矩阵;2.信用工具的在险价值VaR:信用工具的价值取决于其信用等级;3.信用计量模型的一个基本特点就是从资产组合并不是单一资产的角度来原创 2012-11-09 14:14:30 · 9232 阅读 · 0 评论 -
一个Statistical Computing主页
#Plotting in preparation for the ImpSamp function. Suggests ideal g* would be an unusual distributionx=seq(-3,3,by=.1)gx=sqrt(abs(x/(1-x)))*dt(x,5)plot(x,gx,type="l")lines(x,dt(x,5),lty=2,col原创 2011-12-06 22:07:01 · 804 阅读 · 0 评论 -
Gibbs sampling & R
维基百科的定义:http://en.wikipedia.org/wiki/Gibbs_sampling我们假设一个随机的二元变量(x,y),然后计算其中一个或全部的边缘分布p(x),p(y)。这种抽样思想是考虑条件分布p(xly),p(ylx),比通过联合密度p(xy)来计算求解简单,例如首先,我们要进行初始化y0,然后通过条件概率P(xIy=y0)计算得出x0,然后再基于x0的条原创 2011-12-13 21:28:19 · 4916 阅读 · 1 评论 -
R Graphics Basics: Plot area, mar (margins),oma (outer margin area),mfrow, mfcol (multiple figures)
http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htmPurposeThis technote explains how to use certain R graphics parameters that deal with margins, namelymar and oma. T转载 2012-03-02 16:20:37 · 1930 阅读 · 0 评论 -
R code to the plot the bias, variance, and MSE for the beta/binomial model
http://www4.stat.ncsu.edu/~reich/st740/MSEplots.R MSEplot<-function(n,a,b,plot.type="mse"){ #This function assumes the model y~binom(n,p); p ~ beta(a,b) #and compares the bias, variances, an转载 2012-02-28 13:56:02 · 1594 阅读 · 0 评论 -
离散先验分布
在《Bayesian computation with r》第21页,作者描绘了一离散分布图形,R代码如下:p = seq(0.05, 0.95, by = 0.1)prior = c(1, 5.2, 8, 7.2, 4.6, 2.1, 0.7, 0.1, 0, 0)prior = prior/sum(prior)plot(p, prior, type = "h", ylab="P原创 2012-02-20 15:33:04 · 760 阅读 · 0 评论 -
用于贝叶斯统计的R包
http://cran.r-project.org/web/views/Bayesian.html ==========一般模型==================arm包: 包括使用lm,glm,mer,polr等对象进行贝叶斯推断的R函数BACCO: 随机函数的贝叶斯分析. 包含3个子包: emulator, calibrator, and approximator, 进行贝叶转载 2012-01-05 20:33:35 · 6473 阅读 · 0 评论 -
牛顿迭代例子Newton-Raphson Method
Aim: Find oˆ such thatProblem: Analytic solution of likelihood equations not always available. Example: Censored exponentially distributed observations Suppose that and that the censored time转载 2011-12-15 20:29:50 · 3777 阅读 · 0 评论 -
Generating Multivariate Normal Data by Using PROC IML & R
Generating Multivariate Normal Data by Using PROC IML : http://analytics.ncsu.edu/sesug/2006/CC15_06.PDF1.Generate the bivariate normal data/* Generate the bivariate normal data */data one;m原创 2011-12-16 21:51:47 · 1520 阅读 · 0 评论 -
R and MongoDB
R and MongoDBlibrary(RMongo)mg1 <- mongoDbConnect('test')print(dbShowCollections(mg1))query <- dbGetQuery(mg1, 'person', "{'age': 20}")data1 <- querysummary(data1)原创 2016-03-16 13:00:53 · 1876 阅读 · 0 评论