coe_comp: Compare the fitted coe from different fittings

Description Usage Arguments Examples

Description

The idea is that if you use two different subsets of data to fit the double weibull models by stbs_duration, will these two sets of fitted parameters correleated given the same duration, or are they pretty much random? If they are random, we will be able to use a smoother to further summerize them.

One "mistake" you made here is that, if you want to see if a smoother is appropriate, then you should analyse the correlation of the coe's after adjusted with the smoother, which typically means analyse the residuals after smoothing rather than the raw coe's. Luckily the smoother here you encountered are failry flat, otherwise you can still see a good correlation even if a smoother is appropriate.

Usage

1
2
3
4
coe_comp(coe_1, coe_2, para = "all", 
    range = c(max(min(coe_1$length), min(coe_2$length)), 
              min(max(coe_1$length), max(coe_2$length))), 
    legend = c("coe_1", "coe_2"))

Arguments

coe_1

A data frame with the frist three variables as length, para, estimates. It couble be coe_lm$nls_fitting_all, or read.csv from the coe_sum csv output.

coe_2

The same as coe_1, just the second fit

para

Default is "all" means the 4 parameters are compared at the same time. If you want to look closer for "a1", you putpare="a1". Or "a2", "b1", "b2".

range

The range of the duratiosn you want to check, such as range=c(30, 200).

legend

For labeling the legend, you can change the default to make more sense.

Examples

1
2
3
4
#Note that coe_1 and coe_2 are exactly the same thing in this special example.
  coelm_FEB_5KS30_non_wkday <- coe_lm(mat=feb_5k_3d ,picked=30:300,
                                    func=double.weibull.b, xlabel="Length")
  coe_comp(coe_1=coelm_FEB_5KS30_non_wkday$nls, coelm_FEB_5KS30_non_wkday$nls)

fzwaeustc/pcrfn documentation built on May 16, 2019, 4:06 p.m.