First load the package lmtest. Then run the bptest.
library(lmtest)
bptest(modelCH)
You don't need to tell the function which variables are explanatory or
dependent. Just give it the fitted model object, and it will sort all
of that out and return the statistic.
Andrew Miles
Department
dear list
I know how to store a regex expression in perl and ruby, no clue on R.
I do read R regex manual , archives, and searched on line,
still I need somebody help me out on how to store a regular expression
in a variable.
Thank you very much
yong
Another option is to use the par() command before executing a plot
command, like so:
par(mfrow=c(2,2))
plot(...)
This will put the next four plots all in the same window.
Andrew Miles
Department of Sociology
Duke University
On Sep 24, 2010, at 10:28 PM, Dennis Murphy wrote:
Which one do
On 09/24/2010 10:41 PM, xin wei wrote:
I am trying to reproduce the nice looking of Mandelbrot demonstrated by R
wiki page by the following code:
library(caTools)# external package providing write.gif function
jet.colors = colorRampPalette(c(#7F, blue, #007FFF, cyan,
#7FFF7F,
On 09/25/2010 03:45 AM, Yong Wang wrote:
dear list
I know how to store a regex expression in perl and ruby, no clue on R.
I do read R regex manual , archives, and searched on line,
still I need somebody help me out on how to store a regular expression
in a variable.
A regex is just a
On Fri, Sep 24, 2010 at 3:21 PM, JoH jh...@york.ac.uk wrote:
Error in
readAsciiGrid(F:/GIS.LandcoverEuropeForRisk/Sept10kmmaps/Sp10KPointID.aux)
:
object 'cellsize' not found
My original data in Arc GIS is have a cell size an i'mm curious as to how to
make sure all the details are
hi, the part with the power function does not work. this is the gute
function in my programm. because i´m not shure on what dependet my power
function gute. and ofcourse the graphik does not work. thnx a lot:)
regards
Kaja
Date: Fri, 24 Sep 2010 19:21:17 -0700
From:
Dear All,
Suppose you are given two distributions (or better: two equally-sized
lists of data); how can you evaluate the difference between them?
I need something like an overlap measure of the two (let us say 0 == no
overlap and 1== complete overlap). I should add that there is a 1-1
On 2010-09-21 8:23, Ivan Calandra wrote:
Dear users,
I would like all the ticks on a boxplot (x and y) to be labeled
I have checked all the par() arguments but couldn't find what I'm
looking for
Here is an example to show it:
df- structure(list(SPECSHOR = structure(c(1L, 1L, 1L, 3L, 3L, 3L,
hi how can i plot now this function??? have to be m= 2??? because of the
dimensions?thanks for ur help
myfun - function(n, m, alpha = .05, seeder = 1000) {
set.seed(seeder)
x - matrix(rnorm(n, 0, 0.5), ncol = m)
y - matrix(rnorm(n, 0, 0.8), ncol = m)
l - diag(cor(x, y))
On Wed, 22 Sep 2010, Alex van der Spek wrote:
plot.ts has an argument yax.flip, plot.zoo does not.
Thanks for the info. I've just added an yax.flip argument to plot.zoo in
the devel version of zoo on R-Forge.
hth,
Z
Is there a way to make the yaxis flip in plot.zoo?
I tried using a
Hi:
On Sat, Sep 25, 2010 at 3:47 AM, Lorenzo Isella lorenzo.ise...@gmail.comwrote:
Dear All,
Suppose you are given two distributions (or better: two equally-sized lists
of data); how can you evaluate the difference between them?
I need something like an overlap measure of the two (let us say
On 09/25/2010 03:23 PM, Rainer M Krug wrote:
Evaluate, for me, does not necessary mean test if they are
significantly different, but rather to quantify the difference. If that
is what you are looking for, you could look at the Earth Movers
Distance, where a package is available at R-forge
I have a small model running under R. This is basically running various
power-law relations on a variable (in this case water level in a river)
changing spatially and through time. I'd like to include some kind of error
propagation to this.
My first intention was to use a kind of monte carlo
On Sat, Sep 25, 2010 at 3:53 PM, Lorenzo Isella lorenzo.ise...@gmail.comwrote:
On 09/25/2010 03:23 PM, Rainer M Krug wrote:
Evaluate, for me, does not necessary mean test if they are
significantly different, but rather to quantify the difference. If that
is what you are looking for, you
Hi
This is OT, but I need it for my simulation in R.
I have a special case for sampling with replacement: instead of sampling
once and replacing it immediately, I sample n times, and then replace all n
items.
So:
N entities
x samples with replacement
each sample consists of n sub-samples
Hi all,
I am difficulty with simple layout of plots in the lattice package
I have created a series of levelplots and would like to plot them to a
single device, but need to reduce the margin areas. This is easily
accomplished with par(oma) and par(mar) in the base graphics package but I
am
G'day Rainer,
On Sat, 25 Sep 2010 16:24:17 +0200
Rainer M Krug r.m.k...@gmail.com wrote:
This is OT, but I need it for my simulation in R.
I have a special case for sampling with replacement: instead of
sampling once and replacing it immediately, I sample n times, and
then replace all n
On 09/25/2010 04:24 PM, Rainer M Krug wrote:
Hi
This is OT, but I need it for my simulation in R.
I have a special case for sampling with replacement: instead of sampling
once and replacing it immediately, I sample n times, and then replace all n
items.
So:
N entities
x samples
ld represent the distance as the proportion of maximum possible
distance, i.e. scaling it to be between 0 and 1.
An example:
A and B have the same length (x), and you calculate the emd(A, B), which
is d.
Now you have to determine the maximum distance between these two:
remembering the analogy
Maayt m.lupker at hotmail.com writes:
[snip]
My first intention was to use a kind of monte carlo routine and run the
model many times by changing the power law parameters. These power laws were
obtained by fitting data points under R. I thus have std error associated to
them: alpha (±da) *
On Sat, Sep 25, 2010 at 6:24 PM, Lorenzo Isella lorenzo.ise...@gmail.comwrote:
ld represent the distance as the proportion of maximum possible
distance, i.e. scaling it to be between 0 and 1.
An example:
A and B have the same length (x), and you calculate the emd(A, B), which
is d.
Now
Is it possible to read jpeg files into R?
If yes please guide, Thanks.. I tried to search many time but failed to do.
Thankis in advance..
with Best Regards,
Malik Shahzad
Visiting Researcher
National Institute of Informatics (NII)
Tokyo, Japan
Doctoral Student
Asian Institute of
Yes
Thank you very much, NICE ONE.
Do you have some interesting references about R (I do know some common books
but may be you have some nice hidden books I have never heard about...
)
--
View this message in context:
On Sat, Sep 25, 2010 at 3:16 PM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
On Sat, Sep 25, 2010 at 3:47 AM, Lorenzo Isella lorenzo.ise...@gmail.com
wrote:
Dear All,
Suppose you are given two distributions (or better: two equally-sized
lists
of data); how can you evaluate the
Malik Shahzad geomalik at live.com writes:
Is it possible to read jpeg files into R?
If yes please guide, Thanks.. I tried to search many time but failed to do.
install.packages(sos)
library(sos)
findFn(read jpeg)
(I initially tried findFn(import jpeg) and didn't
get any hits, then
Clodio Almeida clodioalm at gmail.com writes:
Hi everybody:
[snip]
I obtained the same results for parameters estimates and
standarderrors, by using:
glmer(cens ~ treat + heart + offset(log(SURVT) + (1 | INST),
data=liver, family=poisson)
It's nice that this check works. I would
hey, how can i plot this function?
n=1000
m=2
k=n/m
N=100
myfun - function(n, m, alpha = .05, seeder = 1000) {
l=matrix(0,nrow=m,ncol=N)
for(i in 1:N){
set.seed(i)
for(j in 1:m){
x=rnorm(n,0,0.5)
y=rnorm(n,0,0.8)
l[j,i]=cor((x[(((j-1)*k)+1):(((j-1)*k)+k)]),
(y[(((j-1)*k)+1):(((j-1)*k)+k)]))
}
}
hey, how can i plot this function??? thanks for ur help
n=1000
m=2
k=n/m
N=100
myfun - function(n, m, alpha = .05, seeder = 1000) {
l=matrix(0,nrow=m,ncol=N)
for(i in 1:N){
set.seed(i)
for(j in 1:m){
x=rnorm(n,0,0.5)
y=rnorm(n,0,0.8)
l[j,i]=cor((x[(((j-1)*k)+1):(((j-1)*k)+k)]),
Hi Jethi,
On Sat, Sep 25, 2010 at 3:42 PM, jethi kart...@hotmail.com wrote:
hey, how can i plot this function??? thanks for ur help
I don't really have the time (or inclination, sorry) to look through
your code, but if it relates to your subject line, then there are
several ways to plot 3d
hi steve, thnx for ur reply. but my problem is, that i have a matrix as a
functions value and as a result i get a single number. so how can i plot
this? and it would be nice if u read over my function, because i´m not sure
if it correct. anyway thnx
regards
jethi
--
View this message in
On Sat, 25 Sep 2010, Malik Shahzad wrote:
Is it possible to read jpeg files into R?
If yes please guide, Thanks.. I tried to search many time but failed to do.
On my system ??jpeg gave
ReadImages::read.jpeg Read JPEG file
biOps::readJpeg Read jpeg file
rimage::read.jpeg
Did you look at:
?curve
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
On 2010-09-25 8:59, Jonathan Flowers wrote:
Hi all,
I am difficulty with simple layout of plots in the lattice package
I have created a series of levelplots and would like to plot them to a
single device, but need to reduce the margin areas. This is easily
accomplished with par(oma) and
Dear Sir/Madam,
I have a quick question, which I hope someone can help.
I am using the levels function in R, which helps to summarize the number of
factors that I have in a vector in an ordered manner.
Using an already existing example:
state - c(tas, sa, qld, nsw, nsw, nt, wa, wa,
hey, is there anybody who can help me? its very urgent because i have to
send my bachelor thesis on monday. pls help me
--
View this message in context:
http://r.789695.n4.nabble.com/3D-plot-tp2713818p2713909.html
Sent from the R help mailing list archive at Nabble.com.
Jeffrey,
You can try
as.numeric(state)
[1] 6 5 4 2 2 3 8 8 4 7 2 7 4 4 5 6 5 3 8 7 4 2 2 8 5 1 2 7 7 1
HTH,
Jorge
On Sat, Sep 25, 2010 at 5:51 PM, Jeffrey Cexun Cai wrote:
Dear Sir/Madam,
I have a quick question, which I hope someone can help.
I am using the levels function in
Dear All,
I need to find the (possible multiple) zeros of a function f within an
interval. I gave uniroot a try, but it just returns one zero and I need
to provide it with an interval [a,b] such that f(a)f(b)0.
Is there any function to find the multiple zeros of f in (a,b) without
constraints
I was looking for an example of complex variables in R. This one is trivial,
but rather cute (though World War II aficionados may 'come over all funny').
See if you can guess the image before you try the function. It's not difficult.
jif - function(res = 100) {
z - sample(do.call(complex,
Dear Lorenzo,
You could try the BB package:
# function we need the roots for
fn1 - function(x, a) - x^2 + x + a
# plot
curve(fn1(x, a = 5), -4, 4)
abline(h=0, col = 2)
# searching the roots in (-4, 4)
# install.packages('BB')
require(BB)
BBsolve(par = c(-1, 1), fn = fn1, a = 5)
hi, peter:
thank you for your attention. adding the line you suggested did display the
static Mandelbrot plot with good resolution on R graphics device. However,
the resulting gif file still come out ugly. the R wiki page I was referring
to is the following:
I'm trying to get predicted probabilities out of a regression model,
but am having trouble with the newdata option in the predict()
function. Suppose I have a model with two independent variables, like
this:
y=rbinom(100, 1, .3)
x1=rbinom(100, 1, .5)
x2=rnorm(100, 3, 2)
mod=glm(y ~ x1 +
You may also try package nleqslv, which uses Newton or Broyden to solve a
system of nonlinear equations. It is an alternative to BB.
Without further information from your side, no additional information can be
provided.
/Berend
--
View this message in context:
43 matches
Mail list logo