Re: [R] Interpreting Results from LOF.test() from qpcR package

2023-08-20 Thread Bert Gunter
I would suggest that a simple plot of residuals vs. fitted values and
perhaps plots of residuals vs. the independent variables are almost always
more useful than omnibus LOF tests. (many would disagree!) However,as Ben
noted, this is wandering outside R-Help's strict remit, and you would be
better served by statistics discussion/help sites rather than R-Help.
Though with this small a data set and this complex a model, I would be
surprised if there could be LOF unless it were glaringly obvious from
simple plots.

Cheers,
Bert



-- Bert

On Sun, Aug 20, 2023 at 6:02 PM Paul Bernal  wrote:

> I am using LOF.test() function from the qpcR package and got the following
> result:
>
> > LOF.test(nlregmod3)
> $pF
> [1] 0.97686
>
> $pLR
> [1] 0.77025
>
> Can I conclude from the LOF.test() results that my nonlinear regression
> model is significant/statistically significant?
>
> Where my nonlinear model was fitted as follows:
> nlregmod3 <- nlsr(formula=y ~ theta1 - theta2*exp(-theta3*x), data =
> mod14data2_random,
>   start = list(theta1 = 0.37,
>theta2 = -exp(-1.8),
>theta3 = 0.05538))
> And the data used to fit this model is the following:
> dput(mod14data2_random)
> structure(list(index = c(14L, 27L, 37L, 33L, 34L, 16L, 7L, 1L,
> 39L, 36L, 40L, 19L, 28L, 38L, 32L), y = c(0.44, 0.4, 0.4, 0.4,
> 0.4, 0.43, 0.46, 0.49, 0.41, 0.41, 0.38, 0.42, 0.41, 0.4, 0.4
> ), x = c(16, 24, 32, 30, 30, 16, 12, 8, 36, 32, 36, 20, 26, 34,
> 28)), row.names = c(NA, -15L), class = "data.frame")
>
> Cheers,
> Paul
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] Interpreting Results from LOF.test() from qpcR package

2023-08-20 Thread Ben Bolker
  The p-values are non-significant by any standard cutoff (e.g. 
p<=0.05, p<=0.1) but note that this is a *lack-of-fit* test -- i.e., 
"does my function fit the data well enough?", **not** a "significant 
pattern" test (e.g., "does my function fit the data better than a 
reasonable null model?").  In other words, this test tells you that you 
*can't* reject the null hypothesis that the model is "good enough" in 
some sense.


  To test against a constant null model, you could do

nullmod <- nlsr(y ~ const,
data = mod14data2_random,
start = list(const = 0.45))
anova(nlregmod3, nullmod)


  (This question seems to be verging on "general question about 
statistics" rather than "question about R", so maybe better for a venue 
like https://stats.stackexchange.com ??)


On 2023-08-20 9:01 p.m., Paul Bernal wrote:

I am using LOF.test() function from the qpcR package and got the following
result:


LOF.test(nlregmod3)

$pF
[1] 0.97686

$pLR
[1] 0.77025

Can I conclude from the LOF.test() results that my nonlinear regression
model is significant/statistically significant?

Where my nonlinear model was fitted as follows:
nlregmod3 <- nlsr(formula=y ~ theta1 - theta2*exp(-theta3*x), data =
mod14data2_random,
   start = list(theta1 = 0.37,
theta2 = -exp(-1.8),
theta3 = 0.05538))
And the data used to fit this model is the following:
dput(mod14data2_random)
structure(list(index = c(14L, 27L, 37L, 33L, 34L, 16L, 7L, 1L,
39L, 36L, 40L, 19L, 28L, 38L, 32L), y = c(0.44, 0.4, 0.4, 0.4,
0.4, 0.43, 0.46, 0.49, 0.41, 0.41, 0.38, 0.42, 0.41, 0.4, 0.4
), x = c(16, 24, 32, 30, 30, 16, 12, 8, 36, 32, 36, 20, 26, 34,
28)), row.names = c(NA, -15L), class = "data.frame")

Cheers,
Paul

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


[R] Interpreting Results from LOF.test() from qpcR package

2023-08-20 Thread Paul Bernal
I am using LOF.test() function from the qpcR package and got the following
result:

> LOF.test(nlregmod3)
$pF
[1] 0.97686

$pLR
[1] 0.77025

Can I conclude from the LOF.test() results that my nonlinear regression
model is significant/statistically significant?

Where my nonlinear model was fitted as follows:
nlregmod3 <- nlsr(formula=y ~ theta1 - theta2*exp(-theta3*x), data =
mod14data2_random,
  start = list(theta1 = 0.37,
   theta2 = -exp(-1.8),
   theta3 = 0.05538))
And the data used to fit this model is the following:
dput(mod14data2_random)
structure(list(index = c(14L, 27L, 37L, 33L, 34L, 16L, 7L, 1L,
39L, 36L, 40L, 19L, 28L, 38L, 32L), y = c(0.44, 0.4, 0.4, 0.4,
0.4, 0.43, 0.46, 0.49, 0.41, 0.41, 0.38, 0.42, 0.41, 0.4, 0.4
), x = c(16, 24, 32, 30, 30, 16, 12, 8, 36, 32, 36, 20, 26, 34,
28)), row.names = c(NA, -15L), class = "data.frame")

Cheers,
Paul

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.