Commit 727d853f authored by Ricco Førgaard's avatar Ricco Førgaard

Added level 5 to the tutorial.

Level 5 is about doing analyis.
parent df469bef
package com.nesstar.tutorial;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
import org.junit.Test;
import com.nesstar.api.Server;
import com.nesstar.api.Study;
import com.nesstar.api.analysis.Table;
/**
* Nesstar API Tutorial Level 5
* ============================
*
* This tutorial is about analysis. You will learn about
* how to do tabulations, regression, and correlation in
* the API.
*
*/
public class Level05 {
private Server server;
private Study study;
/**
* Fetch the Study with ID "some id".
*/
@Before
public void connectToServerAndGetStudy() {
}
/**
* Do a tabulation with one break variable and one
* measure just to get the feel of it.
*/
@Test
public void runSimpleTabulation() {
Table table = null;
assertNotNull(table);
}
/**
* Tabulate the variables Foo and Bar.
* Then retrieve the value of the cell with the coordinates
* Foo.somecategory and Bar.someothercategory
*/
@Test
public void tabulateTwoVariables() {
double cellValue = Double.NaN;
assertEquals(123d, cellValue, 0d);
}
/**
* Do a tabulation using the variable Foo as a break variable
* and Bar as a measure. Use a Statistic to get the sum.
*/
@Test
public void tabulateWithStatistics() {
double cellValue = Double.NaN;
assertEquals(123d, cellValue, 0d);
}
/**
* Run a regression analysis with Foo as the dependent variable
* and Bar and Bas as independent variables. Then retrieve the
* values for case count, significance, R, and standard coefficient.
*/
@Test
public void runRegressionanalysis() {
double caseCount = Double.NaN;
double significance = Double.NaN;
double r = Double.NaN;
double standardCoefficient = Double.NaN;
assertEquals(123d, caseCount, 0d);
assertEquals(123d, significance, 0d);
assertEquals(123d, r, 0d);
assertEquals(123d, standardCoefficient, 0d);
}
/**
* Correlate the variables Foo and Bar and get the case count,
* coefficient, and significance.
*/
@Test
public void runCorrelationAnalysis() {
double caseCount = Double.NaN;
double coefficient = Double.NaN;
double significance = Double.NaN;
assertEquals(123d, caseCount, 0d);
assertEquals(123d, coefficient, 0d);
assertEquals(123d, significance, 0d);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment