<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Best Practices &#8211; Aptech</title>
	<atom:link href="https://www.aptech.com/blog/category/best-practices/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aptech.com</link>
	<description>GAUSS Software - Fastest Platform for Data Analytics</description>
	<lastBuildDate>Mon, 27 Jan 2025 20:14:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Introducing the GAUSS Data Management Guide</title>
		<link>https://www.aptech.com/blog/introducing-the-gauss-data-management-guide/</link>
					<comments>https://www.aptech.com/blog/introducing-the-gauss-data-management-guide/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Tue, 20 Feb 2024 18:50:08 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11584443</guid>

					<description><![CDATA[If you've worked with real-world data, you know that data cleaning and management can eat up your time. Efficiently tackling tedious data cleaning, organization, and management tasks can have a huge impact on productivity. 
<br>
We created the <b>GAUSS Data Management Guide</b> with that exact goal in mind. It's aimed to help you save time and make the most of your data.
<br>
Today's blog looks at what the GAUSS Data Management Guide offers and how to best use the guide.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>If you've worked with real-world data, you know that data cleaning and management can eat up your time. Efficiently tackling tedious data cleaning, organization, and management tasks can have a huge impact on productivity. </p>
<p>We created the <strong>GAUSS Data Management Guide</strong> with that exact goal in mind. It's aimed to help you save time and make the most of your data.</p>
<p>Today's blog looks at what the <strong>GAUSS Data Management Guide</strong> offers and how to best use the guide.</p>
<h2 id="what-is-the-gauss-data-management-guide">What is the GAUSS Data Management Guide?</h2>
<p>The <strong><a href="https://docs.aptech.com/gauss/data-management.html" target="_blank" rel="noopener">GAUSS Data Management Guide</a></strong> is a comprehensive reference tool for accomplishing data-related tasks in GAUSS. It provides a detailed roadmap for working with data in GAUSS, from basic data import and manipulation to advanced data cleaning and visualization. </p>
<p>The guide is intentionally designed for all levels of GAUSS users with:</p>
<ul>
<li>Extensive coverage.</li>
<li>Step-by-step instructions.</li>
<li>Annotated examples. </li>
</ul>
<h2 id="what-does-the-gauss-data-management-guide-cover">What does the GAUSS Data Management Guide cover?</h2>
<p>The <strong>GAUSS Data Management Guide</strong> includes sections for:</p>
<ul>
<li><a href="https://docs.aptech.com/gauss/data-management/interactive-import.html" target="_blank" rel="noopener">Interactive Data Import</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/programmatic-import.html" target="_blank" rel="noopener">Programmatic Data Import</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/programmatic-export.html" target="_blank" rel="noopener">Programmatic Export</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/data-cleaning.html" target="_blank" rel="noopener">Data Cleaning</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/data-exploration.html" target="_blank" rel="noopener">Data Exploration</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/data-sampling.html" target="_blank" rel="noopener">Data Sampling</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/data-smoothing.html" target="_blank" rel="noopener">Data Smoothing</a></li>
<li><a href="https://docs.aptech.com/gauss/data-management/data-transformations.html" target="_blank" rel="noopener">Data Transformations</a></li>
</ul>
<h2 id="how-should-i-use-the-gauss-data-management-guide">How should I use the <strong>GAUSS Data Management Guide</strong>?</h2>
<ul>
<li>
<p>Use page outlines, located on the right-hand side of each page, to identify and navigate to specific tasks.
<a href="https://www.aptech.com/wp-content/uploads/2024/02/page-outline-2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2024/02/page-outline-2.jpg" alt="" width="145" height="292" class="aligncenter size-full wp-image-11584458" /></a></p>
</li>
<li>
<p>Copy the examples in the guide and paste into GAUSS program files to use as templates.
<a href="https://www.aptech.com/wp-content/uploads/2024/02/example-template2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2024/02/example-template2.jpg" alt="" width="525" height="254" class="aligncenter size-full wp-image-11584459" /></a></p>
</li>
<li>Use the links to complete function reference pages to find additional support.
<a href="https://www.aptech.com/wp-content/uploads/2024/02/command-reference2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2024/02/command-reference2.jpg" alt="" width="422" height="316" class="aligncenter size-full wp-image-11584460" /></a></li>
</ul>
<h3 id="conclusion">Conclusion</h3>
<p>The <strong>GAUSS Data Management Guide</strong> provides practical examples, detailed instructions, and comprehensive coverage that can help work productively and efficiently with your data.</p>
<h3 id="further-reading">Further Reading</h3>
<ol>
<li><a href="https://www.aptech.com/blog/gauss-basics-interactive-commands/" target="_blank" rel="noopener">GAUSS Basics: Interactive commands</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/" target="_blank" rel="noopener">GAUSS Basics 3: Introduction to matrices</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-4-matrix-operations/" target="_blank" rel="noopener">GAUSS Basics 4: Matrix operations</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-5-element-by-element-conformability/" target="_blank" rel="noopener">GAUSS Basics 5: Element-by-element conformability</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-6-logical-and-relational-operators/" target="_blank" rel="noopener">GAUSS Basics 6: Logical and relational operators</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-7-conditional-statements/" target="_blank" rel="noopener">GAUSS Basics 7: Conditional statements</a></li>
<li><a href="https://www.aptech.com/blog/basics-of-gauss-procedures/" target="_blank" rel="noopener">Basics of GAUSS Procedures</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0025-undefined-symbol/" target="_blank" rel="noopener">Understanding Errors | G0025 : Undefined symbol</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0064-operand-missing/" target="_blank" rel="noopener">Understanding Errors: G0064 Operand Missing</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0058-index-out-of-range/" target="_blank" rel="noopener">Understanding Errors: G0058 Index out-of-Range</a></li>
</ol>


]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/introducing-the-gauss-data-management-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Importing FRED Data to GAUSS</title>
		<link>https://www.aptech.com/blog/importing-fred-data-to-gauss/</link>
					<comments>https://www.aptech.com/blog/importing-fred-data-to-gauss/#comments</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Fri, 16 Dec 2022 02:05:10 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Time Series]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11583079</guid>

					<description><![CDATA[The GAUSS FRED database integration, introduced in GAUSS 23, is a time-saving feature that allows you to import FRED data directly into GAUSS. This means you have thousands of datasets at your fingertips without ever leaving GAUSS. These tools also ensure that FRED data is imported directly into a GAUSS dataframe format, which can eliminate hours of data cleaning and the headaches that come with it. 

In today's blog, we will learn how to use the FRED import tools to:
<ul>
<li> Search for a FRED data series. </li>
<li> Import FRED data to GAUSS, including merging multiple series. </li>
<li>Use advanced import tools to perform data transformations. </li>
</ul>]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>The GAUSS <a href="https://fred.stlouisfed.org/" target="_blank" rel="noopener">FRED</a> database integration, introduced in <a href="https://www.aptech.com/blog/gauss23/" target="_blank" rel="noopener">GAUSS 23</a>, is a time-saving feature that allows you to import FRED data directly into GAUSS. This means you have thousands of datasets at your fingertips without ever leaving GAUSS. These tools also ensure that FRED data is imported directly into a GAUSS dataframe format, which can eliminate hours of data cleaning and the headaches that come with it. </p>
<p>In today's blog, we will learn how to use the FRED import tools to:</p>
<ul>
<li>Search for a FRED data series. </li>
<li>Import FRED data to GAUSS, including merging multiple series. </li>
<li>Use advanced import tools to perform data transformations. </li>
</ul>
<h2 id="getting-started">Getting Started</h2>
<h3 id="requesting-an-api-key">Requesting an API Key</h3>
<p>Prior to importing any data from FRED using GAUSS you will need to request an API key from FRED. This can be done on the <a href="https://fredaccount.stlouisfed.org/apikeys" target="_blank" rel="noopener">FRED API Request page</a>. To request an API key you will need:</p>
<ol>
<li>To create and/or login to a FRED account. </li>
<li>Provide a brief description of the program you intend to write. This can be simple such as, &quot;Using GAUSS to conduct economic research.&quot;</li>
</ol>
<h3 id="specifying-your-api-key-in-gauss">Specifying your API key in GAUSS</h3>
<p>You can set your API in GAUSS using any of the following methods:</p>
<ol>
<li>Set the API key directly at the top of your program:
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">FRED_API_KEY = "your_api_key"</code></pre></li>
<li>Set the environment variable <code>FRED_API_KEY</code> to your API key.</li>
<li>Edit your gauss.cfg and modify the <code>fred_api_key</code> value:
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">fred_api_key = your_api_key</code></pre></li>
</ol>
<h2 id="finding-your-fred-series">Finding Your FRED Series</h2>
<p>In order to download a series directly from FRED, we will need to know the series ID. However, this may not be something you know right offhand. Fortunately, we can use the <a href="https://docs.aptech.com/gauss/fred_search.html" target="_blank" rel="noopener"><code>fred_search</code></a> procedure to find the proper series ID.</p>
<p>The <code>fred_search</code> procedure requires one input, a string specifying the search text. As an example, let's search for all series related to <code>"producer price index"</code>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">fred_search("producer price index");</code></pre>
<p>This prints a search report to the command window. The first five rows are:</p>
<pre>frequency  frequency_short group_popularity              id     last_updated  observation_end observation_star       popularity     realtime_end   realtime_start seasonal_adjustm seasonal_adjustm            title            units      units_short
Monthly                 M        80.000000           PPIACO 2022-11-15 07:52       2022-10-01       1913-01-01        80.000000       2022-11-23       2022-11-23 Not Seasonally A              NSA Producer Price I   Index 1982=100   Index 1982=100
Monthly                 M        79.000000          WPU0911 2022-11-15 07:52       2022-10-01       1926-01-01        79.000000       2022-11-23       2022-11-23 Not Seasonally A              NSA Producer Price I   Index 1982=100   Index 1982=100
Monthly                 M        79.000000            PCEPI 2022-10-28 08:40       2022-09-01       1959-01-01        78.000000       2022-11-23       2022-11-23 Seasonally Adjus               SA Personal Consump   Index 2012=100   Index 2012=100
Monthly                 M        78.000000  PCU325211325211 2022-11-15 07:55       2022-10-01       1976-06-01        78.000000       2022-11-23       2022-11-23 Not Seasonally A              NSA Producer Price I Index Dec 1980=1 Index Dec 1980=1 </pre>
<p>We can see that the FRED search report provides a thorough summary of related series. In addition to the <code>id</code>, which we will need to import the data from FRED, some other useful fields include:</p>
<ul>
<li>Frequency.</li>
<li>Popularity.</li>
<li>Last updated.</li>
<li>Observation end.</li>
<li>Observation start.</li>
<li>Seasonal adjustment status.</li>
<li>Units. </li>
</ul>
<p>For our next steps, let's use the <code>PPIACO</code> series, which is the highest popularity series related to the search term <code>Producer Price Index</code>.</p>
<div class="alert alert-info" role="alert">Note: A number of advanced search options are available and can be read about in the official documentation for the <code>fred_search</code></div>
<h2 id="importing-data-from-fred">Importing Data From FRED</h2>
<h3 id="loading-a-single-series-from-fred">Loading A Single Series From FRED</h3>
<p>Next, we will import the <code>PPIACO</code> series from the FRED database into GAUSS using the <a href="https://docs.aptech.com/gauss/fred_load.html" target="_blank" rel="noopener"><code>fred_load</code></a> procedure. </p>
<p>The <code>fred_load</code> procedure requires one string input specifying the series ID to be loaded. To load the producer price data that we found with our FRED search, we will use the series ID <code>PPIACO</code>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Download all observations of 'PPIACO' into a GAUSS dataframe
PPI = fred_load("PPIACO");</code></pre>
<p>We can examine the first five rows of the <code>PPI</code> dataframe using the <code>head</code> procedure:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print the first 5 rows of 'PPI'
head(PPI);</code></pre>
<p>which reports</p>
<pre>            date           PPIACO
      1913-01-01        12.100000
      1913-02-01        12.000000
      1913-03-01        12.000000
      1913-04-01        12.000000
      1913-05-01        11.900000 </pre>
<p>We can also use the <code>tail</code> procedure to examine the last 5 rows of the <code>PPI</code> dataframe:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Print the last 5 rows of 'PPI'
tail(PPI);</code></pre>
<pre>            date           PPIACO
      2022-06-01        280.25100
      2022-07-01        272.27800
      2022-08-01        269.46500
      2022-09-01        268.69300
      2022-10-01        265.19300
</pre>
<p>This shows us that the <code>PPIACO</code> data ranges from January, 1913 to October, 2022. Which is consistent with the observation start and end date reported in our FRED search. </p>
<h3 id="loading-multiple-series-from-fred">Loading Multiple Series From FRED</h3>
<p>The <code>fred_load</code> procedure can also be used to load multiple series from FRED simultaneously. To do this, we use a GAUSS <a href="https://www.aptech.com/resources/tutorials/loading-variables-from-a-file/" target="_blank" rel="noopener">formula string syntax</a>, using <code>+</code> to add additional series IDs to our formula string.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load producer price
// and treasury bond data
macro_data = fred_load("PPIACO + T10Y2Y");

// Preview data
head(macro_data);</code></pre>
<p>The preview of our data shows that our two series have been imported together and automatically merged by date:</p>
<pre>            date           PPIACO           T10Y2Y
      1913-01-01        12.100000                .
      1913-02-01        12.000000                .
      1913-03-01        12.000000                .
      1913-04-01        12.000000                .
      1913-05-01        11.900000                . </pre>
<p>However, the preview doesn't necessarily give us reassurance that <code>T10Y2Y</code> was loaded properly because the values for the first five observations are all missing. Let's take a quick look at some summary statistics using <a href="https://docs.aptech.com/gauss/dstatmt.html" target="_blank" rel="noopener"><code>dstatmt</code></a>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Compute and print descriptive statistics
// for all variables in 'macro_data'
dstatmt(macro_data);</code></pre>
<p>This prints a summary table to our <strong>Command Window</strong>:</p>
<pre>-----------------------------------------------------------------------------
Variable    Mean   Std Dev  Variance     Minimum     Maximum   Valid  Missing
-----------------------------------------------------------------------------

date       -----     -----     -----  1913-01-01  2022-11-25   13048        0
PPIACO     74.57      66.3      4396        10.3       280.3    1318    11730
T10Y2Y    0.9146     0.903    0.8155       -2.41        2.91   11619     1429 </pre>
<p>From this, we can tell that both series have been imported properly. However, they have different ranges, with both series having a number of missing values. </p>
<h3 id="plotting-a-fred-series">Plotting a FRED Series</h3>
<p>It could be useful to view our FRED data before importing it into the GAUSS workspace. This can be done using the <code>fred_load</code> procedure with the <a href="https://docs.aptech.com/gauss/plotxy.html" target="_blank" rel="noopener"><code>plotXY</code></a>.</p>
<p>To do this, we need to remember the dataframe returned from <code>fred_load</code> will always contain:</p>
<ul>
<li>A date variable named, <code>date</code></li>
<li>A variable for every series loaded named with the <code>seriesID</code> </li>
</ul>
<p>As an example, let's consider viewing the FRED S&amp;P 500 series with the series ID <code>sp500</code>:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">plotXY(fred_load("sp500"), "sp500 ~ date");</code></pre>
<p><a href="https://www.aptech.com/wp-content/uploads/2022/12/g23-fred-sp500.jpg"><img src="https://www.aptech.com/wp-content/uploads/2022/12/g23-fred-sp500.jpg" alt="" width="600" height="500" class="alignnone size-full wp-image-11583235" /></a></p>
<h2 id="advanced-import-tools">Advanced Import Tools</h2>
<p>One of most useful features of the GAUSS FRED import tools is that they can perform a number of data cleaning tasks at the time of import. In this section, we will look at how to use the FRED import tools to:</p>
<ul>
<li>Filter dates. </li>
<li>Aggregate data.</li>
<li>Perform data transformations. </li>
</ul>
<h3 id="the-fred-parameter-list">The FRED Parameter List</h3>
<p>GAUSS FRED functions use a parameter list for passing advanced settings. This list is constructed using the <a href="https://docs.aptech.com/gauss/fred_set.html" target="_blank" rel="noopener"><code>fred_set</code></a> function. </p>
<p>The <code>fred_set</code> function creates a running list of parameters you want to pass to the FRED functions. It is specified by first listing a parameter name, then the associated parameter value. </p>
<p>For example:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create a FRED parameter list with
// 'frequency' set to 'q' (quarterly)
params_GDP = fred_set("frequency", "q");</code></pre>
<p>If we wish to add additional parameters values we can update an existing parameter list:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set 'aggregation_method' to end-of-period
// in the previously created parameter list 'params_GDP'
params_GDP = fred_set("aggregation_method", "eop", params_GDP);</code></pre>
<p>Or we can specify all parameters at the same time:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create a FRED parameter list with 2 settings at once.
params_GDP = fred_set("frequency", "q", "aggregation_method", "eop");</code></pre>
<p>There are a few things to note about the parameter list:</p>
<ol>
<li>The parameter specifications are case sensitive. </li>
<li>Order does not matter, with the exception that each parameter should be directly followed by its associated value. For example, we could have also specified </li>
</ol>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">params_GDP = fred_set("aggregation_method", "eop", "frequency", "q");</code></pre>
<p>Next, we'll look at how to use the parameter list for advanced FRED data import. </p>
<h3 id="filtering-dates">Filtering Dates</h3>
<p>The <code>observation_start</code> and/or <code>observation_end</code> parameters can be used to filter the range of imported data. </p>
<p>For example, suppose we are interested in loading seasonally adjusted CPI data for all dates after 1971. Let's start by searching for the series ID we want to load:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Read series information from FRED and print first 5 rows
head(fred_search("consumer price index seasonally adjusted"));</code></pre>
<pre>       frequency  frequency_short group_popularity               id     last_updated            notes  observation_end observation_star       popularity     realtime_end   realtime_start seasonal_adjustm seasonal_adjustm            title            units      units_short
         Monthly                M        95.000000         CPIAUCSL 2022-11-10 07:38 The Consumer Pri       2022-10-01       1947-01-01        94.000000       2022-11-28       2022-11-28 Seasonally Adjus               SA Consumer Price I Index 1982-1984= Index 1982-1984=
         Monthly                M        95.000000         CPIAUCNS 2022-11-10 07:38 Handbook of Meth       2022-10-01       1913-01-01        71.000000       2022-11-28       2022-11-28 Not Seasonally A              NSA Consumer Price I Index 1982-1984= Index 1982-1984=
      Semiannual               SA        95.000000      CUUS0000SA0 2022-07-13 07:37                .       2021-01-01       1913-01-01        38.000000       2022-11-28       2022-11-28 Not Seasonally A Consumer Price I Inflation, consu          Percent Index 1982-1984=
          Annual                A        84.000000   FPCPITOTLZGUSA 2022-05-03 14:01 Inflation as mea       2021-01-01       1960-01-01        84.000000       2022-11-28       2022-11-28 Not Seasonally A              NSA Inflation, consu          Percent                %
         Monthly                M        83.000000  CPALTT01USM657N 2022-11-14 14:25 OECD descriptor        2022-09-01       1960-01-01        80.000000       2022-11-28       2022-11-28 Not Seasonally A              NSA Consumer Price I Growth rate prev Growth rate prev </pre>
<p>It looks like the best series for us to use is &quot;CPIAUCSL&quot;. However, this series starts in January 1947. </p>
<p>We can tell GAUSS to only import data starting from 1971 by setting the <code>observation_start</code> parameter to <code>"1971-01-01"</code> using the <code>fred_set</code> procedure:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set observation_start parameter
// to use all data on or after 1971-01-01
params_cpi = fred_set("observation_start", "1971-01-01");</code></pre>
<p>Now we can load our CPI data using <code>fred_load</code> with two inputs:</p>
<ol>
<li>The series ID.</li>
<li>The parameter list, <code>params_cpi</code>.</li>
</ol>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load data using a parameter list
cpi_m = fred_load("CPIAUCSL", params_cpi);

// Preview first 5 rows of data
head(cpi_m);</code></pre>
<p>Our data preview shows that the imported data starts on January 1, 1971:</p>
<pre>            date         CPIAUCSL
      1971-01-01        39.900000
      1971-02-01        39.900000
      1971-03-01        40.000000
      1971-04-01        40.100000
      1971-05-01        40.300000 </pre>
<h3 id="aggregating-data">Aggregating Data</h3>
<p>Next, suppose we want to aggregate our data from monthly to quarterly data. The FRED import tools provide a convenient way to do this at the time of import using the <code>frequency</code> parameter. </p>
<p>The <code>frequency</code> parameter allows you to specify the frequency of data you would like. The specified frequency can only be the same or lower than the frequency of the original series. </p>
<p>Frequency options include:</p>
<table>
 <thead>
<tr><th>Specifier</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>"d"</td><td>Daily</td></tr>
<tr><td>"w"</td><td>Weekly</td></tr>
<tr><td>"bw"</td><td>Biweekly</td></tr>
<tr><td>"m"</td><td>Monthly</td></tr>
<tr><td>"q"</td><td>Quarterly</td></tr>
<tr><td>"sa"</td><td>Semiannual</td></tr>
<tr><td>"a"</td><td>Annual</td></tr>
</tbody>
</table>
<p>The default aggregation method is to use averaging. However, the <code>aggregation_method</code> parameter can be used to specify an aggregation method. Aggregation options include:</p>
<table>
 <thead>
<tr><th>Specifier</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>"avg"</td><td>Average</td></tr>
<tr><td>"sum"</td><td>Sum</td></tr>
<tr><td>"eop"</td><td>End of Period</td></tr>
</tbody>
</table>
<p>Let's use the <code>frequency</code> parameter to aggregate the monthly &quot;CPIAUCSL&quot; series to quarterly observations. We will also use the <code>aggregation_method</code> to specify that end-of-period aggregation is used:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set parameter list
// Include previously specified
// parameter list to append new specifications
params_cpi = fred_set("frequency", "q", "aggregation_method", "eop", params_cpi);

// Load quarterly CPI
cpi_q_eop  = fred_load("CPIAUCSL", params_cpi);

head(cpi_q_eop);</code></pre>
<pre>            date         CPIAUCSL
      1971-01-01        40.000000
      1971-04-01        40.500000
      1971-07-01        40.800000
      1971-10-01        41.100000
      1972-01-01        41.400000</pre>
<p>The <code>cpi_q_eop</code> dataframe now contains quarterly data starting in January 1971. </p>
<h3 id="transformations">Transformations</h3>
<p>Finally, suppose we want to use our CPI data to study <a href="https://www.aptech.com/blog/understanding-state-space-models-an-inflation-example/" target="_blank" rel="noopener">inflation</a>. With the FRED import tools, we can do this using the <code>units</code> parameter with the <code>fred_load</code> procedure. </p>
<p>The <em>units</em> options include:</p>
<table>
 <thead>
<tr><th>Specifier</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>"lin"</td><td>Levels (no transformation).</td></tr>
<tr><td>"chg"</td><td>Change.</td></tr>
<tr><td>"ch1"</td><td>Change from one year ago.</td></tr>
<tr><td>"pch"</td><td>Percent change.</td></tr>
<tr><td>"pc1"</td><td>Percent change from one year ago.</td></tr>
<tr><td>"pca"</td><td>Compounded annual rate of change.</td></tr>
<tr><td>"cch"</td><td>Continuously compounded rate of change.</td></tr>
<tr><td>"cca"</td><td>Continuously compounded annual rate of change.</td></tr>
<tr><td>"log"</td><td>Natural log.</td></tr>
</tbody>
</table>
<p>Let's update our <code>params_cpi</code> parameter list and import the percent change of &quot;CPIAUCSL&quot; from a year ago. </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set params
params_cpi = fred_set("units", "pc1", params_cpi);

// Load quarterly CPI
infl_q  = fred_load("CPIAUCSL", params_cpi);
plotXY(infl_q,  "CPIAUCSL ~ date");</code></pre>
<p><a href="https://www.aptech.com/wp-content/uploads/2022/12/g23-fred-cpiaucsl.jpg"><img src="https://www.aptech.com/wp-content/uploads/2022/12/g23-fred-cpiaucsl.jpg" alt="Graph of CPI data." width="600" height="400" class="aligncenter size-full wp-image-11583255" /></a></p>
<h2 id="conclusion">Conclusion</h2>
<p>In today's blog, we saw how the GAUSS FRED integration introduced in GAUSS 23 can save you time and effort when it comes to working with FRED data. </p>
<p>We learned how to use the FRED import tools to:</p>
<ul>
<li>Search for a FRED data series. </li>
<li>Import FRED data to GAUSS, including merging multiple series. </li>
<li>Use advanced import tools to perform data transformations. </li>
</ul>
<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/importing-fred-data-to-gauss/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Introduction to Efficient Creation of Detailed Plots</title>
		<link>https://www.aptech.com/blog/introduction-to-efficient-creation-of-detailed-plots/</link>
					<comments>https://www.aptech.com/blog/introduction-to-efficient-creation-of-detailed-plots/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 16:26:33 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11582941</guid>

					<description><![CDATA[A few weeks ago, we showed you how to create a detailed plot from a recent article in the American Economic Review. That article contained several plots that contain quite a bit of similar and stylized formatting. Today we will show you how to <i>efficiently</i> create two of these graphs.

Our main goals are to get you thinking about code reuse and how it can help you:

<ul>
<li> Get more results from your limited research time.</li>
<li>Avoid the frustration that comes from growing mountains of spaghetti code.</li>
</ul>]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>A few weeks ago, we showed you how to create a detailed plot from a recent article in the American Economic Review. That article contained several plots that contain quite a bit of similar and stylized formatting. Today we will show you how to <em>efficiently</em> create two of these graphs.</p>
<p>Our main goals are to get you thinking about code reuse and how it can help you:</p>
<ul>
<li>Get more results from your limited research time.</li>
<li>Avoid the frustration that comes from growing mountains of spaghetti code.</li>
</ul>
<div class="alert alert-info" role="alert">If you missed it, be sure to check out our original blog on this topic, <a href="https://www.aptech.com/blog/advanced-formatting-techniques-for-creating-aer-quality-plots/" target="_blank" rel="noopener">Advanced Formatting Techniques for Creating AER Quality Plots</a>. </div>
<h2 id="our-graphs">Our Graphs</h2>
<p>This is what we will create today. As you can see they share many style attributes. This gives us a great opportunity to reuse code.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2022/09/gblog-hetboombust1x2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2022/09/gblog-hetboombust1x2.jpg" alt="Line plots from an American Economic Review article created by GAUSS." width="1000" height="400" class="aligncenter size-full wp-image-11582942" /></a></p>
<p>You can <a href="https://raw.githubusercontent.com/aptech/gauss_blog/master/programming/introduction-efficient-creation-plots-9.27.22/rationing.csv" target="_blank" rel="noopener">download the data here</a>. </p>
<h2 id="our-initial-code">Our Initial Code</h2>
<p>This is not a massive amount of code and many of you might be tempted to just copy and paste this code and make the minor modifications needed to get your desired result. I completely understand. Your biggest problem is probably a lack of time, so productivity is paramount.</p>
<p>While it might feel like this is a shortcut, it will saddle you with technical debt. Technical debt is just a fancy term that describes the stress, frustration, and time-wasting that inevitably occurs when you take shortcuts like this.</p>
<p>Not only will this save you pain, but it might save you some embarrassment as well. These sorts of mundane issues are real drivers of the replication crises in research today.</p>
<p>Your research is important and I know you want to do it right, so let's get started! </p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">new;
cls;

/*
** Load and preview data
*/
int_rate = loadd("int_rate.csv");

tail(int_rate);

ks = { 0.517, 0.653, 0.781  };

/*
** Graph data
*/

// Graph size
plotCanvasSize("px", 500 | 400);

// Default settings
struct plotControl plt;
plt = plotGetDefaults("xy");

// Font
plotSetFonts(&amp;plt, "all", "roboto", 14);

// Legend
plotSetLegend(&amp;plt, "", "vcenter left inside", 1);
plotSetLegendBkd(&amp;plt, 0);

// Main line settings
clrs = getColorPalette("set2");
plotSetLinePen(&amp;plt, 4, clrs[3 2], 1|3);

// Axes outline (spine)
plotSetOutlineEnabled(&amp;plt, 1);

// X-axis
plotSetTextInterpreter(&amp;plt, "latex", "xaxis");
plotSetXAxisLabel(&amp;plt, "\\text{country opacity }, \\omega");

// Y-axis
plotSetYLabel(&amp;plt, "interest rate");

// Draw main plot
plotXY(plt, int_rate, "high + low ~ x");

// Style and add vertical lines
plotSetLinePen(&amp;plt, 1, "#CCC", 2);
plotAddVLine(plt, ks);

// Style text boxes
struct plotAnnotation ant;
ant = annotationGetDefaults();
annotationSetTextInterpreter(&amp;ant, "latex");
annotationSetLinePen(&amp;ant, 0, "", -1);
annotationSetFont(&amp;ant, "", 14, "#3333");
annotationSetBkd(&amp;ant, "", 0);

// Add text boxes
plotAddTextbox(ant, "\\omega_1", ks[1], 0.15);
plotAddTextbox(ant, "\\omega_2", ks[2], 0.15);
plotAddTextbox(ant, "\\omega_3", ks[3], 0.15);</code></pre>
<h2 id="initial-code-simplification">Initial Code Simplification</h2>
<p>We will start by creating a <a href="https://www.aptech.com/blog/basics-of-gauss-procedures/" target="_blank" rel="noopener">procedure</a> to hold some of the plot styling functions that we want to repeat and apply them to the first plot only. Then we will add the data for the second plot.</p>
<p>It looks like all of the styling applied before the call to <a href="https://docs.aptech.com/gauss/plotxy.html" target="_blank" rel="noopener"><code>plotXY</code></a> will be the same in both plots, but the y-axis label text is different. So, let's create a procedure that will apply the main settings:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">new;
cls;

/*
** Load and preview data
*/
int_rate = loadd("int_rate.csv");

tail(int_rate);

ks = { 0.517, 0.653, 0.781  };

/*
** Graph data
*/

// Graph size
plotCanvasSize("px", 500 | 400);

// Declare plotControl structure
struct plotControl plt;

// Fill with defaults for this project
plt = pltDefaults();

// Set y-axis label for first plot
plotSetYLabel(&amp;plt, "interest rate");

// Draw first plot
plotXY(plt, int_rate, "high + low ~ x");

proc (1) = pltDefaults();
    local clrs;

    struct plotControl plt;
    plt = plotGetDefaults("xy");

    // Font
    plotSetFonts(&amp;plt, "all", "roboto", 14);

    // Legend
    plotSetLegend(&amp;plt, "", "vcenter left inside", 1);
    plotSetLegendBkd(&amp;plt, 0);

    // Main line settings
    clrs = getColorPalette("set2");
    plotSetLinePen(&amp;plt, 4, clrs[3 2], 1|3);

    // Axes outline (spine)
    plotSetOutlineEnabled(&amp;plt, 1);

    // X-axis
    plotSetTextInterpreter(&amp;plt, "latex", "xaxis");
    plotSetXAxisLabel(&amp;plt, "\\text{country opacity }, \\omega");

    retp(plt);
endp;
</code></pre>
<p>While this code is slightly longer when drawing just one plot, it will save us when we add the next plot. Before we do that, we need to address the <a href="https://www.aptech.com/blog/advanced-formatting-techniques-for-creating-aer-quality-plots/#add-vertical-lines" target="_blank" rel="noopener">vertical lines</a> and <a href="https://www.aptech.com/blog/advanced-formatting-techniques-for-creating-aer-quality-plots/#add-text-annotations" target="_blank" rel="noopener">annotations</a>.</p>
<h2 id="simplifying-the-annotations">Simplifying the Annotations</h2>
<p>Looking over the plots at the top of this article shows us that the vertical lines and the omega text boxes all depend on the <code>ks</code> vector. Since they seem to be intertwined, it is probably safe to put them in one procedure. </p>
<p>The simplest thing to do would be to add all the annotation code to a single procedure like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">proc (0) = pltAddOmegas(ks);

    struct plotControl plt;
    plt = plotGetDefaults("xy");

    // Style and add vertical lines
    plotSetLinePen(&amp;plt, 1, "#CCC", 2);
    plotAddVLine(plt, ks);

    // Style text boxes
    struct plotAnnotation ant;
    ant = annotationGetDefaults();
    annotationSetTextInterpreter(&amp;ant, "latex");
    annotationSetLinePen(&amp;ant, 0, "", -1);
    annotationSetFont(&amp;ant, "", 14, "#3333");
    annotationSetBkd(&amp;ant, "", 0);

    // Add text boxes
    plotAddTextbox(ant, "\\omega_1", ks[1], 0.15);
    plotAddTextbox(ant, "\\omega_2", ks[2], 0.15);
    plotAddTextbox(ant, "\\omega_3", ks[3], 0.15);
endp;</code></pre>
<p>and then call that procedure right after <code>plotXY</code>. In this case, it is not a bad place to start. However, since we are in learning mode, let's pretend that we were going to create more graphs in this file that would add text boxes with the same styling, but would use different greek letters and would be located in a different place in the graph.</p>
<p>In that case, we would probably want to separate the text box styling from the text box drawing, like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">proc (1) = textBoxDefaults();
    struct plotAnnotation ant;
    ant = annotationGetDefaults();

    annotationSetTextInterpreter(&amp;ant, "latex");
    annotationSetLinePen(&amp;ant, 0, "", -1);
    annotationSetFont(&amp;ant, "", 14, "#3333");
    annotationSetBkd(&amp;ant, "", 0);

    retp(ant);
endp;

proc (0) = pltAddOmegas(ks);

    struct plotControl plt;
    plt = plotGetDefaults("xy");

    // Style and add vertical lines
    plotSetLinePen(&amp;plt, 1, "#CCC", 2);
    plotAddVLine(plt, ks);

    struct plotAnnotation ant;
    ant = textBoxDefaults();

    // Add text boxes
    plotAddTextbox(ant, "\\omega_1", ks[1], 0.15);
    plotAddTextbox(ant, "\\omega_2", ks[2], 0.15);
    plotAddTextbox(ant, "\\omega_3", ks[3], 0.15);
endp;</code></pre>
<h3 id="conclusion-and-final-code">Conclusion and final code</h3>
<p>Below is the final code to create the graphs from the top of this blog. This isn't designed to show you the best way to write this code, but rather to get you started with the idea of code reuse.</p>
<p>Software engineers sometimes use the acronym DRY — Don't Repeat Yourself. While that is a great practice, even just repeating yourself less often will bring you great rewards.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">new;
cls;

/*
** Load and preview data
*/
int_rate = loadd("int_rate.csv");
tail(int_rate);

rationing = loadd("rationing.csv");
tail(rationing);

ks = { 0.517, 0.653, 0.781  };

/*
** Graph data
*/

// Graph size
plotCanvasSize("px", 1000 | 400);

// Declare plotControl structure and
// fill with defaults for this project
struct plotControl plt;
plt = pltDefaults();

/*
** Interest rate plot
*/

// Create grid for multiple plots
plotLayout(1,2,1);

// Set y-axis label for first plot
plotSetYLabel(&amp;plt, "interest rate");

// Draw first plot
plotXY(plt, int_rate, "high + low ~ x");
pltAddOmegas(ks);

/*
** Rationing plot
*/

// Create grid for multiple plots
plotLayout(1,2,2);

// Set y-axis label for first plot
plotSetYLabel(&amp;plt, "rationing");

// Draw first plot
plotXY(plt, rationing, "high + low ~ x");
pltAddOmegas(ks);

proc (1) = pltDefaults();
    local clrs;

    struct plotControl plt;
    plt = plotGetDefaults("xy");

    // Font
    plotSetFonts(&amp;plt, "all", "roboto", 14);

    // Legend
    plotSetLegend(&amp;plt, "", "vcenter left inside", 1);
    plotSetLegendBkd(&amp;plt, 0);

    // Main line settings
    clrs = getColorPalette("set2");
    plotSetLinePen(&amp;plt, 4, clrs[3 2], 1|3);

    // Axes outline (spine)
    plotSetOutlineEnabled(&amp;plt, 1);

    // X-axis
    plotSetTextInterpreter(&amp;plt, "latex", "xaxis");
    plotSetXAxisLabel(&amp;plt, "\\text{country opacity }, \\omega");

    retp(plt);
endp;

proc (1) = textBoxDefaults();
    struct plotAnnotation ant;
    ant = annotationGetDefaults();

    annotationSetTextInterpreter(&amp;ant, "latex");
    annotationSetLinePen(&amp;ant, 0, "", -1);
    annotationSetFont(&amp;ant, "", 14, "#3333");
    annotationSetBkd(&amp;ant, "", 0);

    retp(ant);
endp;

proc (0) = pltAddOmegas(ks);

    struct plotControl plt;
    plt = plotGetDefaults("xy");

    // Style and add vertical lines
    plotSetLinePen(&amp;plt, 1, "#CCC", 2);
    plotAddVLine(plt, ks);

    struct plotAnnotation ant;
    ant = textBoxDefaults();

    // Add text boxes
    plotAddTextbox(ant, "\\omega_1", ks[1], 0.15);
    plotAddTextbox(ant, "\\omega_2", ks[2], 0.15);
    plotAddTextbox(ant, "\\omega_3", ks[3], 0.15);
endp;</code></pre>
<h3 id="further-reading">Further Reading</h3>
<ol>
<li><a href="https://www.aptech.com/blog/advanced-formatting-techniques-for-creating-aer-quality-plots/" target="_blank" rel="noopener">Advanced Formatting Techniques for Creating AER Quality Plots.</a></li>
<li><a href="https://www.aptech.com/blog/visualizing-covid-19-panel-data-with-gauss-22/" target="_blank" rel="noopener">Visualizing COVID-19 Panel Data With GAUSS 22.</a> </li>
<li><a href="https://www.aptech.com/blog/how-to-mix-match-and-style-different-graph-types/" target="_blank" rel="noopener">How to Mix, Match and Style Different Graph Types.</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/introduction-to-efficient-creation-of-detailed-plots/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Introduction to GAUSS for Stata Users</title>
		<link>https://www.aptech.com/blog/introduction-to-gauss-for-stata-users/</link>
					<comments>https://www.aptech.com/blog/introduction-to-gauss-for-stata-users/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Tue, 15 Mar 2022 18:45:29 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=11582373</guid>

					<description><![CDATA[Our new <a href=https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html> Introduction to GAUSS for Stata Users</a> offers a guide for Stata Users who are looking to get started quickly in GAUSS. It offers side-by-side comparisons of essential analysis tasks in GAUSS and Stata. ]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Our new <a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html">Introduction to GAUSS</a> offers a guide for users coming from Stata who are looking to get started quickly in GAUSS. It offers side-by-side comparisons of essential analysis tasks in GAUSS and Stata. </p>
<p>The guide is easily searchable making it a quick and intuitive reference tool for new and experienced GAUSS users, alike. </p>
<h2 id="contents">Contents</h2>
<p>In this introduction, you'll learn everything you need to get started in GAUSS including:</p>
<h3 id="data-storage">Data storage</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#what-is-a-gauss-dataframe">GAUSS dataframes.</a></li>
</ul>
<h3 id="data-input-output">Data input/output</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#constructing-a-dataframe-from-values">Constructing a dataframe from values.</a></li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#reading-external-datasets">Reading external dataset.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#interactively-loading-data">Interactively loading data.</a></li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#viewing-data">Viewing data.</a> </li>
</ul>
<h3 id="data-operations">Data Operations</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#indexing-matrices-and-dataframes">Indexing matrices and dataframes.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#operations-on-variables">Operations on variables.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#matrix-operations">Matrix operations.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#filtering">Filtering.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#selection-of-data">Selection of data.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#sorting">Sorting.</a> </li>
</ul>
<h3 id="date-function">Date Function</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#creating-usable-dates-from-raw-data">Creating usable dates from raw data.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#creating-dates-from-existing-strings">Creating dates from existing strings.</a></li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#changing-the-display-format">Changing the display format.</a></li>
</ul>
<h3 id="string-processing">String Processing</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#finding-the-length-of-a-string">Finding the length of a string.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#finding-the-position-of-a-substring">Finding the position of a substring.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#extracting-a-substring-by-position">Extracting a substring by position.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#extracting-words">Extracting words.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#changing-case">Changing case.</a> </li>
</ul>
<h3 id="missing-values">Missing values</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#counting-missing-values">Counting missing values.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#removing-missing-values">Removing missing values.</a> </li>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#replacing-missing-values">Replacing missing values.</a> </li>
</ul>
<h3 id="merging">Merging</h3>
<ul>
<li><a href="https://docs.aptech.com/gauss/coming-to-gauss/intro-gauss-for-stata-users.html#merging">Merge existing dataframes.</a></li>
</ul>
<h3 id="conclusion">Conclusion</h3>
<p>If you're new to GAUSS and are familiar with Stata, you'll find our Introduction to GAUSS the perfect tool for getting up and running.</p>
<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/introduction-to-gauss-for-stata-users/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Basics of GAUSS Procedures</title>
		<link>https://www.aptech.com/blog/basics-of-gauss-procedures/</link>
					<comments>https://www.aptech.com/blog/basics-of-gauss-procedures/#comments</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 17 Jul 2020 20:47:27 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=22355</guid>

					<description><![CDATA[GAUSS procedures are user-defined functions that allow you to combine a sequence of commands to perform desired tasks. In this blog, you will learn the fundamentals of creating and using procedures in GAUSS.]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Our goal for this post is to learn the fundamentals of creating and using procedures in GAUSS. When you are finished, you should be able to create GAUSS procedures and use those written by others.</p>
<h2 id="what-is-a-gauss-procedure">What is a GAUSS Procedure?</h2>
<p>GAUSS procedures are user-defined functions. They allow you to combine a sequence of commands to perform a desired task.</p>
<div class="su-quote su-quote-style-default su-quote-has-cite"><div class="su-quote-inner su-clearfix"><span class="su-quote-cite">
<p>A function is a block of organized, reusable code that is used to perform a single, related action. - Tutorialspoint.com</p>
</span></div></div>
<h2 id="why-create-gauss-procedures">Why Create GAUSS Procedures?</h2>
<p>There are many advantages to creating GAUSS procedures. Even if you don’t consider yourself a programmer, creating GAUSS procedures will make your work easier and more productive.</p>
<p><strong>Save time.</strong> Every time you use a previously written GAUSS procedure you,</p>
<ul>
<li>Avoid rewriting the same code.</li>
<li>Avoid debugging new or old mistakes.</li>
<li>Keep your main code simpler and more readable.</li>
</ul>
<h2 id="how-to-create-a-gauss-procedure-definition">How to Create a GAUSS Procedure Definition</h2>
<p>Let’s start with a simple example. We’ll create a simple procedure named <code>power</code> which takes two inputs and returns one output.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">proc (1) = power(X, p); // 1. Procedure declaration
    local X_out;        // 2. Local variable list

    X_out = X ^ p;      // 3. Procedure body

    retp(X_out);        // 4. Procedure return
endp;                   // 5. Procedure end</code></pre>
<p>Each line in the above procedure is one of the main parts of a GAUSS procedure. Now let's discuss the details of each of these elements.</p>
<h3 id="1-the-procedure-declaration">1. The Procedure Declaration</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">a.         c.
↓          ↓
proc (1) = power(X, p);
      ↑          ↑
      b.         d.</code></pre>
<p>The procedure declaration is the first line of all GAUSS procedures. It contains four main sections:</p>
<table>
<thead>
<tr>
<th></th>
<th></th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>a.</td>
<td><code>proc</code></td>
<td>Keyword that starts the procedure declaration.</td>
</tr>
<tr>
<td>b.</td>
<td><code>(1) =</code></td>
<td>The number of items (matrices, strings, etc) that will be returned by this procedure. It is optional with a default value of 1.</td>
</tr>
<tr>
<td>c.</td>
<td><code>power</code></td>
<td>The name of the procedure.</td>
</tr>
<tr>
<td>d.</td>
<td><code>(X,p)</code></td>
<td>The required input arguments.</td>
</tr>
</tbody>
</table>
<p>Don't forget the ending semi-colon.</p>
<h3 id="2-the-local-variable-list">2. The Local Variable List</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">    local X_out;  </code></pre>
<p>The local variable list is a comma-separated list of variables that will be used inside the procedure. These local variables only exist when the procedure is running.</p>
<h3 id="3-the-procedure-body">3. The Procedure Body</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">    X_out = X ^ p;</code></pre>
<p>The procedure body is where the procedure's computations are performed. In this case, we have just one simple line. However, there is no limit to the size of your procedure. </p>
<p>You can use procedures created by you or others as well as any built-in GAUSS function or operator inside the body of your procedure.</p>
<h3 id="4-the-procedure-return">4. The Procedure Return</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">    retp(X_out);</code></pre>
<p>You can return any of the local variables from the procedure, or none at all. When returning more than one variable, use commas to separate the variable names.</p>
<h3 id="5-the-procedure-end">5. The Procedure End</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">endp;</code></pre>
<p>The <code>endp</code> keyword signals the end of the procedure.
<span id="define_procs"></span></p>
<h2 id="how-to-use-a-gauss-procedure">How to Use a GAUSS Procedure</h2>
<p>There are two steps required to use a GAUSS procedure:</p>
<ol>
<li>Define the procedure.</li>
<li>Call the procedure.</li>
</ol>
<h3 id="how-to-define-a-gauss-procedure">How to Define a GAUSS Procedure</h3>
<p>When GAUSS first starts up, it is only aware of its own built-in functions and procedures. Defining a procedure is the process of making GAUSS aware of your procedure. If you try to use a procedure before it is defined, like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Clear all data and procedures from the GAUSS workspace
new;

// Call procedure that has not been defined
power(3, 2);</code></pre>
<p>you will get the error <code>G0025 : Undefined symbol: 'power'</code>.</p>
<p>Here are four ways to define your GAUSS procedure:</p>
<ol>
<li>Add the procedure to your main code file.</li>
<li>Run the GAUSS procedure.</li>
<li>Place the procedure in a <code>.g</code> file.</li>
<li>Add your procedure to a GAUSS library.</li>
</ol>
<p><strong>1. Add the procedure to your main code file.</strong> The simplest method to define a procedure is to simply add it to your code and run the main file. This allows for a natural process of learning-by-doing.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/07/blog-gauss-procedure-basics-run-file-2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/07/blog-gauss-procedure-basics-run-file-2.jpg" alt="Run a GAUSS program with a procedure." width="453" height="408" class="aligncenter size-full wp-image-22458" /></a></p>
<p>As we can see from the above image, the procedure can be included anywhere in your program file. It is often convenient to place procedures after the main code.</p>
<p>GAUSS can allow this because it does not just run your code line-by-line. It is smarter than that. When GAUSS runs your program, its first step is to compile your code. This allows GAUSS to find many mistakes immediately and also speed-up your code in addition to locating your procedures.</p>
<p><strong>2. Run the GAUSS procedure.</strong> Since GAUSS does not run your code line-by-line, as we saw in the previous section, GAUSS needs to have the entire procedure definition at once. Therefore, you cannot run a procedure one line at a time. If you try to run the first line alone:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">proc (1) = power(X, p);</code></pre>
<p>you will get the error <code>G0278 : PROC without ENDP 'power'</code>.</p>
<p>After you run the entire procedure:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/07/blog-gauss-procedures-basics-run-highighted-text.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/07/blog-gauss-procedures-basics-run-highighted-text.jpg" alt="Run a GAUSS procedure." width="529" height="415" class="aligncenter size-full wp-image-22463" /></a></p>
<p>the procedure is defined so that you can use it in GAUSS. Now running:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">x = power(3, 2);
print x;</code></pre>
<p>will be successful, returning:</p>
<pre>9</pre>
<p><span id="dot_g_proc_file"></span></p>
<p><strong>3. Place your procedure in a .g file.</strong> It is not always convenient to keep all procedures in your main code file.</p>
<p>A simple alternative is to:</p>
<p>    i. Create a file with the same name as your procedure plus a <code>.g</code> file extension. Such as <code>power.g</code>.<br/>
    ii. Place your procedure in this file.<br/>
    iii. Save this file in a location where GAUSS can find it.</p>
<div class="alert alert-info" role="alert">GAUSS will search for this file first in your <a href="https://www.aptech.com/blog/the-current-working-directory-what-you-need-to-know/">Current Working Directory</a>, then it will search your <a href="https://www.aptech.com/resources/tutorials/src_path/">SRC_PATH</a>.</div>
<p><strong>4. Add your procedure to a GAUSS library.</strong> Adding your related procedures to a GAUSS library is considered a best practice. GAUSS libraries make it easier to use and share code without worrying about paths.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2020/07/gauss-procs-library-tool.jpg"><img src="https://www.aptech.com/wp-content/uploads/2020/07/gauss-procs-library-tool.jpg" alt="GAUSS Library Tool." width="50%" height="50%" class="aligncenter size-full wp-image-22431" /></a></p>
<p>Full GAUSS library management is beyond the scope of this article. However, the above image shows the <strong>Create Library</strong> and <strong>Add Files</strong> controls.</p>
<h3 id="how-to-call-a-gauss-procedure">How to Call a GAUSS Procedure</h3>
<p>Now that we've learned how to create and define GAUSS procedures, it's time to use them. Here are a few example procedures to fill in anything you might be unsure about.</p>
<p>We'll start with a procedure with two returns.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create 4x1 vector
y = { 1, 3, 2, 1 };

// Call procedure
{ a, b } = range(y);

// Print results
print "The smallest value is: " a;
print "The largest value is : " b;

// Procedure that returns two items
proc (2) = range(X);
    local min, max;

    min = minc(X);
    max = maxc(X);

    retp(min, max);
endp;</code></pre>
<p>Running the above code will return:</p>
<pre>The smallest value is:        1
The largest value is :        3</pre>
<p>Next, we'll consider a case with two inputs.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Create 5x1 vector
z = { 1, 2, 3, 4, 9 };

m1 = average(z, "median");
print m1;

m2 = average(z, "mean");
print m2;

proc (1) = average(y, type_);
    local avg;

    if type_ $== "mean";
        avg = meanc(y);
    elseif type_ $== "median";
        avg = median(y);
    else;
        print "Second input, type_, not recognized";
        end;
    endif;

    retp(avg);
endp;</code></pre>
<p>which will return:</p>
<pre>3.0
3.8</pre>
<h3 id="conclusion">Conclusion</h3>
<p>Great job! You've made it through the fundamentals of GAUSS procedures. You've learned:</p>
<ol>
<li>The parts that make up a GAUSS procedure.</li>
<li>How to define GAUSS procedures.</li>
<li>How to call GAUSS procedures.</li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/basics-of-gauss-procedures/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to mix, match and style different graph types</title>
		<link>https://www.aptech.com/blog/how-to-mix-match-and-style-different-graph-types/</link>
					<comments>https://www.aptech.com/blog/how-to-mix-match-and-style-different-graph-types/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Tue, 20 Aug 2019 17:56:02 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=20651</guid>

					<description><![CDATA[Often times we need to mix multiple graph types in order to create a plot which most effectively tells the story of our data. In this post, we will create a plot of the Phillips Curve in the United States over two separate time periods. We will show how to add scatter points and lines as well as data series' of different lengths to a single plot. However, our main focus will be showing you how to control the styling of all aspects of the plot in these cases.]]></description>
										<content:encoded><![CDATA[<h3 id="intro">Intro</h3>
<p>Often times we need to mix multiple graph types in order to create a plot which most effectively tells the story of our data. In this post, we will create a plot of the Phillips Curve in the United States over two separate time periods. </p>
<p>We will show how to add scatter points and lines as well as data series' of different length to a single plot. However, our main focus will be showing you how to control the styling of all aspects of the plot in these cases.</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-main.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-main.jpg" alt="" width="680" height="400" class="aligncenter size-full wp-image-20667" /></a></p>
<h2 id="how-to-add-data-to-an-existing-graph">How to add data to an existing graph</h2>
<p>The main GAUSS graphing functions shown in the second column of the table below, treat each column of the input data as a separate series. This makes it very simple to plot data in which the plot type and series length are the same.</p>
<table>
<thead>
<tr><th>Plot type</th><th>Main function</th><th>Add function</th></tr>
</thead>
<tbody>
<tr><td>Scatter</td><td>plotScatter</td><td>plotAddScatter</td></tr>
<tr><td>XY</td><td>plotXY</td><td>plotAddXY</td></tr>
<tr><td>Time Series</td><td>plotTS, plotTSHF</td><td>plotAddTS, plotAddTSHF</td></tr>
<tr><td>Bar / Histogram</td><td>plotBar, plotHist, plotHistF, plotHistP</td><td>plotAddBar, plotAddHist, plotAddHistF, plotAddHistP</td></tr>
<tr><td>Box</td><td>plotBox</td><td>plotAddBox</td></tr>
</tbody>
</table>
<p>We can add a new series to a graph created with one of the <em>main</em> functions in column two, by using one of the <em>add</em> functions in column three. </p>
<p>The <em>add</em> functions take the same inputs as the <em>main</em> functions. For example, the code below will create a scatter plot and then add a line at the mean of the Y variable.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load variables from dataset
data = loadd("phillips-us-1955.csv", "CPI + Unemployment");

// Plot initial scatter points
plotScatter(data[.,1], data[.,2]);

// Compute mean of unemployment
mu_u = meanc(data[.,2]);

// Compute range of CPI
range_cpi = minc(data[.,1]) | maxc(data[.,2]);

// Add a line across the range of the CPI
// data at the height of the average of the
// Unemployment data
plotAddXY(range_cpi, mu_u | mu_u);</code></pre>
<p>The code will create a graph which looks like this:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-1.jpg" alt="" width="400" height="300" class="aligncenter size-full wp-image-20669" /></a></p>
<h2 id="how-to-style-a-graph-with-plotadd-functions">How to style a graph with plotAdd functions</h2>
<p>When styling graphs made with <code>plotAdd</code> functions, an important distinction is made between axis level attributes and series level attributes.</p>
<h3 id="axis-level-attributes">Axis level attributes</h3>
<p>Axis level attributes are the elements which are generally independent of the data. For example, the title, axes labels and tick labels are axis level attributes. These attributes become fixed during the creation of the initial plot and cannot be modified with a <code>plotAdd</code> call.</p>
<p>The axis level attributes include:</p>
<ul>
<li>Title</li>
<li>Axes labels</li>
<li>Tick label font and format</li>
<li>Axes line attributes</li>
<li>X and Y-axis range (if explicitly set with <code>plotSetXRange</code> / <code>plotSetYRange</code>)</li>
<li>Canvas size</li>
<li>Legend location, font and background style</li>
</ul>
<p>For example, if we modify our earlier code like this:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load variables from dataset
data = loadd("phillips-us-1955.csv", "CPI + Unemployment");

struct plotControl myPlot;
myPlot = plotGetDefaults("scatter");

// Set axis element, title
plotSetTitle(&amp;myPlot, "Phillips Curve in the US", "Helvetica Neue", 14);

// Plot initial scatter points
// Note that we pass in 'myPlot' this time
plotScatter(myPlot, data[.,1], data[.,2]);

// Compute mean of unemployment
mu_u = meanc(data[.,2]);

// Compute range of CPI
range_cpi = minc(data[.,1]) | maxc(data[.,2]);

// Attempt to reset axis level property
myPlot = plotGetDefaults("xy");
plotSetTitle(&amp;myPlot, "Title which will be ignored");

// Attempt to set axis level property
plotSetXLabel(&amp;myPlot, "CPI");

// Add a line across the range of the CPI
// data at the height of the average of the
// Unemployment data
// Note that we pass in 'myPlot' this time
plotAddXY(myPlot, range_cpi, mu_u | mu_u);</code></pre>
<p>we will get a graph that looks like this:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-2.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-2.jpg" alt="" width="400" height="300" class="aligncenter size-full wp-image-20672" /></a></p>
<p>The code reset the title before the <code>plotAddXY</code> call from &quot;Phillips Curve in the US&quot; to &quot;Title which will be ignored&quot;. The code also reset the X-axis label from nothing to &quot;CPI&quot;. As you see both of those changes were ignored because axis level attributes must be set on the initial plot creation.</p>
<h3 id="series-level-attributes">Series level attributes</h3>
<p>Series level attributes are those settings which are specific to the data series. For example, line color, line thickness and scatter symbol are all series level attributes. </p>
<p>The series level attributes include:</p>
<ul>
<li>Line color, thickness, style</li>
<li>Scatter symbol type, color</li>
<li>Legend text</li>
</ul>
<p>You have the choice whether to set the series level attributes at the time of the initial plot call or to modify them during the <code>plotAdd</code>. Passing a <code>plotControl</code> structure to the <code>plotAdd</code> call tells GAUSS to update the series level attributes. If you do not pass a <code>plotControl</code> structure to the <code>plotAdd</code> call, GAUSS will continue using the attributes set in the initial plot creation.</p>
<p>More specifically, when a <code>plotControl</code> structure is not passed into the <code>plotAdd</code> call, GAUSS will continue cycling through the previously set series attributes where the last plot call left off. It is like the last plot call left a bookmark in the list of series attributes.</p>
<p>For example, you may have noticed that the mean line in the first graph we made is blue, while the line in the second graph is orange. Looking at the default colors in the table below, we can see why.</p>
<table>
<tr><th colspan="5" style="text-align: center">Default colors</th></tr>
<tr><td>#FC8D62</td><td>#8DA0CB</td><td>#66C2A5</td><td>#E78AC3 </td><td>#A6D854</td></tr>
<tr><td style="background-color:#FC8D62"> </td><td style="background-color:#8DA0CB"> </td><td style="background-color:#66C2A5"> </td><td style="background-color:#E78AC3"> </td><td style="background-color:#A6D854"> </td></tr>
</table>
<p>When we created the first graph, the initial <code>plotScatter</code> call set the graph's line and scatter symbol colors to the list of five colors shown above. The initial scatter plot used the first orange color, so the <code>plotAddXY</code> without a <code>plotControl</code> structure started with the blue color next in the list.</p>
<p>In the second graph, since the <code>plotAddXY</code> call was given a <code>plotControl</code> structure, this told GAUSS to create the new line using the series settings from the new <code>plotControl</code> structure starting from the beginning. Since we had not changed the sequence of colors, the added mean line used the same orange color as the scatter plot.</p>
<h2 id="how-to-create-the-full-phillips-curve-graph">How to create the full Phillips Curve graph</h2>
<p>It is generally considered a best practice to apply all axes and series level settings with the initial plot call. That is what we will do here. Our steps will be:</p>
<ol>
<li>Load the data.</li>
<li>Set the axis level attributes.</li>
<li>Set the series level attributes.</li>
<li>Draw the initial scatter plot.</li>
<li>Add the second set of scatter points.</li>
<li>Add the two regression lines.</li>
</ol>
<h3 id="step-1-load-and-define-data">Step 1: Load and define data</h3>
<p>We will start by loading the data for both sets of scatter points. To keep our focus on the graphs, we have simply defined the start and endpoints for the regression lines instead of computing them.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Load inflation and unemployment data
// (CPI percent change) for 1955–71 and 1974–84
phil_1955 = loadd("phillips-us-1955.csv", "CPI + Unemployment");
phil_1974 = loadd("phillips-us-1974.csv", "CPI + Unemployment");

// For simplicity, define start and
// end points for regression lines
reg_x_1955 = { -0.8538, 6.4246 };
reg_y_1955 = { 5.6356, 3.8925 };

reg_x_1974 = { 2.3590, 14.5923 };
reg_y_1974 = { 9.0762, 5.9248 };</code></pre>
<h3 id="step-2-set-the-axis-level-attributes">Step 2: Set the axis level attributes</h3>
<p>Next, we will apply the most straightforward axis level settings. The only point to note about these is that they cannot be changed by a <code>plotAdd</code> call.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Declare 'myPlot' to be a plotControl structure
// and fill with default settings
struct plotControl myPlot;
myPlot = plotGetDefaults("scatter");

plotSetTitle(&amp;myPlot, "Phillips Curve in the US", "Arial", 14);

// Note that the font settings applied in
// plotSetXLabel will control the Y-label font
// as well. Setting the Y-label without font
// settings will leave previous font settings unchanged
plotSetXLabel(&amp;myPlot, "Inflation", "Arial", 14);
plotSetYLabel(&amp;myPlot, "Unemployment");

plotSetYRange(&amp;myPlot, 0, 12.5);</code></pre>
<p>Setting the legend will make us think a little more. We will set the legend background to be completely transparent, that is clearly an axis level setting. </p>
<p>However, the function <code>plotSetLegend</code> allows us to set the legend location which is also an axis level attribute in addition to the text for each item in the legend which is a series level attribute. </p>
<p>Fortunately, since we have decided to set all axis and series level attributes before the first scatter plot, we don't need to worry about this distinction. We simply need to make sure that we set our desired text for every data series we plan to add to the plot.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Make the legend background completely
// transparent, i.e. 0% opacity
plotSetLegendBkd(&amp;myPlot, 0);

// The text for each data series we plan to add
// to our graph, in order. Note that the last
// item is an empty string, "", because we only
// want a legend item for one of the regression lines.
leg_text = "1955-1971" $| "1974-1984" $| "Regression line" $| "";
plotSetLegend(&amp;myPlot, leg_text, "top left inside");</code></pre>
<h3 id="step-3-set-the-series-level-attributes">Step 3: Set the series level attributes</h3>
<p>After setting the legend text, we have one more series level attribute to set. That is the line or scatter symbol color. To keep things simple and focused, we will just use the string hex codes and a text name for the colors.</p>
<p>However, GAUSS has many built-in color palettes which are attractive and easy to use. Our blog post <a href="https://www.aptech.com/blog/five-hacks-for-creating-custom-gauss-graphics/">5 Hacks for Creating Custom GAUSS Graphics</a> includes a section which links to the available color palettes and the functions needed to access them.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Set the colors for the scatter plot, an orange and green
// color, followed by one "black" for each regression line
clrs = "#66C2A5" $| "#FC8D62" $| "black" $| "black";
plotSetLineColor(&amp;myPlot, clrs);</code></pre>
<h3 id="step-4-draw-the-initial-scatter-plot">Step 4: Draw the initial scatter plot</h3>
<p>We'll now draw the initial scatter plot, containing the inflation and unemployment data from 1955 to 1971. We will pass in the <code>plotControl</code> structure which contains all the settings we have applied for every data series we plan to add to the graph.</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Draw initial scatter plot
plotScatter(myPlot, phil_1955[.,1], phil_1955[.,2]);</code></pre>
<p>This results in a graph which looks like this:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-3.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-3.jpg" alt="" width="400" height="300" class="aligncenter size-full wp-image-20670" /></a></p>
<h3 id="step-5-add-the-second-scatter-plot">Step 5: Add the second scatter plot</h3>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Add next scatter series, using previously
// set series level attributes since a
// plotControl structure was not passed in
plotAddScatter(phil_1974[.,1], phil_1974[.,2]);</code></pre>
<p>This code will result in a plot which looks like this:</p>
<p><a href="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-4.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/philips-plotadd-blog-4.jpg" alt="" width="680" height="400" class="aligncenter size-full wp-image-20679" /></a></p>
<p>Most of this graph should look like you expect. The added scatter plot is using the second legend text item and the second color. The title, axes labels, and Y-axis range have stayed just as we set them. </p>
<p>The X-axis range, however, has changed. Since we made a big deal earlier that axis level attributes do not change after a <code>plotAdd</code>, you may wonder why the X-axis range did not stay the same.</p>
<p>The reason for this is that the default state for the X and Y-axis ranges is to expand to fit the data being drawn. Since we had not set the X-axis range, it remained at &quot;expand to fit data&quot;. </p>
<p>However, if we had set the X-axis range to the range of the first scatter plot, -1 to +7, then the X-axis range would have remained unchanged. This would mean that all data to the right of X=7 would be out of view.</p>
<h3 id="step-6-add-the-regression-lines">Step 6: Add the regression lines</h3>
<p>Since the <code>plotAdd</code> functions, like the standard plot functions, will plot each column of data as a separate series, either of these code snippets will produce the same result:</p>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Option 1: Add the regression lines in separate calls
plotAddXY(reg_x_1955, reg_y_1955);
plotAddXY(reg_x_1974, reg_y_1974);</code></pre>
<pre class="hljs-container hljs-container-solo"><code class="lang-gauss">// Option 2: Add both regression lines in one call
plotAddXY(reg_x_1955 ~ reg_x_1974, reg_y_1955 ~ reg_y_1974);</code></pre>
<p>Remember to only use only one of the above options. This should result in the plot shown at the top of this tutorial.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Congratulations! You have learned:</p>
<ol>
<li>Which plot attributes are axis level elements vs series level elements.</li>
<li>That axis level elements need to be set on the first plot call.</li>
<li>That series level elements can be set on the first plot call, or during a <code>plotAdd</code>, if a <code>plotControl</code> structure is passed in.</li>
</ol>
<p>These concepts you've learned will make it much easier for you to create and style GAUSS graphs with data of different lengths and different plot types.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/how-to-mix-match-and-style-different-graph-types/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using GAUSS Packages [Complete Guide]</title>
		<link>https://www.aptech.com/blog/using-gauss-packages-complete-guide/</link>
					<comments>https://www.aptech.com/blog/using-gauss-packages-complete-guide/#respond</comments>
		
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Fri, 02 Aug 2019 23:24:05 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=20542</guid>

					<description><![CDATA[GAUSS packages provide access to powerful tools for performing data analysis. This guide covers all you need to know to get the most from GAUSS packages including:
<ul>
<li>What is a GAUSS package</li>
<li>Where to find GAUSS packages</li>
<li>What is included in GAUSS packages</li>
<li>How to use GAUSS packages</li>
</ul>]]></description>
										<content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<p>GAUSS packages provide access to powerful tools for performing data analysis. This guide covers all you need to know to get the most from GAUSS packages including:</p>
<ul>
<li>What is a GAUSS package</li>
<li>Where to find GAUSS packages</li>
<li>What is included in GAUSS packages</li>
<li>How to use GAUSS packages</li>
</ul>
<h2 id="what-is-a-gauss-package">What is a GAUSS package?</h2>
<p>A GAUSS package is a pre-built compilation of procedures and examples. GAUSS packages:</p>
<ol>
<li>Can save time and effort by providing tools that you would have to program otherwise.</li>
<li>Are easy to install and use.</li>
<li>Are built both by Aptech and experienced GAUSS users.</li>
</ol>
<p>Packages usually provide tools focused in a specific area of analysis. For example, Aptech produces a time series package <a href="https://docs.aptech.com/gauss/tsmt/index.html" rel="noopener noreferrer" target="_blank">(TSMT)</a> and a <a href="http://store.aptech.com/gauss-applications-category/bayesian-estimation-tools.html" rel="noopener noreferrer" target="_blank"> Bayesian estimation package (BET)</a>.</p>
<table>
<tr><th style="text-align: center" ; colspan="2"><b>GAUSS Package Examples</b></th></tr>
<tr>
<th>Name</th><th>Description</th>
</tr>
<tr>
<td><a href="https://store.aptech.com/gauss-applications-category.html" rel="noopener noreferrer" target="_blank">Time Series MT</a></td><td>Provides tools for comprehensive treatment of time series models, including model diagnostics, MLE estimation, and forecasts. Available for purchase from Aptech.</td>
</tr>
<tr>
<td><a href="https://github.com/aptech/gauss-sampler-library" rel="noopener noreferrer" target="_blank">samplerlib</a></td><td>Collection of GAUSS procedures and examples developed to implement basic MCMC samplers including an importance sampler, a Gibbs sampler, and a Metropolis-Hastings sampler. Available free download and installation using the <a href="https://www.aptech.com/blog/gauss-package-manager-basics/" rel="noopener noreferrer" target="_blank">GAUSS Package Manager.</a></td>
</tr>
<tr>
<td><a href="https://github.com/aptech/gxgboost" rel="noopener noreferrer" target="_blank">gxgboost</a></td><td>Package for implementing gradient boosting machine learning models in GAUSS. The <a href="https://github.com/aptech/gxgboost" rel="noopener noreferrer" target="_blank">gxgboost</a> package provides a GAUSS wrapper for the popular <a href="https://www.kdd.org/kdd2016/papers/files/rfp0697-chenAemb.pdf">XGBoost algorithm</a> (Chen and Guestrin, 2016). Available free download and installation using the GAUSS Package Manager.</td>
</tr>
<tr>
<td><a href="https://github.com/aptech/tspdlib" rel="noopener noreferrer" target="_blank">TSPDLIB</a></td><td>GAUSS time series and panel unit root tests compiled by Saban Nazlioglu. Available free download and installation using the GAUSS Package Manager.</td>
</tr>
</table>
<h2 id="where-can-i-find-gauss-packages">Where can I find GAUSS packages?</h2>
<p>GAUSS packages are available from Aptech maintained sites and user maintained sources.</p>
<p>From Aptech you can:</p>
<ol>
<li>Purchase application packages from the <a href="https://store.aptech.com/gauss-applications-category.html" rel="noopener noreferrer" target="_blank">Aptech product page</a>.</li>
<li>Browse, download, and install open-source packages using the <a href="https://www.aptech.com/blog/gauss-package-manager-basics/" rel="noopener noreferrer" target="_blank">GAUSS Package Manager.</a>.</li>
</ol>
<div class="alert alert-info" role="alert">The GAUSS Package Manager lists names of available GAUSS packages. To learn more about the capabilities of different GAUSS Packages,  refer to the <a href="https://docs.aptech.com/gauss/applications.html" rel="noopener noreferrer" target="_blank">GAUSS Applications Page</a>. </div>
<h2 id="how-do-i-install-a-gauss-package">How do I install a GAUSS package?</h2>
<p>Nearly all GAUSS packages can be easily installed using the <strong>GAUSS Package Manager</strong>. Introduced in GAUSS version 20, the <strong>Package Manager</strong> simplifies managing GAUSS packages by allowing you to download, install, and remove them directly without ever leaving GAUSS. </p>
<h3 id="step-by-step-installation-using-the-gauss-package-manager">Step-by-Step installation using the GAUSS Package Manager</h3>
<ol>
<li>Select <strong>Tools &gt; Package Manager</strong> to open the <strong>Installed Packages</strong> window shown below:
<a href="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-press-install.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/gauss-package-manager-press-install.jpg" alt="" width="502" height="351" class="aligncenter size-full wp-image-21111" /></a>
<br/>
As the name implies, it will list all the packages you have previously installed. If you have not installed any packages, the window will be blank as we see above.</li>
<li>Click the plus icon (<code>+</code>) on the top right of the <strong>Installed Packages</strong> window to open the <strong>Repository Packages</strong> window.</li>
<li>Click the name of an available package from the list in the <strong>Repository Packages</strong> window.
<a href="https://www.aptech.com/wp-content/uploads/2019/11/install-gauss-package-bet-1.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/11/install-gauss-package-bet-1.jpg" alt="" width="649" height="443" class="aligncenter size-full wp-image-21121" /></a></li>
<li>Click the <em>Install Package</em> button on the bottom-left.</li>
<li>Click <em>Close</em> when the package has finished installing.
<a href="https://www.aptech.com/wp-content/uploads/2019/11/package-installed.png"><img src="https://www.aptech.com/wp-content/uploads/2019/11/package-installed.png" alt="" width="600" height="102" class="aligncenter size-full wp-image-21126" /></a></li>
</ol>
<div class="alert alert-info" role="alert">To learn more about how to Get Started with the <strong>GAUSS Package Manager</strong>, see our blog, <a href="https://www.aptech.com/blog/gauss-package-manager-basics/" rel="noopener noreferrer" target="_blank">&quot;GAUSS Package Manager Basics&quot;</a></div>
<h3 id="the-applications-installer-wizard">The Applications Installer Wizard</h3>
<p>In the case that a package cannot be installed using the <strong>GAUSS Package Manager</strong>, the <a href="https://www.aptech.com/support/installation/using-the-applications-installer-wizard/" rel="noopener noreferrer" target="_blank">GAUSS Applications Installer Wizard</a> should be used. </p>
<h3 id="video-instructions">Video instructions</h3>
<div style="text-align:center">
<div display="inline-block">
<iframe width="560" height="315" src="https://www.youtube.com/embed/JxnfJRZEopg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
<h3 id="step-by-step-installation-using-the-gauss-applications-installer-wizard">Step-by-Step installation using the GAUSS Applications Installer Wizard</h3>
<ol>
<li>Download the package zipped folder.</li>
<li>Select <b>Tools &gt; Install Application</b> from the main GAUSS menu.
<a href="https://www.aptech.com/wp-content/uploads/2018/11/tools-install-application.png"><img src="https://www.aptech.com/wp-content/uploads/2018/11/tools-install-application.png" alt="GAUSS Applications Installer." width="391" height="284" class="aligncenter size-full wp-image-18513" /></a></li>
<li>Follow the installer prompts, making sure to navigate to the proper zipped folder associated with the package.</li>
</ol>
<h2 id="what-is-included-in-a-gauss-package">What is included in a GAUSS package?</h2>
<p>GAUSS packages are made up of a number of files which can include:</p>
<ul>
<li>Source code files</li>
<li>Example files</li>
<li>Support documents</li>
<li>Library definition files</li>
<li>Miscellaneous support files</li>
</ul>
<p>The source code, example, and document files will be the most relevant for using a package.</p>
<h3 id="source-code">Source code</h3>
<p><b>What is source code</b>?
A package's source code is a collection of files that contain the definitions of the GAUSS procedures and structures included in the package.</p>
<p><b>Where can I find a package's source code after installation?</b>
Once a package is installed using the <strong>GAUSS Package Manager</strong>, the source code will be located in the <b>pkgs &gt; <em>packagename</em> &gt; src</b> folder under your GAUSS home directory.</p>
<p>For example, if your GAUSS home directory is <code>C:\gauss</code> after installation of the <a href="https://docs.aptech.com/gauss/tspdlib/docs/tspdlib-landing.html" rel="noopener noreferrer" target="_blank">tspdlib library</a> the source code will be found in the <code>C:\gauss\pkgs\tspdlib\src</code> directory.</p>
<p>You can easily navigate to a source code file from an installed library using the <strong>GAUSS Library Tool</strong>. Simply:</p>
<ol>
<li>Find the library name on the list of installed libraries.</li>
<li>Expand the list of source code files included in the library by clicking on the arrow next to the library name.</li>
<li>Double-click on the file you want to view and the file will open in the <strong>GAUSS Program Editor</strong>.
<a href="https://www.aptech.com/wp-content/uploads/2019/08/tspdlib-open-file-from-libtool.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/tspdlib-open-file-from-libtool.jpg" alt="Open GAUSS source code file from the Library Tool." width="913" height="436" class="aligncenter size-full wp-image-20609" /></a></li>
</ol>
<h3 id="examples">Examples</h3>
<p><b>What are example files?</b>
Example files are <a href="https://www.aptech.com/resources/tutorials/introduction-to-gauss-running-a-program-file/" rel="noopener noreferrer" target="_blank">GAUSS program files</a>that demonstrate how to use the procedures included in a GAUSS package.</p>
<p><b>Where can I find a package's examples after installation?</b>
Once a package is installed using the <strong>GAUSS Package Manager</strong>, the examples will be located in the <b>pkgs &gt; <em>packagename</em> &gt; examples</b> folder located under your GAUSS home directory.</p>
<p>Continuing our previous example, if your GAUSS home directory is <code>C:\gauss</code> after installation of the <a href="https://docs.aptech.com/gauss/tspdlib/docs/tspdlib-landing.html" rel="noopener noreferrer" target="_blank">tspdlib library</a> the examples will be found in the <code>C:\gauss\pkgs\tspdlib\examples</code> folder.</p>
<p>You can easily create a shortcut for navigating to example files by adding the directory for a package to your <strong>GAUSS Project Folders Window</strong>.</p>
<h3 id="documents">Documents</h3>
<p><b>What are document files?</b>
Document files can be one of a number of different types of files that provide general descriptions and instructions for using a GAUSS package. These are not always included with a package.</p>
<p><b>Where can I find a package's documents after installation?</b>
A large number of packages have online documentation available, including examples and command references. You can find these documents on the <a href="https://docs.aptech.com/gauss/applications.html" rel="noopener noreferrer" target="_blank">GAUSS Applications Page</a>.
If a package has additional documents beyond those available online, they will generally be contained in the <b>pkgs &gt; <em>packagename</em> &gt; docs</b> directory, under your GAUSS home folder.</p>
<h2 id="how-do-i-use-a-gauss-package">How do I use a GAUSS package?</h2>
<p>GAUSS packages provide procedures that are built to be called from the command line or in program files. In order to use these procedures:</p>
<ol>
<li>The package must be properly installed and the library must be properly built.</li>
<li>The library must be loaded.</li>
</ol>
<p>There are a number of ways to load a GAUSS library:</p>
<ul>
<li>Navigate to the <strong>Library Tool</strong> and click the gear symbol next to the library name. Select <code>load library</code> from the menu:
<a href="https://www.aptech.com/wp-content/uploads/2019/08/load-library-from-library-tool.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/load-library-from-library-tool.jpg" alt="Load a GAUSS library from the Library Tool." width="364" height="241" class="aligncenter size-full wp-image-20611" /></a></li>
<li>Enter the command <code>library libraryname</code> in the input/output window. For example, if you want to load the TSPDLIB library you would enter <code>library tspdlib</code>.</li>
<li>Put the line <code>library libraryname;</code> at the beginning of your program file. For example, if you want to load the TSPDLIB library you add the line <code>library tspdlib;</code> to the top of the file.</li>
</ul>
<h3 id="what-should-i-do-with-source-code">What should I do with source code?</h3>
<p>Generally, nothing should be done with source code once it is installed. Since altering source code can break the procedures included in a library, it should only be done by experienced GAUSS users. However, advanced users are welcome to modify the code to meet their needs.</p>
<p>If source code is well annotated with comments, you may find it helpful to look at the source code to learn more about how to use a specific procedure or what a procedure is doing.</p>
<p>As an example, let's consider the <code>adf.src</code> file from the TSPDLIB library. It contains a header which describes how to call the <code>adf</code> procedure followed by the definition of the <a href="https://docs.aptech.com/gauss/tspdlib/docs/adftspd.html" rel="noopener noreferrer" target="_blank">adf</a> procedure:
<a href="https://www.aptech.com/wp-content/uploads/2019/08/adf-source-code.jpg"><img src="https://www.aptech.com/wp-content/uploads/2019/08/adf-source-code.jpg" alt="GAUSS source code file." width="576" height="439" class="aligncenter size-full wp-image-20612" /></a></p>
<h3 id="what-should-i-do-with-example-files">What should I do with example files?</h3>
<p>Example files are provided to help you learn how to use functions properly and efficiently.</p>
<p>To get the most from the examples in a package:</p>
<ol>
<li><b>Review</b> example files to learn how to call and use procedures contained in a package.</li>
<li><b>Run</b> examples files to learn more about what happens when you call procedures and how the output is returned.</li>
<li><b>Copy and paste</b> the code from the example files to use as templates for your projects.</li>
</ol>
<h3 id="video-run-a-gauss-package-example">Video: Run a GAUSS package example</h3>
<div style="text-align:center">
<div display="inline-block">
<iframe width="560" height="315" src="https://www.youtube.com/embed/PIWpU48kSAY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
<h3 id="conclusion">Conclusion</h3>
<p>Today's comprehensive GAUSS package guide covers what you need to know to get the most out of GAUSS packages.</p>
<p>After today you should know:</p>
<ul>
<li>What a GAUSS package is.</li>
<li>Where to find GAUSS packages.</li>
<li>What is included in a GAUSS package.</li>
<li>How to use GAUSS packages.</li>
</ul>
<h3 id="further-reading">Further Reading</h3>
<ol>
<li><a href="https://www.aptech.com/blog/running-publicly-available-gauss-code-part-1/" target="_blank" rel="noopener">Running publicly available GAUSS code: Part 1</a></li>
<li><a href="https://www.aptech.com/blog/running-publicly-available-gauss-code-part-2/" target="_blank" rel="noopener">Running publicly available GAUSS code: Part 2</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/gauss-package-manager-basics/" target="_blank" rel="noopener">GAUSS Package Manager Basics</a></li>
<li><a href="https://www.aptech.com/blog/understanding-errors-g0025-undefined-symbol/" target="_blank" rel="noopener">Understanding Errors | G0025 : Undefined symbol</a></li>
</ol>
<p></p>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/using-gauss-packages-complete-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GAUSS Basics 3: Introduction to matrices</title>
		<link>https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/</link>
					<comments>https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Mon, 25 Mar 2019 18:19:14 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[concatenation]]></category>
		<category><![CDATA[gauss basics]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[matrices]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=19924</guid>

					<description><![CDATA[Learn how to work with matrices, the building block of the GAUSS programming language, in this third video in our GAUSS Basics series. Today we will explore how to:
<ul>
<li>Create matrices.</li>
<li>Find their size.</li>
<li>Access specific elements with indexing.</li>
<li>Grow matrices with matrix concatenation.</li>
</ul>]]></description>
										<content:encoded><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/zdnMw97E-9E" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<h2 id="introduction">Introduction</h2>
<p>This third video in our GAUSS Basics series will show you how to:</p>
<ol>
<li>Create matrices.</li>
<li>Find their size.</li>
<li>Access specific elements with indexing.</li>
<li>Grow them with matrix concatenation.</li>
</ol>
<h2 id="timeline">Timeline</h2>
<p><a href="https://www.youtube.com/watch?v=zdnMw97E-9E&t=32s" target="_blank" rel="noopener">0:00</a> Matrix declarations.<br />
<a href="https://www.youtube.com/watch?v=zdnMw97E-9E&t=100s" target="_blank" rel="noopener">1:40</a> Matrix Indexing.<br />
<a href="https://www.youtube.com/watch?v=zdnMw97E-9E&t=168s" target="_blank" rel="noopener">2:48</a> Matrix Concatenation.  </p>
<h2 id="the-gauss-basics-video-series">The GAUSS Basics Video Series</h2>
<ol>
<li><a href="https://www.aptech.com/blog/gauss-basics-interactive-commands/" target="_blank" rel="noopener">GAUSS Basics: Interactive commands</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-4-matrix-operations/" target="_blank" rel="noopener">GAUSS Basics 4: Matrix operations</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-5-element-by-element-conformability/" target="_blank" rel="noopener">GAUSS Basics 5: Element-by-element conformability</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-6-logical-and-relational-operators/" target="_blank" rel="noopener">GAUSS Basics 6: Logical and relational operators</a></li>
<li><a href="https://youtu.be/XysUVSWPzrg?si=t1nZj8lyqtS505du" target="_blank" rel="noopener">GAUSS Basics 7: Conditional Statements</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GAUSS Basics 2: Running a program</title>
		<link>https://www.aptech.com/blog/gauss-basics-2-running-a-program/</link>
					<comments>https://www.aptech.com/blog/gauss-basics-2-running-a-program/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Mon, 11 Mar 2019 21:14:59 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[gauss basics]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=19672</guid>

					<description><![CDATA[This second video in our new GAUSS basics series shows you how to create and run a GAUSS program. ]]></description>
										<content:encoded><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/TN__Agc8q_8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<h2 id="introduction">Introduction</h2>
<p>This second video in our new GAUSS Basics series will show you how to:</p>
<ol>
<li>Create and run a GAUSS program.</li>
<li>Use recommended file extensions.</li>
<li>Create and print strings.</li>
<li>Add code comments.</li>
</ol>
<h2 id="timeline">Timeline</h2>
<p><a href="https://www.youtube.com/watch?v=TN__Agc8q_8&t=0s" target="_blank" rel="noopener">0:00</a> Introduction.<br />
<a href="https://www.youtube.com/watch?v=TN__Agc8q_8&t=27s" target="_blank" rel="noopener">0:27</a> Creating a program file.<br />
<a href="https://www.youtube.com/watch?v=TN__Agc8q_8&t=134s" target="_blank" rel="noopener">2:14</a> Running a program file.  </p>
<h2 id="the-gauss-basics-video-series">The GAUSS Basics Video Series</h2>
<ol>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/" target="_blank" rel="noopener">GAUSS Basics 3: Introduction to matrices</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-4-matrix-operations/" target="_blank" rel="noopener">GAUSS Basics 4: Matrix operations</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-5-element-by-element-conformability/" target="_blank" rel="noopener">GAUSS Basics 5: Element-by-element conformability</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-6-logical-and-relational-operators/" target="_blank" rel="noopener">GAUSS Basics 6: Logical and relational operators</a></li>
<li><a href="https://youtu.be/XysUVSWPzrg?si=t1nZj8lyqtS505du" target="_blank" rel="noopener">GAUSS Basics 7: Conditional Statements</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/gauss-basics-2-running-a-program/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>GAUSS Basics: Interactive commands</title>
		<link>https://www.aptech.com/blog/gauss-basics-interactive-commands/</link>
					<comments>https://www.aptech.com/blog/gauss-basics-interactive-commands/#respond</comments>
		
		<dc:creator><![CDATA[aptech]]></dc:creator>
		<pubDate>Fri, 01 Mar 2019 15:15:45 +0000</pubDate>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[gauss basics]]></category>
		<category><![CDATA[gauss intro]]></category>
		<guid isPermaLink="false">https://www.aptech.com/?p=19649</guid>

					<description><![CDATA[This is the first video in our new GAUSS Basics series. This series is designed to teach you everything you need to know to be productive with GAUSS. This video covers interactive commands and is designed to be your first step in GAUSS!]]></description>
										<content:encoded><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/Ag4eiaapr4w" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<h3 id="introduction">Introduction</h3>
<p>This is the first video in our new GAUSS Basics series. This series is designed to teach you everything you need to know to be productive with GAUSS.</p>
<p>This video is designed to be your first step in GAUSS! Learn how to:</p>
<ol>
<li>Create variables.</li>
<li>Use arithmetic operators.</li>
<li>Enter interactive commands.</li>
<li>View the variables in your workspace.</li>
<li>Print output.</li>
</ol>
<h3 id="timeline">Timeline</h3>
<p><a href="https://www.youtube.com/watch?v=Ag4eiaapr4w&t=1s" target="_blank" rel="noopener">0:00</a> Introduction.<br />
<a href="https://www.youtube.com/watch?v=Ag4eiaapr4w&t=8s" target="_blank" rel="noopener">0:08</a> Arithmetic operators.<br />
<a href="https://www.youtube.com/watch?v=Ag4eiaapr4w&t=160s" target="_blank" rel="noopener">2:40</a> Variable names.  </p>
<h3 id="the-gauss-basics-video-series">The GAUSS Basics Video Series</h3>
<ol>
<li><a href="https://www.aptech.com/blog/gauss-basics-2-running-a-program/" target="_blank" rel="noopener">GAUSS Basics 2: Running a program</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-3-introduction-to-matrices/" target="_blank" rel="noopener">GAUSS Basics 3: Introduction to matrices</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-4-matrix-operations/" target="_blank" rel="noopener">GAUSS Basics 4: Matrix operations</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-5-element-by-element-conformability/" target="_blank" rel="noopener">GAUSS Basics 5: Element-by-element conformability</a></li>
<li><a href="https://www.aptech.com/blog/gauss-basics-6-logical-and-relational-operators/" target="_blank" rel="noopener">GAUSS Basics 6: Logical and relational operators</a></li>
<li><a href="https://youtu.be/XysUVSWPzrg?si=t1nZj8lyqtS505du" target="_blank" rel="noopener">GAUSS Basics 7: Conditional Statements</a></li>
</ol>]]></content:encoded>
					
					<wfw:commentRss>https://www.aptech.com/blog/gauss-basics-interactive-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
