Hello,

I want to know if two quadratic regressions are significantly different.
I was advised to make the test using
step 1 bootstrapping both quadratic regressions and get their slope
coefficients.
          (Let's call the slope coefficient *â*^1 and *â*^2)
step 2 use the slope difference *â*^1-*â*^2 and bootstrap the slope
coefficent
step 3   find out the sampling distribution above and calculate the % =0
step 4  multiple the % by 2

However, I am new to the package boot.
I finished writing  code for step 1 as below.
Please kindly advise how to code step 2 and 3.
Thank you.

Elaine

code
require(boot)
function.fit2  <-  function(data,i){
          d  <-  data[i,]   #  select  obs.  in  bootstrap  sample
          fit2 <-lm(logDIS~logBMN+I(logBMN^2), data=dataN)
          coefficients(fit2)   #  return  coefficient  vector
          }

boot.fit2  <-  boot(dataN,  function.fit2,  1000)

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to