Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Monday, 16 March 2015

Tips for Stata

                                                               

Tip 1: Steps for preparing data for Stata (panel format):

If you have data in this format:

Company______Accounts______2013______2014____2015
Petronas         Total Assets         1500           1700         2000
Petronas            EBIT                  750             850          1000

An, you need to transpose the data to make it look like this:

Wednesday, 7 January 2015

Tips for R



Here are some useful tips for R:
  • To import/export data into/from R:
  1. Install xlsx package: install.packages("xlsx")
  2. Turn on the library: library(xlsx)
  3. For example, there is excel workbook called 'mydata' and you want to upload a data from its worksheet called 'Data' : myfile = read.xlsx("mydata.xlsx", sheetName = "Data")
  4. To export data from R into excel, run: write.xlsx(mydata, "myfile.xlsx")
Reference