Skip to content

Econometrics with R for IS and Thesis [MFU MBA in LSCM]

useR! logo

You are lucky!

Econometrics seem hard and tough. But with R, econometrics analysis is easy and FREE!

There are 7 more reasons why we should use R for statistics and econometrics analysis.

For the special course on Econometric analysis with R for MBA dissertation at Mae Fah Luang University, please do this 3 things as follow.

1. Download R 

Home page of ""

Home page of “”

First please download the software from the official website

  • If you use Window PC, please use this link.
  • If you use Apple Mac, please use this link.
  • If you use Linux, please use this link.

2. Download R-Studio

Screenshot of R Studio (Windows PC)

Screenshot of R Studio (Windows PC)

The default R interface is not that good. There is a more optimised and user-friendly IDE for R called “R Studio”. R Studio is also free and available for Window, Linux and Mac users. It is my best IDE for R in various aspects. For students, R Studio is also a good one.

So please also download R Studio here (select RStudio desktop version)

3. Consult my online R-Manual and R related post here


Please have a look and play with the ASER manual before the class, see you!

Ex-post documents

  • Slides used in the lecture can be downloaded here here
    cover slide econ with R at MFU MBA LSCM
  • Codes used in the classed are as follow.
# codes used in the course "econometrics with R" at Mae Fah Luang University on 30th March 2013

# use R as a calculator

# start an analysis
data <- mtcars

# call variable names

# draw a histogram
hist(data$mpg, xlab="miles per gallon", main = "Histogram of MPG", col="blue")
hist(data$hp, xlab="miles per gallon", main = "Histogram of hp", col="red")

# transform hp by sqr / exp

# create new variable by sqrting hp
data$sqrt_hp <- sqrt(data$hp)

# call 2nd obs.



# descriptive analysis

# Mean testing
# pair sample t-test
t.test(data$mpg, data$cyl)
t.test(data$drat, data$wt)

# independent variable t-test
t.test(data$mpg ~ data$am)
# regression model 1
model1 <- lm(mpg ~ gear, data = data)

# regression model 2
model2 <- lm(mpg ~ gear + hp, data = data)

# test if model2 is better than model1 statistically
anova(model1, model2)
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: