similar to: R procedure similar to STATA heckprob?

Displaying 20 results from an estimated 1000 matches similar to: "R procedure similar to STATA heckprob?"

2008 Mar 30
2
convert weekly time series data to monthly
I have weekly time series data with year, month, day, and price variables. The input data set for the weekly series takes the following form: Year month day price 1990 8 20 119.1 1990 8 27 124.5 1990 9 3 124.2 1990 9 10 125.2 1990 9 17 126.6 1990 9 24 127.2 1990 10 1 132.1 1990 10 8 133.3 1990 10 15 133.9 1990 10 22 134.5 1990 10 29 133.9 .. ... ... ... ... ... .... .... 2008 3 3 313.7 2008
2008 Mar 21
1
tseries(arma) vs. stats(arima)
Hello, The "arma" function in the "tseries" package allows estimation of models with specific "ar" and "ma" lags with its "lag" argument. For example: y[t] = a[0] + a[1]y[t-3] +b[1]e[t-2] + e[t] can be estimated with the following specification : arma(y, lag=list(ar=3,ma=2)). Is this possible with the "arima" function in the
2008 Feb 12
2
Formulae for R functions
Can someone direct me to a resource or resources that list the formulae used by R functions (i.e. predict.lm ) to calculate the statistic reported. I am not a programmer and studying the r code is extremely slow going. I have searched r-project.org and all the function help files without success. For example I have attempted to replicate by hand the se.fit calculation from a lm object
2007 Dec 05
1
Working with "ts" objects
I am relatively new to R and object oriented programming. I have relied on SAS for most of my data analysis. I teach an introductory undergraduate forecasting course using the Diebold text and I am considering using R in addition to SAS and Eviews in the course. I work primarily with univariate or multivariate time series data. I am having a great deal of difficulty understanding and working with
2007 Nov 28
2
extracting year an month from ts data set
I have an ascii data set of monthly observation starting in Jan 1946 with a header. hstarts 57 65 95 103 103 97 94 . . . Which I read with the following code tab6.1<-ts(read.table(fname, header=TRUE),frequency=12,start=c(1946,1)) I would like to run a time series model with dummy variables for each month. If I had a variable which take values from 1 to 12 indicating the month I could use
2007 Oct 26
1
Newey-West and SUR regression models
Is anyone aware of a procedure to apply Newey-West corrections for autocorrelation to a SUR regression model? The SANDWICH package seems to be applicable only to LM or GLM models. Thanks, Richard Saba Department of Economics Auburn University Email: sabaric at auburn.edu
2010 Feb 07
2
Reading hierarchical data
I would like to read the following hierarchical data set. There is a family record followed by one or more personal records. If col. 7 is "1" it is a family record. If it is "2" it is a personal record. The family record is formatted as follows: col. 1-5 family id col. 7 "1" col. 9 dwelling type code The personal record is formatted as follows: col.
2008 Apr 30
2
Bug? in summary( ) function base package
There seems to be an error in the summary() function when applied to "ts" class objects. The results of a call to summary( ), on the R "ts" data set USAccDeaths , reports the wrong value for Max. The value reported by the summary function is 11320. The max( ) function returns the correct value 11317, the July 1993 value. Coercing the data to a data.frame and calling summary
2010 Apr 08
1
reshape panel data
I have a data set with observations on 549 cities spanning an 18 year period. However, some of cities did not report in one or more of the 18 years. I would like to implement the procedure suggested by Wooldridge section 17.1.3 in his "Econometric analysis of cross section and panel data" to correct for attrition. For example the table below indicates that the 3rd and the 7th cities in
2009 Jan 27
2
Need help on running Heckman Correction Estimation using R
Team, I am trying to resolve the self-selection bias of a sample in an experiment and would like to run the Heckman Correction Estimation using R. Can someone help me with the R-Code... I tried searching for the discussion, but not successful. Thanks in advance, Best, Kishore/.. http://kaykayatisb.blogspot.com [[alternative HTML version deleted]]
2008 Jan 11
1
question about xreg of arima
Hi, I am trying to understand exactly what xreg does in arima. The documentation for xreg says:"xreg Optionally, a vector or matrix of external regressors, which must have the same number of rows as x." What does this mean with regard to the action of xreg in arima? Apparently somehow xreg made the following two arima fit equivalent in R: arima(x, order=c(1,1,1), xreg=1:length(x)) is
2005 Apr 20
2
heckit / tobit estimation
Dear All, we (Ott Toomet and I) would like to add functions for maximum likelihood (ML) estimations of generalized tobit models of type 2 and type 5 (*see below) in my R package for microeconomic analysis "micEcon". So far we have called these functions "tobit2( )" and "tobit5( )". Are these classifications well known? How are these functions called in other
2006 Feb 17
1
Heckman regression / adjustment for standard errors?
Hello folks, I am trying to estimate the two-step Heckman regression model. I would like to make an adjustment for intragroup correlations. Stata can implement this with the "cluster" option, but I am really hoping to stick with R. It seems that the micEcon package is the primary source for this two-step regression model (i.e., heckit), but I can't find a way to make the
2009 Jul 01
0
probit with sample selection error?
Deal all: i want to do the probit with sample selection estimation, the following is my code: probit with sample selection can be done by stata :heckprob The heckprobll is the likelihood function shown in W.H. Greene 5th p714 ¡´ The question is the convergence is very slow compare with Stata using likellihood only. ¡´ Second i did the similar way in matlab using fminsearch , the estimated
2007 Oct 30
2
Splitting up the micEcon package?
Dear R Users: The functions of our "micEcon" package [1,2] can be subdivided into three categories: - microeconomic demand and firm models - sample selection models (mainly selection()) - routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH()) (mainly used for ML estimation of sample selection models) Although sample selection models are often used in
2006 Jun 23
2
Tetrachoric correlation in R vs. stata
I hope someone here knows the answer to this since it will save me from delving deep into documentation. Based on 22 pairs of vectors, I have noticed that tetrachoric correlation coefficients in stata are almost uniformly higher than those in R, sometimes dramatically so (TCC=.61 in stata, .51 in R; .51 in stata, .39 in R). Stata's estimate is higher than R's in 20 out of 22
2010 Oct 07
2
using a package function inside another function
Hello all, I am trying to use the micEcon 'insertRow' function inside a function I have written. For example: insert_row_test <- function(m){ insertRow(m,nrow(m)+1,v=0,rName="test") } However, when I try to call the 'insert_row_test' function (after loading the micEcon package), it does not insert a row into the matrix I pass in. When I call the insertRow
2006 Feb 27
2
heckit with a probit
Hi I have data for voting behaviour on two (related) binary votes. I want to examine the second vote, running separate regressions for groups who voted different ways on the first vote. As the votes are not independent, I guess that there is an issue with selection bias. So, I think I would like to fit a heckit style model but with a binary dependent variable - so, in effect, two successive
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
2008 May 29
1
package for stochastic frontier models?
I need to estimate maximum tree crown radius and am looking for a package to prepare stochastic frontier models in R. I have not found any package references on Nabble R help, google, or R help. Any tips on a package for this? With regards, Aaron Trowbridge Researcher BV Research Centre Smithers B.C. -- View this message in context: