Skip to content

Archive for

Pairach.com has now linked to R-Bloggers.com


Finally, in the light of the greater contribution, this website will be a part of one of the largest R websites, R-Bloggers.com after following this site for a while.

For those who are using R or interested in this great but free software, R-Bloggers.com is a must!

sem package in R: a sample of transaction cost measurement


A sneak peek of the result of a Structural Equation Model using sem package in R.

I will present in the R User Conference in Warwick next week, is reveal first here.

The following are the codes of ‘sem’ package I used in the paper.

You may also view the code of other packages to run SEM models as well.

##-------------------------------------------------##
##    Measuring Transaction Cost in Supply Chains  ##
##               Pairach Piboonrungroj             ##
##         R useR conference August 2011           ##
##-------------------------------------------------##
install.packages("sem")
library(sem)

# 1. Load data
hoteldata <- read.csv("http://dl.dropbox.com/u/46344142/useR2011/cleandata.csv")

#Input covariance matrix
data.tc.1 <- cor(hoteldata)

# Have a look at the top of the data
# to check it we import the right one
head(data.tc.1)

#Create an object contains correlation matrix of the data for fitting the model in the next step
hotel.cor <- cor(hoteldata)
#  path parameter  start-value
model.TC.1 <- specify.model()
	TC   -> TC1,    gamma1,  NA # measurement item
	TC   -> TC2,    gamma2,  NA
 	TC   -> TC3,    gamma3,  NA
 	TC   -> TC6,    gamma6,  NA
 	TC   -> TC7,    gamma7,  NA
 	TC   -> TC11,   gamma11, NA
 	TC   -> TC13,   gamma13, NA
 	TC1  <-> TC1,	e1,      NA # measurement error
 	TC2  <-> TC2,	e2,      NA
 	TC3  <-> TC3,	e3,      NA
 	TC6  <-> TC6,	e6,      NA
 	TC7  <-> TC7,	e7,      NA
 	TC11 <-> TC11,	e11,     NA
 	TC13 <-> TC13,	e13,     NA
 	TC   <-> TC,    NA,      1

model.TC.1

sem.TC.1 <- sem(model.TC.1, data.tc.1, 53)
# print result (fit indices, parameters, hypothesis tests)
summary(sem.TC.1)
# standardised coefficients (loadings)
std.coef(sem.TC.1)

บรรยายพิเศษเนื่องในโอกาสครบรอบ ๔๘ ปี วันสถาปนาคณะเศรษฐศาสตร์ มหาวิทยาลัยเชียงใหม่


ขอเชิญร่วมฟังบรรยายพิเศษเนื่องในโอกาสครบรอบ ๔๘ ปี วันสถาปนา
คณะเศรษฐศาสตร์ มหาวิทยาลัยเชียงใหม่
**พร้อมรับของที่ระลึกสำหรับผู้ลงทะเบียนเข้าฟัง!!

หน่วยบริการวิชาการ ขอเชิญท่านร่วมฟังบรรยายพิเศษเนื่องในโอกาสครบรอบ ๔๘ ปี วันสถาปนาคณะเศรษฐศาสตร์ มหาวิทยาลัยเชียงใหม่

วันอาทิตย์ที่ ๒๘ สิงหาคม ๒๕๕๔

ณ ห้องประชุมใหญ่ คณะเศรษฐศาสตร์ มหาวิทยาลัยเชียงใหม่

กำหนดการ

—————————————————————–

เวลา ๑๒.๓๐ น.
เริ่มลงทะเบียน พร้อมรับ Handy drive ที่ระลึกงานครบรอบ ๔๘ ปี วันสถาปนาคณะเศรษฐศาสตร์ (ของมีจำนวนจำกัดสำหรับผู้ลงทะเบียนเข้าฟังเท่านั้น!)

เวลา ๑๓.๐๐ น.
พิธีเปิดการบรรยายทางวิชาการ โดยคณบดีคณะเศรษฐศาสตร์ ดร.พิสิฐ ลี้อาธรรม

เวลา ๑๓.๓๐ น.
การบรรยายพิเศษ หัวข้อ “อนาคตของมาบตาพุด” โดย ดร. ศิริ จิระพงษ์พันธ์ ผู้อำนวยการสถาบันปิโตรเลียมแห่งประเทศไทย

 เวลา ๑๔.๓๐ น. 
การบรรยายพิเศษ หัวข้อ “การปรับเปลี่ยนองค์การธุรกิจ” โดย คุณบวร วงศ์สินอุดม ประธานเจ้าหน้าที่บริหารและกรรมการผู้จัดการใหญ่ บริษัท ปตท. อะโรเมติกส์ และการกลั่น จำกัด (มหาชน)

เวลา ๑๕.๓๐ น.
การเสวนาทางวิชาการหัวข้อ “การปรับเปลี่ยนของธนาคารไทย” โดย ดร. พิสิฐ ลี้อาธรรม คณบดีคณะเศรษฐศาสตร์, คุณสรสิทธิ์ สุนทรเกศ รองผู้ว่าการสายกำกับสถาบันการเงิน ธนาคารแห่งประเทศไทย และคุณอุดมศักดิ์ เล่ห์หลีกภัย

 เวลา ๑๖.๓๐ น.
พิธีปิด โดย ดร. พิสิฐ ลี้อาธรรม คณบดีคณะเศรษฐศาสตร์

สำรองที่นั่งและสอบถามรายละเอียดเพิ่มเติมได้ที่
หน่วยบริการวิชาการ 0-5394-2235

(ร่าง) แบบสำรวจสภาพความพึงพอใจของนักเรียนไทย ต่อการศึกษา และการใช้ชีวิตในสหราชอาณาจักร ปี พ.ศ. 2553-2554


Version 0.3 ยินดีรับฟังข้อเสนอแนะครับ

Update สถานการณ์ความไม่สงบในสหราชอาณาจักร (อังกฤษ สก๊อตแลนด์ เวลส์ ไอร์แลนด์ เหนือ) | UK Riots 2011


 UPDATE:

  • Cardiff: An “isolated” and “minor” incidents of disorder found at Cardiff Bay (10 Aug 11). But no significant loss. The Guardian
  • สถานการณ์ใน London เมื่อคืนที่ผ่านมา (9 สิงหาคม) สงบมากขึ้นเนื่องจากกำลังตำรวจกว่า 16,000 นาย เช้าวันนี้ประชาชนมีการรวมตัวออกมาทำความสะอาดท้องถนนและพื้นที่ที่ได้รับความเสียหาย BBCVolunteers in Clapham Junction, London

Source: The Guardian

Initial London riots / UK riots from Google Map (Thanks to p’Gank Weerapong Prasongchean)

Interactive Timeline & Map by Channel4 – Thanks to n’Benz

Interaction Map by Guardian   (Thanks p’Gank Weerapong Prasongchean)

DANGEROUS AREAs

1. London = Tottenham, Tottenham Hale, Wood Green, Chingford Mout, Enfield, Islington, Oxford Circus, Ponders End, Walthamstow Ealing, Camden/Chalk Farm, Peckham, Stratford, East Ham, Benthnal Green, Lewisham, Bromley

tottenham blazeTottenham (Guardian)

French riot police in Paris, November 2005

2. Birmingham

The Pandora jewellers shop in Birmingham city centre is attacked

3. LiverpoolLiverpool riot

4. BristolBristol riot

5. Glasgow
มีวัยรุ่นถูกคุมตัวเนื่องในข้อหาโพสข้อความปลุกระดมใน Facebook (BBC)

6. Oxford: London Road, Headington
McDonald's restaurant in London Road, Headington after arson attack

7. Nottingham

A youth is arrested for a public order offense by British police officers following skirmishes with police in Camden

8. Leeds
More info

9. Manchester
ตอนนี้ city centre ของแมนเชสเตอร์ มีกลุ่มเด็กเริ่มทำลายร้านค้า แต่ตำรวจกำลังสลายผู้ก่อจลาจลอย​ู่” จากพี่หนวด Manchester. 9 Aug 2011, 18:49

ที่มา: BBC, The Guardian, The Times