Commit 6fb56f4f authored by Ricco Førgaard's avatar Ricco Førgaard

Sanitized level 5.

parent 16da69a6
......@@ -24,7 +24,7 @@ public class Level05 {
private Study study;
/**
* Fetch the Study with ID "some id".
* Fetch the Study with ID "NSD1907".
*/
@Before
public void connectToServerAndGetStudy() {
......@@ -43,9 +43,11 @@ public class Level05 {
}
/**
* Tabulate the variables Foo and Bar.
* Then retrieve the value of the cell with the coordinates
* Foo.somecategory and Bar.someothercategory
* Tabulate the variables gender (id NSD1907_V65) and
* Confidence in the health care system in Norway
* (id NSD1907_V3).
* Then get the number of cases for 'females' with 'no
* confidence at all.'
*/
@Test
public void tabulateTwoVariables() {
......@@ -55,20 +57,24 @@ public class Level05 {
}
/**
* Do a tabulation using the variable Foo as a break variable
* and Bar as a measure. Use a Statistic to get the sum.
* Do a tabulation using the variable 'Last 12 months: visited or been
* visited by a doctor' (NSD1907_V38) as a break variable and
* 'Age groups' (NSD1907_V68) as the measure.
* Get the sum for people who have visited a doctor very often.
*/
@Test
public void tabulateWithStatistics() {
double cellValue = Double.NaN;
double sum = Double.NaN;
assertEquals(123d, cellValue, 0d);
assertEquals(123d, sum, 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.
* Run a regression analysis with Current marital status (NSD1907_V111)
* as the dependent variable and Highest completed education (NSD1907_V76)
* as independent variable.
*
* Then retrieve the values for case count, significance, R, and standard coefficient.
*/
@Test
public void runRegressionanalysis() {
......@@ -77,15 +83,17 @@ public class Level05 {
double r = Double.NaN;
double standardCoefficient = Double.NaN;
assertEquals(123d, caseCount, 0d);
assertEquals(123d, significance, 0d);
assertEquals(123d, r, 0d);
assertEquals(123d, standardCoefficient, 0d);
assertEquals(841d, caseCount, 0d);
assertEquals(0.0337d, significance, 0.0001d);
assertEquals(0.073d, r, 0.001d);
assertEquals(0.07d, standardCoefficient, 0.01d);
}
/**
* Correlate the variables Foo and Bar and get the case count,
* coefficient, and significance.
* Correlate the variables Age groups (NSD1907_V68) and Has private
* health insurance (NSD1907_V60).
*
* Get the case count, coefficient, and significance.
*/
@Test
public void runCorrelationAnalysis() {
......@@ -93,9 +101,9 @@ public class Level05 {
double coefficient = Double.NaN;
double significance = Double.NaN;
assertEquals(123d, caseCount, 0d);
assertEquals(123d, coefficient, 0d);
assertEquals(123d, significance, 0d);
assertEquals(1834d, caseCount, 0d);
assertEquals(-0.234d, coefficient, 0.01d);
assertEquals(0.0d, significance, 0.0000001d);
}
}
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