newpsyFitset: Creates an instance of a psyFitset object

Description Usage Arguments Value See Also Examples

View source: R/nlregVL.R

Description

Creates an instance of a psyFitset object

Usage

1
newpsyFitset(type = "CG", xx, pp, getPred, residFun, fnJacob, fnStart)

Arguments

type

string expliciting which of three available fitting functions will be used. "CG" for cumulative Gaussian, "LN" for lognormal and "PL" for pseudologistic.

xx

quantity on the x axis (e.g. duration). Must be a vector of numerics

pp

quantity on the y axis (e.g. proportion of long responses). Must be a vector of numerics AND of the same length as xx.

getPred

Function that returns the predicted value.

residFun

Function that returns the residuals.

fnJacob

Function that returns the jacobian of the function to be fitted.

fnStart

Function that returns the starting parameters.

Value

A psyFitset object for furture fitting.

See Also

psyFitset-class

Examples

1
2
3
4
5
6
7
8
data("exampleData",package="nlregVL")
setkey(exampleData,Sub)
setkey(exampleData,Sub)
xx<-exampleData[J("TP01")][,Duration]
nbb1<-exampleData[J("TP01"),Nb1]
nbb3<-exampleData[J("TP01"),Nb3]
pp<-nbb3/(nbb1+nbb3)
result<-nlregVL::newpsyFitset(xx = xx,pp = pp)

VinLaflamme/nlregVL documentation built on May 30, 2019, 2:04 a.m.