Defines the model to be used in analysis.

Share:

Description

Allows definition of a model of class "dat" to be used in analysis. The arguments specify the model.

Usage

1

Arguments

...

specify the model class via the character string e.g., kin-class or spec and any of the slots associated with that model type (which is a subclass of class dat, so that all slots in dat may also be specified), e.g., mod_type = "kin" will initialize a model with class kin, for a kinetic model.

Details

For examples, see the help files for dat-class and fitModel

Value

an object of class dat with the sub-class given by the value of the mod_type input.

Author(s)

Katharine M. Mullen, Ivo H. M. van Stokkum

See Also

dat-class, kin-class, spec-class, fitModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
##############################
## READ IN PSI 1
##############################

data(denS4)

##############################
## PREPROCESS PSI 1
##############################

denS4<-preProcess(data = denS4, scalx2 = c(3.78, 643.5))

##############################
## READ IN PSI 2
##############################

data(denS5)

##############################
## PREPROCESS PSI 2
##############################

denS5<-preProcess(data = denS5, scalx2 = c(3.78, 643.5))

##############################
## DEFINE INITIAL MODEL
##############################

model1<- initModel(mod_type = "kin", 
kinpar= c(7.9, 1.08, 0.129, .0225, .00156) , 
irfpar=c( -.1018, 0.0434), 
disptau=FALSE, dispmu=TRUE, parmu = list(c(.230)), 
lambdac = 650,
seqmod=TRUE,
positivepar=c("kinpar"),
title="S4", 
cohspec = list( type = "irf"))

## Not run: 

##############################
## FIT INITIAL MODEL
##############################

denRes1 <- fitModel(data=list(denS4, denS5), list(model1), 
opt=kinopt(iter=5, divdrel = TRUE, linrange = .2,
makeps = "den1", selectedtraces = c(1,5,10), plotkinspec =TRUE,
output="pdf", xlab = "time (ps)", ylab = "wavelength"))

##############################
## REFINE INITIAL MODEL, RE-FIT
## adding some per-dataset parameters 
##############################

denRes2 <- fitModel(data = list(denS4, denS5), modspec = list(model1),
modeldiffs = list(dscal = list(list(to=2,from=1,value=.457)), 
free = list(
list(what = "irfpar", ind = 1, dataset = 2, start=-.1932),
list(what = "kinpar", ind = 5, dataset = 2, start=.0004), 
list(what = "kinpar", ind = 4, dataset = 2, start= .0159)
)),
opt=kinopt(iter=5, divdrel = TRUE, linrange = .2,
xlab = "time (ps)", ylab = "wavelength", output="pdf",
makeps = "den2", selectedtraces = c(1,5,10)))

##############################
## REFINE MODEL FURTHER AS NEW MODEL OBJECT 
##############################

model2 <- initModel(mod_type = "kin", 
kinpar= c(7.9, 1.08, 0.129, .0225, .00156), 
irfpar=c( -.1018, 0.0434), 
parmu = list(c(.230)), 
lambdac = 650,
positivepar=c("kinpar", "coh"), 
cohspec = list( type = "seq", start = c(8000, 1800)))

##############################
## FIT NEW MODEL OBJECT
##############################

denRes3 <- fitModel(data = list(denS4, denS5), list(model2),
modeldiffs = list(dscal = list(list(to=2,from=1,value=.457)), 
free = list(
list(what = "irfpar", ind = 1, dataset = 2, start=-.1932),
list(what = "kinpar", ind = 5, dataset = 2, start=.0004), 
list(what = "kinpar", ind = 4, dataset = 2, start= .0159)
)),
opt=kinopt(iter=5, divdrel = TRUE, linrange = .2,
makeps = "den3", selectedtraces = c(1,5,10), plotkinspec =TRUE, 
stderrclp = TRUE, kinspecerr=TRUE, output="pdf",
xlab = "time (ps)", ylab = "wavelength", 
breakdown = list(plot=c(643.50, 658.62, 677.5))))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.