[R] bptest

Steven McKinney smckinney at bccrc.ca
Sat Sep 25 04:24:36 CEST 2010


Hi Rob,

I googled "cran bptest"
and the first hit was for package "lmtest".

I installed lmtest, loaded it up, and bptest is available there.

> require("lmtest")
Loading required package: lmtest
Loading required package: zoo
> bptest
function (formula, varformula = NULL, studentize = TRUE, data = list()) ...


So see if you can get package lmtest.

HTH

Cheers


Steven McKinney

________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of robm [r.malpass at ntlworld.com]
Sent: September 24, 2010 6:53 AM
To: r-help at r-project.org
Subject: [R] bptest

Hi

I'm very new to R but have plenty of experience with statistics and other
packages like SPSS, SAS etc.

I have a dataset of around 20 columns and 200 rows.   I'm trying to fit a
very simple linear model between two variables.   Having done so, I want to
test the model for heteroscedasticity using the Breusch-Pagan test.
Apparently this is easy in R by simply doing

bptest(modelCH, data=KP)

I've tried this but I'm told it cannot find function bptest.   It's here
where I'm struggling.   I'm probably wrong but as far as I can see, bptest
is part of the lm package which, as far as I know, I have installed.

Irrespective of the fact I'm not sure how to tell bptest which is the
dependent and explanatory variables - there's a more fundamental problem if
it can't find the bptest function.

I have searched the documentation - albeit briefly so if anyone could help
I'd be very grateful

Rob

QBE Management
--
View this message in context: http://r.789695.n4.nabble.com/bptest-tp2553506p2553506.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.



More information about the R-help mailing list