Displaying 20 results from an estimated 100 matches similar to: "function censReg in panel data setting"
2011 Sep 15
2
Tobit Fixed Effects
Hi there,
I need to run a Tobit Fixed Effects in a panel data with 4500 units for 8
years. It is a huge data set, my dependent variable is left truncated at
zero, the distribution is skewed and my panel is balanced.
Any suggestions on how to do that in R?
I tried stuff like survreg, censReg, and tobit but none of them were
satisfactory.
Thanks,
*Felipe Nunes*
CAPES/Fulbright Fellow
PhD
2011 Dec 04
3
Prediction from censReg?
Hi -
First post, so excuse any errors in protocol:
Wanted to ask if there's an easy way to use 'predict' with objects of class
'censReg', 'maxLik', 'maxim' or 'list'.
Have a left-censored dataset, attempting to use a Tobit model and am working
with the censReg package. I like how easy it is to move from glm models to
predictions with
2011 Feb 11
1
censReg or tobit: testing for assumptions in R?
Hello!
I'm thinking of applying a censored regression model to
cross-sectional data, using either the tobit (package survival) or the
censReg function (package censReg). The dependent variable is left and
right-censored.
My hopefully not too silly question is this: I understand that
heteroskedasticity and nonnormal errors are even more serious problems
in a censored regression than in an
2014 Nov 06
3
Duda_Observed vs Predicted
Hola Javier,
Si, cuando hablo de valor observado me refiero al valor real en campo y el
predicho al que estiman los modelos. Disculpa, que no lo detallase así
desde el principio.
En mi caso trabajo con dos diferentes: Zero inflated y Binomial Negativo y
me gustaría comprobar que diferencia (distancia) existe entre cada uno de
ellos y la realidad.
Estoy trabajando con los siguientes paquetes:
2010 Nov 23
4
Tobit model on unbalanced panel
Appreciate any suggestions regarding how to fit an unbalanced panel data to
a Tobit model using R functions. I am trying to analyze how real estate
capital expenditures (CapEx) are affected by market conditions using a panel
Tobit model. The CapEx is either positive or 0, so it is censored. The data
are unbalanced panel, including the CapEx of about 5000 properties over
about 40 quarters, with the
2012 Jul 09
0
Problem in plm package
Hello everyone,
I am working with plm package and I have problem with random and within
models, which are giving errors which says "empty model". However, the model
is not empty. In the source code for plm.fit, where the error originates it
says something like (writing from the top of my head...)
X <- model.matrix(formula,data, lhs=1,...)
if (ncol(X) == 0) stop("empty
2003 Aug 04
1
BHHH algorithm
Dear R users,
Could you tell me where a I find some references of BHHH algorithm ? I need
write it in R.
Thank you.
2011 Oct 04
2
About stepwise regression problem
First of all, I have GAMs
noxd<-gam(newNOX~pressure+maxtemp+s(avetemp,bs="cr")+s(mintemp,bs="cr")+s(RH,bs="cr")+s(solar,bs="cr")+s(windspeed,bs="cr")+s(transport,bs="cr"),family=gaussian
(link=log),groupD,methods=REML)
Then I type " summary(noxd)". and show
Family: gaussian
Link function: log
Formula:
newNO2 ~ pressure
2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
I am currently trying to find MLE of a function with four parameters. My codes run well but i don't get the results. I get the following message:
BHHH maximisation
Number of iterations: 0
Return code: 100
Initial value out of range.
I don't know this is so because of the way i have written my loglikelihood or what.
The loglikelihood
LogLik<-function(param){
beta_1<-param[1]
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users,
I am new to R. I would like to find *maximum likelihood estimators for psi
and alpha* based on the following *log likelihood function*, c is
consumption data comprising 148 entries:
fn<-function(c,psi,alpha)
{
s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2*
(lag(c[i],-1)^((-2)*(alpha+1))
)});
s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});
2011 May 03
3
help with the maxBHHH routine
Hello R community,
I have been using R's inbuilt maximum likelihood functions, for the
different methods (NR, BFGS, etc).
I have figured out how to use all of them except the maxBHHH function. This
one is different from the others as it requires an observation level
gradient.
I am using the following syntax:
maxBHHH(logLik,grad=nuGradient,finalHessian="BHHH",start=prm,iterlim=2)
2003 Jul 10
0
FW: Maximum Likelihood Estimation and Optimisation
Have a look at ?optim. I don't think it has the BHHH algorithm as an
option, though.
===========================================
David Barron
Jesus College
University of Oxford
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Harold Doran
Sent: 10 July 2003 15:43
To: Fohr, Marc [AM]; R-help at stat.math.ethz.ch
2014 Nov 06
4
Duda_Observed vs Predicted
Buenos días a todxs,
Estoy comparando la predicción de los valores (0, 1, 2, 3,.....hasta 13)
frente a los observados.
Con la idea de comparar el modelo Zero inflated y el Binomial negativo y
ver cual presenta mas distancia frente a las predicciones observadas.
Para ello introduzco los códigos en la consola:
#Modelo ZIM
pred<-round(colSums(predict(zeroinfl, type="prob") [,1:14]))
2008 Aug 18
2
Using lag
Dear all,
I am having difficulties using the seemingly-simple function lag.
I have a dataframe with several weather variables (maxitemp,
windspeed, rainfall etc), and the response variable (admissions). The
dataset is fairly large (1530 observations). I simply want to model the
response against a lag of a couple of the explanatory variables, say
maxitemp and rainfall. I would like to look at
2003 Mar 12
1
problems with numerical optimisation
Dear list,
this is not a particular R question but perhaps someone can help.
I am running a maximum likelihood estimation (competing risk duration
model with unobserved heterogeneity) on 30 different datasets. The
problem is that on 2 datasets the model does not converge. I am
interested if there are any methods, based on the gradients or (an
approximation of) the hessian which helps to
2012 Dec 10
1
Marginal effects of ZINB models
Dear all,
I am modeling the incidence of recreational anglers along a stretch of
coastline, and with a vary large proportion of zeros (>80%) have chosen to
use a zero inflated negative binomial (ZINB) distribution. I am using the
same variables for both parts of the model, can anyone help me with R code
to compute overall marginal effects of each variable?
My model is specified as follows:
2003 Jun 19
1
lattice and Sweave
I'm having trouble using lattice and Sweave together.
An example of the trouble is the chunk
<<fig=true, eps=false>>=
library(nlme)
data(Orthodont)
plot(Orthodont)
@
This gives a warning
Warning message:
No Active Device, using default values in: trellis.par.get("add.text")
and creates a pdf file with no pages.
I think this is related to the fact that a figure
2011 Sep 22
1
negative binomial GAMM with variance structures
Hello,
I am having some difficulty converting my gam code to a correct gamm code, and I'm really hoping someone will be able to help me.
I was previously using this script for my overdispersed gam data:
M30 <-gam(efuscus~s(mic, k=7) +temp +s(date)+s(For3k, k=7) + pressure+ humidity, family=negbin(c(1,10)), data=efuscus)
My gam.check gave me the attached result. In order to
2011 Nov 27
0
Need Help with my Code for complex GARCH (GJR)
Hello,
i want to estimate a complex GARCH-model (see below).
http://r.789695.n4.nabble.com/file/n4112396/GJR_Garch.png
W stands for the Day of the Week Dummies. r stands for returns of stock
market indices. I stands for the GJR-term.
I need some help with three problems:
1.) implementation of the GJR-term in the variance equation
2.) compute robust covariance matrix
2012 Feb 10
1
Need to aggregate large dataset by week...
Hi all,
I have a large dataset with ~8600 observations that I want to compress to
weekly means. There are 9 variables (columns), and I have already added a
"week" column with 51 weeks. I have been looking at the functions:
aggregate, tapply, apply, etc. and I am just not savvy enough with R to
figure this out on my own, though I'm sure it's fairly easy. I also have the
Dates