Displaying 20 results from an estimated 51 matches for "twoways".
Did you mean:
twoway
2008 Mar 07
1
Finding Interaction and main effects contrasts for two-way ANOVA
I've tried without success to calculate interaction and main effects
contrasts using R. I've found the functions C(), contrasts(),
se.contrasts() and fit.contrasts() in package gmodels. Given the url
for a small dataset and the two-way anova model below, I'd like to
reproduce the results from appended SAS code. Thanks. --Dale.
## the dataset (from Montgomery)
twoway <-
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 what I mention...
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...
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 impl...
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 = "AER")
library(&q...
2010 Apr 14
1
Sig differences in Loglinear Models for Three-Way Tables
Hi all,
I've been running loglinear models for three-way tables: one of the
variables having three levels, and the other two having two levels each.
An example looks like below:
> yes.no <- c("Yes","No")
> switch <- c("On","Off")
> att <- c("BB","AA","CC")
> L <- gl(2,1,12,yes.no)
> T <-
2018 May 08
0
plm(...,"within","twoways") extremely slow on unbalanced panel
I am using it on a big dataset. The estimation was done in hours. But summary() takes forever. Any suggestion is greatly appreciated!
[[alternative HTML version deleted]]
2010 Aug 03
2
How to extract ICC value from irr package?
Hi, all
There are 62 samples in my data and I tested 3 times for each one, then I
want to use ICC(intraclass correlation) from irr package to test the
consistency among the tests.
*combatexpdata_p[1:62] is the first text results and combatexpdata_p[63:124]
* is the second one and *combatexpdata_p[125:186]* is the third.
Here is the result:
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 think anything is wrong w...
2008 Apr 19
3
R question for Stata users
Hi...
In Stata, there is the ability to display scatter plots with data
points at the same (x,y)
location, using the 'jitter' command of the twoway scatter stata
command.
Anyone know of a way that I can do the equivalent thing in R?
For non-Stata readers, if jitter is enabled in stata, and n-points
would be at
the same (x,y) location, the points are offset a bit (according to
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
> paneldata27<-plm.data(paneldata27,index=c("Account","Day.of.Sample"))
> nlevels(paneldata27$Account)
[1] 1573
> nlevels(paneldata27$Day.of....
2011 Apr 03
2
power of 2 way ANOVA with interaction
I've been searching for an answer to this for a while but no joy. I have a simple 2-way ANOVA with an interaction. I'd like to determine the power of this test for each factor (factor A, factor B, and the A*B interaction). How can I do this in R? I used to do this with "proc Glmpower" in SAS, but I can find no analogue in R.
[[alternative HTML version deleted]]
2013 Jan 11
0
Manual two-way demeaning of unbalanced panel data (Wansbeek/Kapteyn transformation)
...y_t<-pmodel.response(plm(formula=inv~value,data=Grunfeld,index=c("firm","year"),model="within",effect="time"))
dem_y_it<-pmodel.response(plm(formula=inv~value,data=Grunfeld,index=c("firm","year"),model="within",effect="twoways"))
dem_X_it<-model.matrix(plm(formula=inv~value,data=Grunfeld,index=c("firm","year"),model="within",effect="twoways"))
sum(y_i!=dem_y_i)
#y_i[1:10]
#dem_y_i[1:10]
sum(y_t!=dem_y_t)
#y_t[1:10]
#dem_y_t[1:10]
sum(y_it!=dem_y_it)
#y_it[1:10]
#dem_y_it...
2009 Mar 03
4
scatter plot question
Hi R Users,
I have a dataframe like this:
id x rho
A 1 0.1
B 20 0.5
C 2 0.9
...
I want to do a scatter plot of "x" versus "rho" but for each point on the
scatter plot I want the corresponding entry for "id" instead of points. In
STATA I can do so by
twoway (scatter x rho, mlabel(id))
How can I do the same in R? I am sure there is some simple way to do
2007 Apr 09
1
How to solve differential and integral equation using R?
Hello,
I want to know if there are some functions or packages to solve differential
and integral equation using R.
Thanks.
Shao chunxuan.
[[alternative HTML version deleted]]
2007 Apr 10
1
median polishing
Hi,
In SPlus there is a function called "twoway" for median polishing gridded
data. Is there an equivalent function in R? I have been searching for it
in R help without much success. Your help is much appreciated.
Cheers
Sorn
[[alternative HTML version deleted]]
2013 Mar 05
0
Agreement and Consistency of 2D data
Hi,
I have two different imaging modalities (for the identification of areas of
infarcted myocardium) that I need to compare regarding agreement and
consistency.
However, I don't think that methods like Cohen's Kappa, PCC, Bland-Altmann
or ICC are sufficient here as there is not just a pairwise but also a
spatial relationship between measured data points. For example if the
results of the
2018 Jan 27
0
plm empty model error (data is linked)
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 think anything is wrong w...
2011 Oct 06
1
Coefficients for lagged plm model variables not calculated
...n
producing a <summary(model.object).
The code I am using is:
> b<-plm.data(b,index=c("E","M"))
> b.fetw<-plm(B~lag(B,k=1)+Ma+lag(Ma,k=1)+Pa+lag(Pa,k=1)+Ya+lag(Ya,k=1)+F+lag(F,k=1)+CS+R+lag(R,k=1)+G+I,
> data=b, model="within", effect="twoways")
> summary(b.fetw)
Twoways effects Within Model
Call:
plm(formula = B ~ lag(B, k = 1) + Ma + lag(Ma, k = 1) + Pa +
lag(Pa, k = 1) + Ya + lag(Ya, k = 1) + F + lag(F, k = 1) +
CS + R + lag(R, k = 1) + G + I, data = b, effect = "twoways",
model = "within"...
1997 Aug 25
0
R-alpha: `missing' BB functions
Here are the functions documented in the Blue Book that I found missing
in R (ignoring the ones which are obviously outdated).
aggregate allocated amatch axes chull clorder cutree cycle date
debugger dget discr faces interp l1fit labclust lag loglin
monthplot mstree mulbar napsack odometer persp plclust plotfit
rep.int restore rreg sabl sablplot set.seed smooth sort.list
Stable stars