similar to: Setting log(0) to 0

Displaying 20 results from an estimated 5000 matches similar to: "Setting log(0) to 0"

2023 Jan 26
1
Failing to install the rgl package
Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif") color = rainbow(length(y_hat))[rank(y_hat)] plot3d(educ,exper,wage,col = color,type = "s",size = 0.5,xlim =
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
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
2004 Oct 03
1
How might one write this better?
I am trying to simulate the trajectory of the pension assets of one person. In C-like syntax, it looks like this: daily.wage.growth = 1.001 # deterministic contribution.rate = 0.08 # deterministic 8% Wage = 10 # initial Asset = 0 # initial for (10,000 days) { Asset += contribution.rate * Wage
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
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
2013 May 10
1
PGLM Package: Starting Values for Within-Model
I am currently using the PGLM package and I would like to implement a within-model. Unfortunately, I do not succeed as I am not a big expert in panel regression. I am using the example data set from the PGLM package: library(pglm) data('Unions', package = 'pglm') anb <- pglm(union~wage+exper+rural, Unions, family=binomial('probit'), model="within", method =
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
2013 Apr 24
1
pglm package: fitted values and residuals
I'm using the package pglm and I'have estimated a "random probit model". I need to save in a vector the fitted values and the residuals of the model but I can not do it. I tried with the command fitted.values using the following procedure without results: library(pglm) m1_S<-pglm(Feed ~ Cons_PC_1 + imp_gen_1 + LGDP_PC_1 + lnEI_1 +
2011 Jun 23
2
new to R need urgent help!
hi all- I am doing some research, have never used R before until today and need to understand the following program for a project. if some one could PLEASE help me understand this program ASAP i would GREATLY appreciate it (any syntax/ statistic comments would be great) PLEASE PLEASE HELP!! THANKYOU!!! -on a side note, it seems to me that R doesnt include the pv, and it was calculated
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
2003 Dec 08
1
trouble with predict.l1ce
Dear R-help, I am having trouble with the predict function in lasso2. For example: > data(Iowa) > l1c.I <- l1ce(Yield ~ ., Iowa, bound = 10, absolute.t=TRUE) > predict (l1c.I) # this works is fine > predict (l1c.I,Iowa) Error in eval(exper,envir, enclos) : couldn't find function "Yield" And I have similar trouble whenever I use the newdata argument in
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
2004 Jan 18
2
shared folders ownership
what/who is the owner of a shared directory in Samba, on a network that requires every one to access the directory, when created as root with 0777 it seems to revert back to root ownership and you can't write or delete from it. Relativily new at this, so would appreciate any help. Thanks Wes
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