Documentation ¶
Index ¶
- func Range(vec []float64) float64
- func Score(x string, grp int, counts [][]float64, rates []float64, va *Variable) float64
- func Serve404(w http.ResponseWriter)
- func ServeError(ctx context.Context, w http.ResponseWriter, err error)
- func StDev(vec []float64) float64
- type Comment
- type DataRecord
- type EncodedProject
- type EncodedProjectView
- type Project
- type ProjectView
- type SharingByProject
- type SharingByUser
- type Variable
- type VariableView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Score ¶
Score calculates the contribution to the overall score if we put a subject with data value `x` into group `grp` for a given variable `va`. `counts` contains the current cell counts for each level x group combination for this variable, `va` contains variable information.
func Serve404 ¶
func Serve404(w http.ResponseWriter)
Serve404 is used when the GET/POST method is mismatched to the handler.
func ServeError ¶
func ServeError(ctx context.Context, w http.ResponseWriter, err error)
Types ¶
type DataRecord ¶
type DataRecord struct { SubjectId string AssignedTime time.Time AssignedGroup string CurrentGroup string Included bool Data []string Assigner string }
DataRecord stores one record of raw data.
type EncodedProject ¶
type EncodedProject struct { Owner string Created time.Time Name string GroupNames []byte Variables []byte Assignments []int Data []byte Bias int Comments []byte Modified time.Time StoreRawData bool RawData []byte NumAssignments int RemovedSubjects []string Open bool SamplingRates []float64 }
EncodedProject is a version of Project that can be stored in the datastore. Appengine datastore doesn't handle structs containing slices of other structs.
type EncodedProjectView ¶
type EncodedProjectView struct { Owner string CreatedDate string CreatedTime string Name string Key string GroupNames []string Index int Assignments []int Data []byte Bias int Comments []*Comment ModifiedDate string ModifiedTime string ModifiedEver bool StoreRawData bool RawData []byte NumAssignments int RemovedSubjects []string Open bool SamplingRates string }
type Project ¶
type Project struct { // The Google id of the project owner. Owner string // The date and time that the project was created. Created time.Time // The name of the project. Name string // The names of the groups GroupNames []string Variables []Variable Assignments []int Data [][][]float64 // Controls the level of determinism in the group assignments Bias int Comments []*Comment // The date and time of the last assignment Modified time.Time // If true, store the individual-level data, otherwise only store aggregates StoreRawData bool // The individual-level data, if stored RawData []*DataRecord // The number of subjects who have had assignments made NumAssignments int RemovedSubjects []string // If true, the project is currently open for enrollment Open bool // The sampling rates for each treatment group. SamplingRates []float64 }
Project stores all information about one project.
type ProjectView ¶
type ProjectView struct { Owner string CreatedDate string CreatedTime string GroupNames string Name string Variables []VariableView Key string Assignments []int Data [][][]float64 Bias string Comments []*Comment ModifiedDate string ModifiedTime string StoreRawData bool RawData []byte NumAssignments int RemovedSubjects []string Open bool SamplingRates string }
ProjectView is a printable version of Project.
type SharingByProject ¶
SharingByProject is a record of all users who have access to a given project.
type SharingByUser ¶
SharingByUser is a record of all projects to which the given user has access.