Displaying 20 results from an estimated 100 matches similar to: "Breusch-Godfrey Test"
2010 Dec 26
2
What is the best way to lag a time series?
Dear R-users,
I've been using R for a while and I am very satisfied! Unfortunately, I
still have not figured out an efficient and general way to construct and
use lags of time series, especially when I need to work with different
packages.
Let me give an example. I have two time series x and y and I want to
estimate a variaty of distributed lags models and run different tests
2008 Nov 06
2
How to return individual equation from {aidsEst} in package [micEcon]?
Hi, R core team
I am using the function {aidsEst} in package [micEcon] to do an AIDS
model now. So far, everything is good. But I want to test the auto
correlation and heteroskedasticity of the individual equation from AIDS
demand system. How can I return the individual equation?
PS: serial correlation test is {bgtest} in package [lmtest] and
heteroskedasticity is {bptest} in package
2009 Oct 16
1
Breusch-pagan and white test - check homoscedasticity
Hi r-programmers,
I performe Breusch-Pagan tests (bptest in package lmtest) to check the
homoscedasticity of the residuals from a linear model and I carry out carry
out White's test via
bptest (formula, ~ x * z + I(x^2) + I(z^2)) include all regressors and the
squares/cross-products in the auxiliary regression.
But what can I do if I want find coefficient and p-values of variables x, z,
x*z,
2011 Jun 08
1
Autocorrelation in R
Hi,
I am trying to learn time series, and I am attending a colleague's
course on Econometrics. However, he uses e-views, and I use R. I am
trying to reproduce his examples in R, but I am having problems
specifying a AR(1) model. Would anyone help me with my code?
Thanks in advance!
Reproducible code follows:
download.file("https://sites.google.com/a/proxima.adm.br/main/ex_32.csv
2017 Nov 01
2
Function to save results
Hi,I want the results to be saved automatically in a output text file after the script has finished running.
I used the sink function in the following example, but the results file (output.txt) was empty.
net <- loadNetwork("C://Users//Priya//Desktop//Attractor analysis_all genes//synaptogenesis//regulationof_dopamine_signaling_submodule3.txt")# First I loaded theinput file for
2017 Nov 01
0
Function to save results
Some comments:
1. sink() does not return a value. There is on point to set attr <-
sink(...). Just give the command sink("C://....etc")
2. to complete the saving to the file you must give a second sink command
with no argument: sink()
So your code would be (pseudo-code, not actual code)
sink( "filename" )
do something that prints output which will be captured by sink
2017 Nov 01
2
Function to save results
Hi Eric,I tried as you suggested but I could not find the output in the text file I created (attr.txt)
net <- loadNetwork("C://Users//Priya//Desktop//Attractor analysis_all genes//synaptogenesis//regulationof_dopamine_signaling_submodule3.txt")sink("C://Users//Priya//Desktop//Attractor analysis_all genes//synaptogenesis//attr.txt")
sink()
attr <- getAttractors(net,
2011 Dec 23
2
missing value where TRUE/FALSE needed
Merry Xmas to all,
I am writing a function and curiously this runs sometimes on one data set
and fails on another and i cannot figure out why.
Any help much appreciated.
If i run the code below with
data <- iris[ ,1:4]
The code runs fine, but if i run on a large dataset i get the following
error (showing data structures as matrix is large)
> str(cluster.data)
num [1:9985, 1:811] 0 0 0 0
2017 Nov 01
3
Function to save results
Hi Eric,Thanks for the explanation. Is there a way to save the results automatically after the analysis gets over?. As I recently lost the results, because I didn't save the results. I don't want to run the sink or save command after the analysis is over rather run the command for saving the file before starting to run the analysis, so the file gets saved automatically after the script has
2017 Nov 01
0
Function to save results
Hi Priya,
You did not follow the logic of the pseudo-code.
The sink("filename"), sink() pair captures whatever output is generated
between the first sink statement and the second sink statement.
You need (possibly) to do:
sink("C://Users//Priya//Desktop//Attractor analysis_all
genes//synaptogenesis//attr.txt")
net <- loadNetwork("C://Users//Priya//Desktop//Attractor
2017 Nov 01
0
Function to save results
Let's try a simple example.
> # Create a script file of commands
> # Note we must print the results of quantile explicitly
> cat("x <- rnorm(50)\nprint(quantile(x))\nstem(x)\n", file="Test.R")
>
> # Test it by running it to the console
> source("Test.R")
0% 25% 50% 75% 100%
-2.4736219 -0.7915433
2017 Nov 01
1
Function to save results
Hi David,Thank you for the example.When I try to use the cat function, I get an error
cat(attr<-getAttractors(net, type="asynchronous"))Error in cat(attr <- getAttractors(net, type = "asynchronous")) :
argument 1 (type 'pairlist') cannot be handled by 'cat'
Please let me know, if I have used the function in right way?.
Thank you
Priya
?
2011 Mar 16
1
Autocorrelation in linear models
I have been reading about autocorrelation in linear models over the last
couple of days, and I have to say the more I read, the more confused I
get. Beyond confusion lies enlightenment, so I'm tempted to ask R-Help for
guidance.
Most authors are mainly worried about autocorrelation in the residuals,
but some authors are also worried about autocorrelation within Y and
within X vectors
2008 May 24
3
prototype causing value undefined error
I have a project for which I used a Wicket template as a starting
point. The original example uses prototype.js.
I''m using an SVG image as a background and have included a javascript
that causes the image to always fill the background, regardless of the
client window dimensions.
This works fine in Safari 3 (Firefox doesn''t display the background
image, but I''ll deal
2013 Apr 14
2
ZA unit root test lag order selection
I was wondering if anyone could help with choosing optimal lag length for ZA
test.
There have been two lag order selection methods commonly used in the
literature:
1) The ZA paper recommends to run the test with maximum number of lags. Then
the lag order is reduced sequentially until the longest lag is statistically
significant;
2) One could also use AIC or SBC or other criteria to choose lag
2002 Oct 29
0
updated package "lmtest" 0.9-2
Dear R users,
there is a new version of the package `lmtest' for testing linear
regression models on CRAN. Except for a couple of minor bug fixes,
there are essentially these new features:
o added Breusch-Godfrey test for serial correlation
(thanks to David M. Mitchell who provided the initial version
of the code for bgtest)
o new data sets:
mandible measurements in fetuses,
2018 Sep 20
4
Bias in R's random integers?
Hello,
On Thursday, September 20, 2018 11:15:04 AM EDT Duncan Murdoch wrote:
> On 20/09/2018 6:59 AM, Ralf Stubner wrote:
> > On 9/20/18 1:43 AM, Carl Boettiger wrote:
> >> For a well-tested C algorithm, based on my reading of Lemire, the
> >> unbiased "algorithm 3" in https://arxiv.org/abs/1805.10941 is part
> >> already of the C standard library in
2005 Jun 04
1
the test result is quite different,why?
data:http://fmwww.bc.edu/ec-p/data/wooldridge/CRIME4.dta
> a$call
lm(formula = clcrmrte ~ factor(year) + clprbarr + clprbcon +
clprbpri + clavgsen + clpolpc, data = cri)
> bptest(a,st=F)
Breusch-Pagan test
data: a
BP = 34.4936, df = 10, p-value = 0.0001523
> bptest(a,st=T)
studentized Breusch-Pagan test
data: a
BP = 10.9297, df = 10, p-value = 0.363
>
2012 Sep 18
1
Contradictory results between different heteroskedasticity tests
Hi all,
I'm getting contradictory results from bptest and ncvTest on a model
calculated by GLS as:
olslm = lm(log(rr)~log(aloi)*reg*inv, data)
varlm = lm(I(residuals(olslm)^2)~log(aloi)*reg*inv, data)
glslm = lm(log(rr)~log(aloi)*reg*inv, data, weights=1/fitted(varlm))
Testing both olslm and glslm with both ncvTest and bptest gives:
> ncvTest(olslm)
Non-constant Variance Score Test
2009 Sep 18
1
some irritation with heteroskedasticity testing
Dear all,
Trying to test for heteroskedasticity I tried several test from the
car package respectively lmtest. Now that they produce rather
different results i am somewhat clueless how to deal with it.
Here is what I did:
1. I plotted fitted.values vs residuals and somewhat intuitively
believe, it isn't really increasing...
2. further I ran the following tests
bptest (studentized