similar to: plm empty model error (data is linked)

Displaying 20 results from an estimated 4000 matches similar to: "plm empty model error (data is linked)"

2018 Jan 26
1
plm empty model error
Hi, I am trying to estimate a two-way model with both individual and time fixed effects. I am using plm with "twoways" specification. plm(as.integer(yvar) ~ xvar, index = c("id", "time"), model="within", data=dataset, effect = "twoways") But I get keep getting the following message and I don't know what to do about it, because I don't
2010 May 17
0
plm(..., model="within", effect="twoways") is very slow on unablanaced data (was: Re: Regressions with fixed-effect in R)
Hello Giovanni I made a minor modification to your function, which now allows to compute the within R-sq in Twoways Within models (see below). However I ran into an issue that I have already encountered before: whenever I try to fit Twoways Within models on my unbalanced data, the process is strangely slow and I usually terminate it either after ~15min or when my CPU hits 100C. This is similar to
2010 Apr 08
1
plm package twoways effect problem
Hello everyone, I have a peoblem to create the twoways effect in the plm package. when i try to create the following dsn1<-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect="twoways",model="within") i have this error: Error in rep.int(c(1, numeric(n)), n - 1L) : negative length vectors are not allowed and to be honest i have no idea what does it mean!! can someone
2010 Mar 16
2
plm "within" models: is the correct F-statistic reported?
Dear R users I get different F-statistic results for a "within" model, when using "time" or "twoways" effects in plm() [1] and when manually specifying the time control dummies [2]. [1] vignette("plm") [2] http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf Two examples below: library("AER") data("Grunfeld", package =
2011 Oct 06
1
Coefficients for lagged plm model variables not calculated
Hello, So I am afraid I am having a recurring problem that I just can't figure out. I am using the plm package to conduct a panel analysis - although I am not sure if the problem is arising as a result of the plm package or something more general. I am trying to run a fixed effects model with effects over time and individual. The model has various lags, and the problem is that these lags do
2009 Aug 21
1
Panel Data Analysis (PLM) - Fixed Effects - "cannot allocate vector of length"
Hello to all on the list, I'm trying to estimate a fixed effects model from a large (unbalanced) panel data set. I have no problems when using only an individual effect or only a time effect, but I get an error message when I try for a "twoways" effect. Here is some of the code: paneldata27 is the entire panel data set: > dim(paneldata27) [1] 1178831 8 >
2005 Jul 05
1
by (tapply) and for loop differences
I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates my problem. I get a difference in the mean of yvar, diff and the p-value using tapply & by compared to a for loop. I cannot see what I am doing wrong.
2012 Aug 11
1
using eval to handle column names in function calling scatterplot graph function
I am running R version 2.15.1 in Windows XP I am having problems with a function I'm trying to create to: 1. subset a data.frame based on function arguments (colname & parmname) 2. rename the PARMVALUE column in the data.frame based on function argument (xvar) 3. generate charts plotvar <- function(parentdf,colname, parmname,xvar,yvar ){ subdf <-
2007 Nov 15
1
Writing a helper function that takes in the dataframe and variable names and then does a subset and plot
Hi, I have a large dataframe than I'm writing functions to explore, and to reduce cut and paste I'm trying to write a function that does a subset and then a plot. Firstly, I can write a wrapper around a plot: plotwithfits <- function(formula, data, xylabels=c('','')) { xyplot(formula, data, panel = function(x,y, ...) { panel.xyplot(x,y,
2011 Feb 28
0
Fwd: Re: speed up process
Dear Jim, Here is again exactly what I did and with the output of Rprof (with this reduced dataset and with a simpler function, it is here much faster than in real life). Thanks you again for your help! ## CODE ## mydata1<- structure(list(species = structure(1:8, .Label = c("alsen","gogor", "loalb", "mafas", "pacyn", "patro",
2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it
2010 Mar 29
1
plm package duplication problem
hi, i am writing my master thesis and i am dealing with 146474 observations (panel data), i have just learned the R so i am a beginner!! i am trying to use the "plm" package and i have a duplication problem; i have written the following commands to read my data and create my model >dsn<-plm.data(ds, c("stno", "year")) ds=name of my data, stno=individual
2009 Jan 21
0
trouble switching to 'plm' from 'xtabond' and Stata
Hello, I am switching to R from Stata and I am having particular trouble with the transition from Stata's 'xtabond' and 'ivreg' commands to the "plm" package. I am trying to replicate some of the dynamic panel data work using the UK Employment data in Arellano and Bond (1991) and available as 'EmplUK' under the 'plm' package. I have been
2012 Mar 08
1
Panel models: Fixed effects & random coefficients in plm
Hello, I am using {plm} to estimate panel models. I want to estimate a model that includes fixed effects for time and individual, but has a random individual effect for the coefficient on the independent variable. That is, I would like to estimate the model: Y_it = a_i + a_t + B_i * X_it + e_it Where i denotes individuals, t denotes time, X is my independent variable, and B (beta) is the
2007 Jun 14
4
question about formula for lm
Dear all; Is there any way to make this to work?: .x<-rnorm(50,10,3) .y<-.x+rnorm(50,0,1) X<-data.frame(.x,.y) colnames(X)<-c("Xvar","Yvar") Ytext<-"Yvar" lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) # does run The main idea is to use Ytext as input in a function, so you just type "Yvar" and the model should fit....
2011 Aug 30
1
R crash
Dear users, By running the script below, R crashes systematically at the last command, namely dev.off(), on Windows 7, but not on Windows XP. I therefore don't provide a reproducible example and do not really extract the relevant parts of the script because it has most likely nothing to do with the script itself. I can do it though if you think it might be relevant. R crashes on Windows
2012 Sep 20
1
Gummy Variable : Doubt
Hi,   I have a system in which I analyze 2 subjects and 1 variable, so I have 2 models as follow:   y ~ x_1[, 1] + x_2[, 1] + x_1[, 2] + x_2[, 2]   Where   x_1[, i] = cos(2 * pi * t / T_i) x_2[, i] = sin(2 * pi * t / T_i)   i = 1, 2   Data have two columns: t and y.   As you can see, I have a multiple components model, with rithm and without trends, and I have a fundamental
2019 May 25
3
Increasing number of observations worsen the regression model
I have the following code: ``` rm(list=ls()) N = 30000 xvar <- runif(N, -10, 10) e <- rnorm(N, mean=0, sd=1) yvar <- 1 + 2*xvar + e plot(xvar,yvar) lmMod <- lm(yvar~xvar) print(summary(lmMod)) domain <- seq(min(xvar), max(xvar))??? # define a vector of x values to feed into model lines(domain, predict(lmMod, newdata = data.frame(xvar=domain)))??? # add regression line, using
2010 Apr 09
0
panel regression with twoways random effects, on unbalanced data?
Dear R users What would be the best way to approach estimating a panel regression with twoways random effects, on unbalanced data? Unfortunately, the "plm" package has no implementation of twoways random effects for unbalanced data. Currently I'm considering two approaches: - extend "plm" to cover this type of panel regression. (For the authors, cc'ed:) Would
2011 Apr 01
3
programming: telling a function where to look for the entered variables
Hi there, Could someone help me with the following programming problem..? I have written a function that works for my intended purpose, but it is quite closely tied to a particular dataframe and the names of the variables in this dataframe. However, I'd like to use the same function for different dataframes and variables. My problem is that I'm not quite sure how to tell my function in