similar to: does R have a command the same with Stata's loop command: ` '

Displaying 20 results from an estimated 2000 matches similar to: "does R have a command the same with Stata's loop command: ` '"

2010 Sep 21
5
Can ucminf be installed in 64 bit R and one more question?
Hey, R Users my windows is 64 bit windows 7.?I am trying to install the package ucminf into my 64 bit version R but cannot.??the package I downloaded is from http://cran.r-project.org/web/packages/ucminf/index.html?and I installed it with the "install from local zip files", due to I did not connect my computer to internet. did anyone meet this problem and is there a version of
2010 Aug 03
3
how to do a IF ELSE in a matrix format
Hey, Rers I am new to R and this question may has been asked many times or a very old one.?I have checked the archive but found nothing (maybe I used?the wrong key words).?any advise is appreciated the question is: I try to replace a col vector with some other values, see edu<-matrix(0,1000,2) edu1<-runif(1000,0,1) edu[,1]<-edu1 the colum ?vector?edu[,1]? would?have value
2010 Sep 07
5
question on "optim"
Hey, R users I do not know how to describe my question. I am a new user for R and write the following?code for a dynamic labor economics?model and use OPTIM to get optimizations and parameter values. the following code does not work due to the?equation: ?? wden[,i]<-dnorm((1-regw[,i])/w[5])/w[5] where w[5]?is one of the parameters (together with vector a, b and other elements in vector
2006 May 31
5
Sharing code between some controllers? Staying DRY
Hi, I have four controllers: one for the store front and three for the store admin. In each controller I have copied and pasted exactly the same code. It is a method called redirect_to() to override Action Controller''s redirect_to(). Copy and paste is bad. I can think of two options but I don''t know how Rails will feel about them. Option 1: Can I create an intermediate
2008 Jul 09
1
render file in index
Hi I am trying to render file in controller like this : def index render :flie => ''app\views\upload\uploadfile.html.erb'' end It still complains that template is missing. Template is missing Missing template upload/index.html.erb in view path /home/rails/ directory/app/views Do i have to use funtion render :template or how i can change that default index.html.erb
2003 Jun 25
1
Installing samba on Red Hat 8
Yo All, I am trying to install Samba 3 beta on my RH 8 machine. At the installation of red hat I chosed not to install samba. I downloaded beta rpm for Red Hat and when I try insatling it I get a msg. like "flie blabla conflicting with file from samba-2.2.7'' or something like that. Now I try runing comand rpm -q samba end that tels me there is no rpm samba. Not installed! Right?
2012 May 30
1
Samba 4 analyse
Hi, My actual config Samba 3 PDC, file and print server use openldap backend Posix ACL on XFS FS using pam_ldap and ns_ldap. independant wins and DNS server (not DDNS) Can I have same configuration in samba 4 ? LIke : DC flie server with posix ACL support and pam, ns_ldap . independant wins and DNS server (not DDNS). It's just an analyse ! Have a nice day St?phane
2004 Sep 10
3
[Flac-users] Warn overwrite output file
I have had this happen to me once: Encoding of a .wav file was interrupted somehow, so an incomplete .flac flie was generated. I accidentally ran a decode on that .flac file, which wiped out the original .wav file. I suggest that flac adopt one of the following to handle the situation that an output file is specified with -o or implied, and the output file already exists: 1. rename the
2010 Jan 21
3
cross validation function translated from stata
Hi, everyone: I ask for help about translating a stata program into R. The program perform cross validation as it stated. #1. Randomly divide the data set into 10 sets of equal size, ensuring equal numbers of events in each set #2. Fit the model leaving out the 1st set #3. Apply the fitted model in (2) to the 1st set to obtain the predicted probability of a prostate cancer diagnosis. #4. Repeat
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
Dear R Users on a self-written function for calculating maximum likelihood probability (plz check function code at the bottom of this message), one value, wden, suddenly jump to zero. detail info as following: w[11]=2.14 lnw =2.37 2.90 3.76 ... regw =1.96 1.77 1.82 .... wden=0.182 0.178 0.179... w[11]=2.14 lnw=2.37 2.90 3.76 ... regw =1.96 1.77 1.82 .... wden=0.182
2010 Apr 12
1
zerinfl() vs. Stata's zinb
Hello, I am working with zero inflated models for a current project and I am getting wildly different results from R's zeroinfl(y ~ x, dist="negbin") command and Stata's zinb command. Does anyone know why this may be? I find it odd considering that zeroinfl(y ~ x, dist="poisson") gives identical to output to Stata's zip function. Thanks, --david [[alternative
2012 Mar 12
2
Replicating Stata's xtreg clustered SEs in R
I'm trying to replicate a time-series cross-sectional analysis (countries over years) with SEs clustered by country. ?The original analysis was done in Stata 10 with: xtreg [DV] [IVs] fe cluster(country). Using plm() in R (cran.r-project.org/web/packages/plm/index.html), I've replicated the coefficients. I sought to estimate country-clustered SEs with vcovHC(), and tried a variety of
2009 May 03
1
dates from Stata's .dta to R's .Rdata: become character
Dear Sir/Madam, I converted the .dta into .Rdata with the foreign library read.dta. However, when I use fix() I get the message that the dates are discarded. Before fix(), class(dateX) gives 'dates' as class; after fix() class(dateX) gives 'character' Why is that? Best regards, Rob Bakker [[alternative HTML version deleted]]
2009 Feb 10
2
What is the R equivalent of STATA's 'drop' command?
Hello, I am trying to do some data cleaning in R. I need to drop observations that take on certain values of a variable. In STATA I might type something like: drop if <variable name> == 3 drop if <variable name> == 4 Is there an R equivalent of this? I have tried playing around with the subset command, but it seems a bit clunky. What would an advanced R user's approach be for
2012 Sep 21
1
Exactly Replicating Stata's Survey Data Confidence Intervals in R
Hi everyone, apologies if the answer to this is in an obvious place. I've been searching for about a day and haven't found anything.. I'm trying to replicate Stata's confidence intervals in R with the survey package, and the numbers are very very close but not exact. My ultimate goal is to replicate Berkeley's SDA website with R (http://sda.berkeley.edu/), which seems to
2005 Jun 23
3
(no subject)
Hello Rers: Let's say I have a column that looks like this: Column 167.8 292.8 363.3 1.9 115.25 I want to manipulate the above data such that I only end up with this same column but only with its decimals and not its whole numbers. So the new column would look like this (but the real column is VERY long): Column .8 .8 .3 .9 .25 Any suggestions about how I could do this? -- Do all you
2011 Oct 09
2
variable name question
Hi All, This is surely an easy question but somehow I am not being able to get it. I am using R 2.13.2 and have a data set where variable names like this appear: pci1990, pci1991, ... , pci2009. "pci1990" has data on per capita income for 1990, "pci1991" has data on per capita income for 1991, and so on. I would like to create the logarithm of per capita for each of the
2011 Apr 07
1
Panel data - replicating Stata's xtpcse in R
Dear list, I am trying to replicate an econometrics study that was orginally done in Stata. (Blanton and Blanton. 2009. A Sectoral Analysis of Human Rights and FDI: Does Industry Type Matter? International Studies Quarterley 53 (2):469 - 493.) The model I try to replicate is in Stata given as xtpcse total_FDI lag_total ciri human_cap worker_rts polity_4 market income econ_growth log_trade
2005 Aug 01
6
converting stata's by syntax to R
I am struggling with migrating some stata code to R. I have a data frame containing, sometimes, repeat observations (rows) of the same family. I want to keep only one observation per family, selecting that observation according to some other variable. An example data frame is: # construct example data fam <- c(1,2,3,3,4,4,4) wt <- c(1,1,0.6,0.4,0.4,0.4,0.2) keep <- c(1,1,1,0,1,0,0)
2011 Aug 24
3
Creating new variable with maximum visit date by group_id
Dear R users, I am encoutering the following problem: I have a dataset with a 'unique_id' and different 'visit_date' (formatted as.Date, "%d/%m/%Y") per unique_id. I would like to create a new variable with the most recent date of visit per unique_id as shown below. unique_id visit_date last_visit_date 1 01/06/2010 01/06/2011 1 01/01/2011 01/06/2011 1