Displaying 20 results from an estimated 70000 matches similar to: "How to do FMOLS and DOLS?"
2013 Mar 27
2
FMOLS DOLS and ADL regression
Whether can any R package run Full modified OLS (Phillips and Hansen 1990 ), DOLS (Stock and Watson 1993) and ADL model (Pesaran and Shin 2001) for cointegrated VAR model?
I cannot find any useful order in VAR and SVAR package.
Thanks.
Eric Wang
[[alternative HTML version deleted]]
2008 Oct 23
0
FMOLS
Is anyone aware of an R package that implements Pedroni's FMOLS (Fully
Modified Ordinary Least Squares) package, for panel data with
non-stationary and co-integration?
2012 Nov 27
2
order.max specification problem in the ar.ols function
Hello
I am facing a curious problem.I have a time series data with which i want to
fit auto-regressive model of order p, where p runs from 1:9.I am using a
for loop which will fit an AR(p) model for each value of p using the
*ar.ols* function.
I am using the following code
for ( p in 1:9){
a=ar.ols (x=data.ts, order.max=p, demean=T, intercept=T)
}
Specifying the *order.max* to be p, it gives me a
2012 Jun 26
1
rms package-superposition prediction curve of ols and data points
Hello,
I have a question about the ?plot.predict? function in Frank Harrell's rms
package.
Do you know how to superpose in the same graph the prediction curve of ols
and raw data points?
Put most simply, I would like to combine these two graphs:
> fit_linear <- ols (y4 ~ rcs(x2,c(5,10,15,20,60,80,90)), x=TRUE, y=TRUE)
> p <- Predict(fit_linear,x2,conf.int=FALSE)
> plot (p,
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
2011 Mar 29
1
Simple AR(2)
Hi there, we are beginners in R and we are trying to fit the following time
series using ar(2):
> x <- c(1.89, 2.46, 3.23, 3.95, 4.56, 5.07, 5.62, 6.16, 6.26, 6.56, 6.98,
> 7.36, 7.53, 7.84, 8.09)
The reason of choosing the present time series is that the we have
previously calculated analitically the autoregressive coefficients using
the direct inversion method as 1.1, 0.765, 0.1173.
2011 Dec 03
2
density function always evaluating to zero
Dear R users,
I'm trying to carry out monte carlo integration of a posterior density
function which is the product of a normal and a gamma distribution. The
problem I have is that the density function always returns 0. How can I
solve this problem?
Here is my code
#generate data
x1 <- runif(100, min = -10, max = 10)
y <- 2 * x1^2 + rnorm(100)
# # # # # # # # Model 0 # # # # # # #
2012 Jun 08
0
Problem with ARCH
Hi
I have a problem on how to proceed with further steps in my analysis. I did
a linear OLS regression (ri,t=alpha*beta*rm,t+et) with my daily data of
stock and index returns. There is now the problem of arch in my error terms.
Thus I used the following r command:
/garch(resid_desn, order=c(0,2)) ## This ARCH(2) process seems to fit the
best after trial and error. Consequently, I get there
2011 May 31
1
Problem with % in an example when running R CMD check
Using
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 2
minor 13.0
year 2011
month 04
2012 Jun 06
1
ARCH modelling/MA process
Hi all
ARCH modelling
I have a problem now on how to proceed with further steps in my analysis. I
did a linear OLS regression with my daily data of stock and index returns.
There is now the problem of arch in my error terms. Thus I used the
following r command:
garch(resid_desn, order=c(0,2)) ## This ARCH(2) process seems to fit the
best after trial and error. Consequently, I get there three
2011 Dec 06
2
Why can't I figure this out? :S
Hi, so I don't speak computer and I have no idea what this code is telling
the program to do, but I apparently need to be able to find and isolate
influencial observations. Problem, I have no idea what the error means and
where it may be from in the code.
error I get is below the code
{
## OLS results
NameC<- lm(gpanew~female+female:lastinit+agenew+canadian+mom_ed+yearstudy)
## default:
2012 Oct 28
6
Hausman test in R
Hi there,
I am really new to statistics in R and statistics itself as well.
My situation: I ran a lot of OLS regressions with different independent
variables. (using the lm() function).
After having done that, I know there is endogeneity due to omitted
variables. (or perhaps due to any other reasons).
And here comes the Hausman test. I know this test is used to identify
endogeneity.
But what I
2011 Jan 16
1
Hausman Test
Hi,
can anybody tell me how the Hausman test for endogenty works?
I have a simulated model with three correlated predictors (X1-X3). I also
have an instrument W for X1
Now I want to test for endogeneity of X1 (i.e., when I omit X2 and X3 from
the equation).
My current approach:
library(systemfit)
fit2sls <- systemfit(Y~X1,data=data,method="2SLS",inst=~W)
fitOLS <-
2011 Apr 12
2
Model formula for ols function (rms package)
Dear R help,
I'm having some trouble with model formulas for the ols function in
the rms package. I want to have two variables represented as
restricted cubic splines, and also include an interaction as a product
of linear terms, but I get an error message.
library(rms)
d <- data.frame(x1 = rnorm(50), x2 = rnorm(50), y = rnorm(50))
ols(y ~ rcs(x1,3) + rcs(x2,3) + x1*x2, data=d)
Error in
2011 May 15
5
Question on approximations of full logistic regression model
Hi,
I am trying to construct a logistic regression model from my data (104
patients and 25 events). I build a full model consisting of five
predictors with the use of penalization by rms package (lrm, pentrace
etc) because of events per variable issue. Then, I tried to approximate
the full model by step-down technique predicting L from all of the
componet variables using ordinary least squares
2012 Oct 23
2
Export summary from regression output
Hi there,
I tried it many times but didn't get it worked.
I just want to export the summary of a OLS regression (lm() function) into a
csv-file including the "call"-formula", "coefficients", "r-squared", "
adjusted r-squared" and "f statistic".
I know I can export:
write.csv2(Regression_60d_ann$coefficients,
2013 Apr 23
0
adding the second regressor
Hi...Can anyone help me for adding the second regressor to the FMOLS
regresion. I am using the codes below. I could not succeed to write
the correct sentence in place of the question marks. Do I need to make any
changes in the source file also? I attached the original files published by
Bruce Hansen.
Thank you very much in advance for your precious help.
Best Regards,
Tarkan
source
2006 Aug 15
1
fMultivar OLS - how to do dynamic regression?
Hi folks!
Does anybody know how to use the OLS function in fMultivar to do dynamic
regression? I've tried specifying lags in OLS using a data series
created in fSeries and it doesn't seem to work. I've done dynamic
regression using dyn$lm and I was wondering how to accomplish the same
thing using the OLS function from fMultivar. Thanks!
John
[[alternative HTML version
2011 Jul 25
1
biglm() and NeweyWest()
Dear all,
I am working on a large dataset and need to use biglm() to perform OLS
regressions. I have detected significant ARCH effects which I try to account
for using the Newey-West correction.
So far, I have worked with NeweyWest() in the sandwich package. NeweyWest()
however seems to be unable to handle an object of class "biglm".
Looking into the code, I figured out that
2011 Mar 09
2
rms: getting adjusted R^2 from ols object
How can I extract the adjusted R^2 value from an ols object (using rms package)?
library(rms)
x <- rnorm(10)
y <- x + rnorm(10)
ols1 <- ols(y ~ x)
Typing "ols1" displays adjusted R^2 among other things, but how can I
assign it to a variable? I tried str(ols1) but couldn't see where to
go from there.
Thanks,
Mark Seeto