Posts Tagged ‘ r-project ’

Type I error rates in two-sample t-test by simulation

January 28, 2018
By

What do you do when analyzing data is fun, but you don't have any new data? You make it up.

This simulation tests the type I error rates of two-sample t-test in R and SAS. It demonstrates efficient methods for simulation, and it reminders the reader not to take the result of any single...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on Type I error rates in two-sample t-test by simulation

Fibonacci sequence in R and SAS

December 5, 2014
By

Because the Fibonacci sequence is simply defined by recursion, it makes for an elegant programming exercise. Here is one way to do it in SAS, and another way to do it in R. I've also included unit testing code to check that it works.

Fibonacci sequence in SAS using a recursive macro:


%macro fib(n);
%if...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on Fibonacci sequence in R and SAS

Type I error rates in test of normality by simulation

February 26, 2014
By
Type I error rates in test of normality by simulation

This simulation tests the type I error rates of the Shapiro-Wilk test of normality in R and SAS.

First, we run a simulation in R. Notice the simulation is vectorized: there are no "for" loops that clutter the code and slow the simulation.


# type I error
alpha <- 0.05

#...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Type I error rates in test of normality by simulation

Calculate RMSE and MAE in R and SAS

July 12, 2013
By

Here is code to calculate RMSE and MAE in R and SAS. RMSE (root mean squared error), also called RMSD (root mean squared deviation), and MAE (mean absolute error) are both used to evaluate models. MAE gives equal weight to all errors, while RMSE gives...
Read more »

Tags: , , , , , ,
Posted in SAS | Comments Off on Calculate RMSE and MAE in R and SAS

Forecast Update: Will 2014 be the Beginning of the End for SAS and SPSS?

May 14, 2013
By

I recently updated my plots of the data analysis tools used in academia in my ongoing article, The Popularity of Data Analysis Software. I repeat those here and update my previous forecast of data analysis software usage. Learning to use … Continue reading
Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on Forecast Update: Will 2014 be the Beginning of the End for SAS and SPSS?

Will 2015 be the Beginning of the End for SAS and SPSS?

May 9, 2012
By

Learning to use a data analysis tool well takes significant effort, so people tend to continue using the tool they learned in college for much of their careers. As a result, the software used by professors and their students is … Continue reading
Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on Will 2015 be the Beginning of the End for SAS and SPSS?

Train neural network in R, predict in SAS

November 11, 2011
By

This R code fits an artificial neural network in R and generates Base SAS code, so new records can be scored entirely in Base SAS. This is intended to be a simple, elegant, fast solution. You don’t need SAS Enterprise Miner, IML, or any other spe...
Read more »

Tags: , , , , , ,
Posted in SAS | Comments Off on Train neural network in R, predict in SAS

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.