加载中…
个人简介
抱歉,该用户没有填写任何资料
新浪微博
个人资料
jingju
jingju
  • 博客等级:
  • 博客积分:0
  • 博客访问:203,732
  • 关注人气:274
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
分类
搜博主文章
访客
加载中…
评论
加载中…
博文
置顶: (2012-04-27 10:51)
标签:

sas心得

杂谈

分类: 统计分享

想说一说自己在学习和使用SAS时的经验,既有所得也有所失。和尽可能大的依靠自学的许多同仁很类似, 我可能走了许多弯路,尤其是比起那些具备更多信息的,得到更多指导的,更加年轻的聪明灵活的人。自己在SAS上的经验和年头或许比你的要多,也可能更加微不足道。但是分享的本身,即使是微末的一点点,也是乐趣。不是吗?

一直到现在---差不多快十年了吧,依然觉得自己做SAS还是挺辛苦的,几乎从来就没有真正感觉到很多人所谓的举重就轻。如果我说自己学了三年的SAS还不成的话,有人会纳闷儿。纳闷SAS不就是几个月的速成软件,一件简单不过的数据分析工具吗?对一些人来说,这无疑是正确的。可是如果承认自己的智商并非天赋异秉而高人一等的话

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

有感

杂谈

分类: 芜杂

你见到的也许不是哲学家而是一个流浪汉。但这是两类最相似之人----每次我走过大桥之下,走过在寒冷之中拥衾而眠的人的身边的时候,我都这么想。

1. 初识

人生的路往往越走越窄。在越来越窄的路上,你碰到的也许尽是失意落魄之人。阿卜杜拉.阿达斯便是其中之一。十五年之前我刚刚落地加拿大。新移民可以做的事情并不是很多。第一站往往是参加由政府出资开办的帮助找工作的公开课学习班。班上的学生很多,天南地北五湖四海形态各异杂色人等。黑板前站着好脾气的女教授,也是移民,来自菲律宾,挂博士头衔。讲起话来眉飞色舞很有感染力。人各有志,她的目标是什么呢?一个全职教授,不再为下一期工作的着落而忧愁而漂泊。在她第一次点名让学生自报工作意向的时候,课堂上群情涌动人声鼎沸。程序员程序员工程师程序员⋯哲学家。此言一出,满堂哄笑。阿卜杜拉.阿达斯的声音温柔而坚定,他就是那个来自孟加拉国的哲学家。哲学家这样的家门,如同给忧心忡忡的诸位同学在无聊之中吹来的拂面春风。因此班上差不多每一个人都偏爱他,找他聊天和他亲近,虽然少有人知为什么会喜欢他。偏黑的肤色和有些杂乱的短髭当然都不是加分项,但是如果仔细观察,他

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

surfaceplotparm

contourplotparm

sgrender

integral

分类: 统计分享

Introduction

Program







阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

midpoint

3d

分类: 统计分享
Introduction
Here an example was given to illustrate how to estimate the double integral of a bivariate normal joint density function by Midpoint rule in both SAS and R program. Basically, what I am doing is to evaluate the function value of each (x, y) point in its space and sum of all the values (the surface by density function defined by xy space). The precision is maybe depending on how many points being used to evaluate the function.
Program
> # Numerical intergration
> # Double integral on joint density function
> midpoint <- 
+   function(f, a, b, n = 100) {
+     h <- (b - a) / n
+     (b - a) * mean(sapply(seq(a + h/2, b - h/2, len = n), f))
+   }
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

r

sas

likelihood

function

lexical-scope

分类: 统计分享

Introduction

Both SAS and R are used to create log-Likelihood function for Poisson distribution. In R we are able to write a function, called a creator, that we pass data to and get back a likelihood function. Sometimes we call it returned function. In SAS, it works differently. A data step is for the computation.

 

Program & Conclusion

 

 

Figure 1: SAS code for likelihood function calculation and plot.



Figure 2: Plot of Likelihood Function.

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
分类: 统计分享

Program

 

%macro Sum_fun(L);

     %if

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

somer's

d

ordinal

coarse-classifying

分类: 统计分享

Somer's D is to test the association between two ordinal variables. In SAS, proc freq gives this statistic. You can calculate it using either formula or simulation. Here assumed a 2 X 3 contingency table.

 

data have;

input x :$12.

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

anova

ancova

factor

covariate

分类: 统计分享

Definitions:

1.      A covariate is a variable which, although it may have had an influence on the dependent variable in the experiment, is uncorrelated with the treatment factor. Typically, the covariate as a continuous variable is introduced into the model of an analysis-of-variance experiment.

2.      The analysis of covariance (ANCOVA) is a regression technique which corrects for the influence of one or more covariates upon the depe

阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

repeated-measures

spaghetti-plot

lasagna-plot

分类: 统计分享

Being reviewed in a tabular from, the compared data can be filled with colors according to different numbers in the cells.  Moreover, the pattern in the Lasagna plot should be consistent with the one observed in the table per below. The legend details that: From Blue 1 is normal, low value, to red 5 is in a high diabetic Hb level, high value, black 6 is missing value.


Table 3a. Control Arm, 20 Subjects.
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
标签:

spaghetti

lasagna

multipe-line

repeated-measures

分类: 统计分享
Introduction
I simulated data measuring glycated hemoglobin (HbA1c) at baseline (mon0) and 6, 12, 18, and 24 months, shown as the table below, for 20 subjects in a a randomized controlled trial using a treatment and a placebo (treatment=0) for the control arm. This data was based on a true data but mixed with some random noises.
Sample dataset:
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
(2015-11-23 12:46)
标签:

monty-hall

simulation

分类: 统计分享

Introduction​​

Program & Result​

Figure 1.1 Simulate data
阅读  ┆ 评论  ┆ 转载 ┆ 收藏 
好友
加载中…
  

新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

新浪公司 版权所有