Displaying 20 results from an estimated 2000 matches similar to: "How might one write this better?"
2005 Aug 13
1
How to make a lagged variable in panel data?
Suppose we observe N individuals, for each of which we have a
time-series. How do we correctly create a lagged value of the
time-series variable?
As an example, suppose I create:
A <- data.frame(year=rep(c(1980:1984),3),
person= factor(sort(rep(1:3,5))),
wage=c(rnorm(15)))
> A
year person wage
1 1980 1 0.17923212
2 1981
2009 Oct 31
1
Help me improving my code
Hi,
I am new to R. My problem is with the ordered logistic model. Here is my
question:
Generate an order discrete variable using the variable
wrwage1 = wages in first full calendar quarter after benefit application
in the following way:
*
wage*1*Ordered *=
1 *if*0 *· wrwage*1 *< *1000
2 *if*1000 *· wrwage*1 *< *2000
3 *if*2000 *· wrwage*1 *< *3000
4 *if*3000 *· wrwage*1 *<
2009 Sep 03
2
How can I appoint a small part of the whole data
Dear all,
I have 1980~1990 eleven datas,
every year have three variables,
wage
gender(1=female, 2=male)
race(1=black, 2=white)
My original commands is:
fig2b<-reldist(y=mu1990$wage,yo=mu1980$wage,.......)
I have three questions:
1. If I want to appoint y=women's wage in 1990
yo=women's wage in 1980
2. If I want to appoint y=women's wage in
2009 Nov 27
1
problem with "dynformula" from "plm" package [RE-POST]
Hello list,
I'm following the paper (http://www.jstatsoft.org/v27/i02/paper) on
how to use "plm" to run panel regressions, and am having trouble with
what I believe should be something very basic.
When I run the command (p.9 in the paper):
R>
dynformula(emp~wage+capital,log=list(capital=FALSE,TRUE),lag=list(emp=2,c(2,3)),diff=list(FALSE,capital=TRUE))
I see:
emp ~ wage +
2024 Jan 28
1
2SLS with Fixed Effects and Control Variables
Dear John Fox, Christian Kleiber, and Achim Zeileis,
I am attempting to run various independent variable parameters to assess
their suitability. Unfortunately, I hit a snag and couldn't get the tests
to run properly. When I used ivreg, I got an error message saying: "Error
in eval(predvars, data, env) : object 'WageInequality' not found."
Can you please help?
Model:
2012 Nov 15
2
Optimizing
Hello,
I am fairly new with R and am having trouble finding an optimal group. I
checked the help functions for the various optimize commands and it was a
little over my head.
I have a dataset with 4 columns, name, type, value, and cost. The set
consists of a list of people, which have 3 types. I want to choose 6
people, two of each type, and maximize the sum of their values. However,
I'm
2013 Jul 11
1
Testing for weak exogeneity in a SUR ECM
Dear all,
I have set up a Labour Demand Error Correction Model for some German federal
states.
As I expect the labour markets to be correlated I used a Seemingly Unrelated
Regression using systemfit in R.
My Model is:
d(emp)_it = c + alpha*ln(emp)_i,t-1 + beta_1*ln(gdp)_i,t-1 + +
beta_2*ln(wage)_i,t-1 + + beta_1*ln(i)_i,t-1 + gamma_1*d(gdp)_it +
gamma_2*d(wage)_it
with emp_it being the
2005 Feb 16
1
Setting log(0) to 0
Hi,
I'm trying to do a regression like this:
wage.r = lm( log(WAGE) ~ log(EXPER)
where EXPER is an integer that goes from 0 to about 50. EXPER contains
some zeros, so you can't take its log, and the above regression
therefore fails. I would like to make R accept log(0) as 0, is that
possible? Or do I have first have to turn the 0's into 1's to be able to
do the above
2012 Apr 25
4
"Conditional" average
Hello, I have a set of data including age, wage and education level each
called age76, wage76 and grade76 I want to know how i can calculate the
average wage of people age 15 to 65 (each year separetly) , only for those
who have an education level of 10 12 and 16...
--
View this message in context: http://r.789695.n4.nabble.com/Conditional-average-tp4585313p4585313.html
Sent from the R help
2010 Feb 28
1
"Types" of missingness
Dear R-List,
My questions concerns missing values. Specifically, is is possible to
use different "types" of missingness in a dataset and not a
one-size-fits-all NA?
For example, data may be missing because of an outright refusal by a
respondent to answer a question, or because she didn't know an answer,
or because the item simply did not apply. In later analysis it is
sometimes
2012 Nov 29
1
instrumental variables regression using ivreg (AER) or tsls (sem)
Dear friends,
I am trying to understand and implement instrumental variables
regression using R.
I found a small (simple) example here which purportedly illustrates the
mechanics (using 2-stage least-squares):
http://www.r-bloggers.com/a-simple-instrumental-variables-problem/
Basically, here are the R commands (reproducible example) from that
site:
# ------ begin R
library(AER)
2010 Oct 04
1
Simultaneous equation with one ordinal reponses
Dear R users,
I had a research question which involves a simultaneous equation system, one
is the common continuous dependent variable, y1, say wage, or log wage,
another one is a latent variable, y*, which I only observe up to a ordinal
scale, say attitudes toward a problem, taking values as y2= 1, 2, 3 or 4.
Both of them have other exogeneious variables. I have been search on
internet for
2002 Oct 02
6
help to make a map on R
Hi all,
I need a little help for construct an state's map on R.
The first problem is to get the data.
I have a datafile of longitude and latitude in the follow format:
trajectory latitude longtude
T -22.045618 -51.287056
T -22.067078 -51.265888
T -22.067039 -51.207249
T -22.059690 -48.089695
T -22.075529 -48.074608
T -22.072460 -48.044472
T -22.062767 -48.298473
T -22.077349
2001 Sep 14
2
[Fwd: Bush's Press Conference: Into the Abyss]
Emperors1000@aol.com wrote:
>
> Dear reader,
> The emperorsclothes list does not seem to be working. Please forgive us if
> you receive this post twice. - Jared Israel, www.tenc.net
> **************************
> URL for this article: http://emperors-clothes.com/articles/rozoff/abyss.htm
>
> To join the Emperor's Clothes email list, go to
>
2012 Jun 28
1
Simple mean trajectory (ordinal variable)
Hello.
I have 5 measurement points, my dependent variable is ordinal (0 - 3), and
I want to visualize my data. I'm pretty new to R.
What I want is to find out whether people with different baseline
covariates have different trajectories, so I want a plot with the means
trajectory of my dependent variable (the individual points do not make a
lot of sense in ordinal data) on each measurement
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 May 28
5
CTI in ActiveRecord
I search an plugin or gem, but don''t find nothing satisfactory. I
believe to be stranger a technology that nails the DRY, have that create
you vary equal tables, instead of using inheritance.
Exists an soluction for this? I want a solution similar to this:
create_table :people |t| do
t.column :name
t.column :address
end
create_table :customer |t| do
t.column :person_id
2011 Feb 20
1
Plotting individual trajectories from individual growth model
Hi all,
I am trying to plot the fitted trajectories for each individual from an
individual growth model (fit with a linear mixed effects model in lme). How
can I plot each person's trajectory in the *same* panel, along with the
mean-level trajectory?
Below is an image of a plot similar to what I'm trying to create (from:
http://jpepsy.oxfordjournals.org/content/31/10/1002/F6.large.jpg):
2010 Mar 15
1
problem in reading trajectory file
Hi,
I'm trying to read some trajectory files (text files) which have the form:
# trial n
# t X Y
0 1 2
0.2 1 3
0.4 1.2 4
...
# trial n+1
# t X Y
0 1 2
0.2 1.3 3.3
0.4 1.5 5
...
...
where the symbol # means that the line is not a numeric value, but I still
need to read the number of the trial (n=1, 2, etc.).
I
2001 Nov 24
4
Total Newbie here..
I am concidering taking the Jump to Linux. I have SuSE. 6.3 at the moment..
but don't want to loose some of my M.$. Apps.. So I hear about wine.. as
being able to run some of the apps.. this is great.. News.. for the Weary
anyway..
So does this Wine work with SuSE.. Please forgive me I haven't even played
with Linux. yet.. just trying to get all my questions sorta answered before
I wage