public class PanelData extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
PanelData.Row
This is one row of the data in a panel.
|
static interface |
PanelData.Transformation
Transforms the data, e.g., taking log.
|
| Constructor and Description |
|---|
PanelData(String subjectHeader,
String timeHeader,
String[] headers)
Constructs a panel of two-dimensional data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(PanelData.Row row)
Inserts a row of data into the panel.
|
void |
addRow(String subject,
String time,
double... values)
Inserts a row of data into the panel.
|
String[] |
getExtHeaders()
Gets the extended headers, including the subject and time headers.
|
String |
getExtHeadersString()
Gets the extended headers, including the subject and time headers.
|
static double[][] |
getFactorValues(List<PanelData.Row> rows,
String[] headers)
Gets the factor values from a panel data.
|
static double[][] |
getFactorValues(List<PanelData.Row> rows,
String[] headers,
PanelData.Transformation[] transformations)
Gets the factor values from a panel data.
|
String[] |
getHeaders()
Gets the headers, excluding the subject and time headers.
|
String |
getHeadersString()
Gets the extended headers, including the subject and time headers.
|
PanelData.Row |
getRow(String subject,
String time)
Gets one particular row indexed by a pair of subject and time.
|
List<PanelData.Row> |
getRows()
Gets all of the panel data.
|
List<PanelData.Row> |
getRowsForSubject(String subject)
Get all the rows pertaining to a particular subject.
|
List<String> |
getSubjects()
Gets the name of all subjects.
|
boolean |
isBalanced()
Checks if the panel is balanced.
|
int |
size()
Get the number of rows in the panel.
|
String |
toString() |
public void addRow(String subject, String time, double... values)
subject - the subjecttime - the timevalues - the row datapublic void addRow(PanelData.Row row)
row - a rowpublic int size()
public boolean isBalanced()
true if the panel is balancedpublic String[] getExtHeaders()
public String getExtHeadersString()
public String[] getHeaders()
public String getHeadersString()
public List<PanelData.Row> getRows()
public List<PanelData.Row> getRowsForSubject(String subject)
subject - the subjectpublic PanelData.Row getRow(String subject, String time)
subject - the subjecttime - the timepublic List<String> getSubjects()
public static double[][] getFactorValues(List<PanelData.Row> rows, String[] headers, PanelData.Transformation[] transformations)
rows - the panel data.headers - the factors to be extractedtransformations - the transformation to be applied to the factor valuespublic static double[][] getFactorValues(List<PanelData.Row> rows, String[] headers)
rows - the panel data.headers - the factors to be extractedCopyright © 2010-2016 Numerical Method Incorporation Limited. All Rights Reserved.