In the ‘plm’ package blog (2), we’ve gotten regression outputs for both fixed and random effect models. One common question after getting regression output is to figure out which model should be chosen using Hausman test. The fixed effect output is names as “grun.fe” and the random effect output is names as “grun.re”. The function […]
Tag: R
Introduction to R ‘plm’ package (2)
The first blog for “plm” package provides basic information about how to define panel data. This blog aims to introduce syntax for both fixed and random effects regression models. The dataset “Grunfeld” is a balanced panel of 10 observational units (firms) from 1935 to 1954, and we are going to use this dataset to run […]
Introduction to R ‘plm’ package (1)
This blog is an introduction to use ‘plm’ package for panel data analysis. Panel data means datasets with the same observations (respondents) and variables across different time units (such as year, month). And it’s common for researchers to have an unbalanced panel dataset in practice (for example, GDP data could be missing in different years […]
Introduction to R ‘survey’ package (4)
In the previous 3 blogs, I have introduced how to define survey data and do descriptive statistics (here are the links for R ‘survey’ package blog (1) (2) (3)). Today, I am going to introduce basic regression syntax in this package. svyglm() # generalized linear regression using survey data Let’s use the two-stage cluster sample […]
Introduction to R 'survey' package (3)
After defining your survey dataset (please refer back to ‘survey’ package blog (1) & (2) ), you could use the functions below to describe your survey data and estimate population. Let’s still use apiclus1 data. After svydesign() function, you have a designed survey dataset, dclus1, which we designed in the last week. In this dataset, […]
Introduction to R package ‘survey’ (2)
Here are more types of survey data except the case (simple random sample) we introduced before. The ‘survey’ package contains several sample datasets from the California Academic Performance Index. After installing and loading the ‘survey’ package, you could import these data samples using command: data(api). And you will see 5 datasets are loaded in R, […]
Introduction to R package ‘survey’ (1)
If you are using R for survey data analysis, you might find the ‘survey’ package is useful for you. I assume that you have already known how to read/import data in R, so this blog will skip the steps of data cleaning and loading. After importing survey data in R, here are some functions you […]
Using R with ArcGIS
With a successful collaboration between DSSC and ESRI, a hands-on workshop on ESRI R plugin was presented by Shaun Walbridge, a senior developer from ESRI, on Wednesday, April 20. Shaun provided an in-depth tutorial on how to use R in ESRI, and answered questions from students and librarians. Our audiences were from a broad background: […]