[R] Interpretation / Usage of davies.test

Vito M. R. Muggeo vito.muggeo at unipa.it
Mon Feb 17 18:02:26 CET 2014


dear Katie,
Since you are looking for exactly 1 breakpoint (namely you know the 
number of breakpoints), I suggest to use bootstrap restarting (default 
in segmented) with the rough value from davies.test() as a starting 
value, namely

o<-davies.test(reg1.2,~lagBYmean)
start.psi<-as.numeric(o$statistic)
a<-segmented(reg1.2,seg.Z=~lagBYmean ,psi=start.psi, 
control=seg.control(n.boot=100))

If you need some other feedbacks please contact me off list

best,
vito


Il 17/02/2014 15.27, Katharina Mersmann ha scritto:
>
>
>
>
> Hello R-Users,
>
> I have a Problem in understanding my results using the davies.test
>
> I read the pdf-documentation on the segmented package and followed the
> instructions.
>
>
>
> 1st performing the Davies.test :
>
>
>
>> davies.test(reg1.2,~lagBYmean)
>
>
>
>          Davies' test for a change in the slope
>
>
>
> data:  Model =  gaussian , link = identity
>
> formula = num_FCRlong ~ GDP + cupol_GDPpCapita + fort_budget +
> fort_percentDebt + linpol_primSurplus + Inflation + lagBYmean
>
> segmented variable = lagBYmean
>
> `Best' at = 24.4831, n.points = 10, p-value = 0.001242
>
> alternative hypothesis: two.sided
>
>
>
> So the Null can be rejected at 1% level.
>
>
>
> 2nd performing the automatic procedure to estimate breakpoints:
>
>> #### Breakpoint -Estimation
>
>> a<-segmented.lm(reg1.2,seg.Z=~lagBYmean ,psi=list(lagBYmean=NA),
>
> + control=seg.control(stop.if.error=FALSE,n.boot=0))
>
> Warnmeldung:
>
> No breakpoint estimated
>
>
>
> I thought the result of the Davies Test told me thereŽs a change in the
> coefficient slope. So in the next step I want to get to know the
> breakpoint(s),
>
> But the procedure tells me, there is none.
>
> What am I doing wrong? And in which step?
>
>
>
>
>
> Thanks for your attention and help,
>
> Katie M
>
>
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
==============================================
Vito M.R. Muggeo
Dip.to Sc Statist e Matem `Vianelli'
Università di Palermo
viale delle Scienze, edificio 13
90128 Palermo - ITALY
tel: 091 23895240
fax: 091 485726
http://dssm.unipa.it/vmuggeo

28th IWSM
International Workshop on Statistical Modelling
July 8-12, 2013, Palermo
http://iwsm2013.unipa.it




More information about the R-help mailing list