similar to: looping using 'diverse' package measures

Displaying 20 results from an estimated 100 matches similar to: "looping using 'diverse' package measures"

2017 Oct 19
1
looping using 'diverse' package measures
Hi everyone, I'm new at R (although I'm a Stata user for some time and somehow proficient in it) and I'm trying to use the 'diverse' R package to compute a few diversity measures on a sample of firms for a period of about 10 years. I was wondering if you can give me some hints on how to best proceed on using the 'diverse' package. My sample has the following setup.
2011 Feb 09
3
Loop in variable names
Hello! I would like to do some tables for several variables and I would like to write a loop that does the table for each variable. I should also point out that my data set has several missing observations and sometimes the observations that are missing are not the same for all my variables. What I would like to do: table(StoreData$CompanyID, !is.na(StoreData$P2))
2005 Dec 22
3
foreign_key setting ignored
I''m having a spot of bother creating a ''has_many'' relationship between two legacy database tables. The relationship is ''company'' table has many linked records in the ''contact'' table. Iv''e used ''generate scaffold'' on these tables and everything is fine. I then decided to define the relationship in the
2011 Sep 21
1
identifying cells in data frames with the same value
Hi, I'm trying to find out if there is a command that tells me which cells in my data frame have the same value. I am looking at the results from an online survey, organized into a data frame with the following columns: SubjectNumber, WorkerID, Age. I know the one person must have taken the survey more than once, because there is one less level in the WorkerID column than there are rows in
2010 Apr 07
3
match function or "=="
Hi all, I have a huge dataset(5000k observations), which contains the daily sales for each company. If I want to find out the a company with unique company id number, which function I should use that is more efficient, match or "=="? For example, use<-dataset[!is.na(match(dataset$companyID, 12345)),] or use<-dataset[dataset$companyID==12345,] Thank you very much. -- View this
2012 Sep 04
3
Comparing Von Bertalanffy Growth Curves
I am trying to compare Vbert growth curves from several years of fish data. I am following the code provided by: http://www.ncfaculty.net/dogle/fishR/gnrlex/VonBertalanffy/VonBertalanffy.pdf. Specifically the section on VBGM Comparisons between groups. ? This code is pretty cut and dry. I am able to run it perfectly with the "fake" data that is provided. But when I run it with my own
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2018 May 28
3
How to generate a conditional dummy in R?
Hi everyone, I am trying to generate a conditional dummy variable ?X" with the following rules set X=1 if Y is =1, two years prior to the NA. [0,0,NA]. For example, if the pattern for Y is 0,0,NA then the X variable is =0 for all the two years prior to the NA. If the pattern for Y is 0,1,NA or 1,0,NA then the X =1 . To be clear, if 1,1,NA then the X=1 that first specific year, it
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) install.packages("systemfit")
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end. I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis. I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal. On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2018 May 15
1
Systemfit
Unless there is good reason not to, always cc the list -- there are lots of smarter folks than I on it who can help. I may or may not have time to look at this. Hopefully someone else will. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
2011 Jan 17
1
filling in datasets of differing lengths
g''day all, I need help with this please. I have a dataset of site names and years they were trapped in (a subset of it is bs, below) and a dataset of sites that actually caught animals (subsetted as brep, below). I need to add to brep, a row with a zero in the classcount column, for every year each site was trapped but caught nothing. so for Site 1, I need to add rows that say
2018 May 29
0
How to generate a conditional dummy in R?
Hi Faradj, What a problem! I think I have worked it out, but only because the result is the one you said you wanted. # the sample data frame is named fkdf Y2Xby3<-function(x) { nrows<-dim(x)[1] X<-rep(0,nrows) for(i in 1:(nrows-2)) { if(!is.na(x$Y[i])) { if(x$Y[i] == 1 && any(is.na(x$Y[(i+1):(i+2)]))) X[i]<-1 if(i > 1) { if(X[i-1] == 1) X[i]<-0 } }
2018 May 29
1
How to generate a conditional dummy in R?
Dear Jim, wow! It worked! Thanks a lot. I did as you suggested and it worked well with the real data. Although it gave me this error: Error in if (!is.na(x$Y[i])) { : argument is of length zero. For some reason the X1 produced less observations than it is in the data. But it's not a big deal - I identified those cases and simply deleted from the data (it was countries that only appeared
2015 May 25
0
foreach hangs when using doMPI on Windows with Microsoft MPI
??I installed Microsoft MPI. Then installed the foreach and Rmpi packages. Then built doMPI from source. mpi.remote.exec works. foreach hangs with the main process and all worker processes idle. I launch my script with mpiexec: "C:\Program Files\Microsoft MPI\Bin\mpiexec" -n 3 "C:\Program Files\R\R-3.2.0\bin\x64\Rterm.exe" --no-save -q -f "MPI Test.r" The
2009 Mar 07
2
piecewise linear regression
Hi - I'd like to construct and plot the percents by year in a small data set (d) that has values between 1988 and 2007. I'd like to have a breakpoint (buy no discontinuity) at 1996. Is there a better way to do this than in the code below? > d year percent se 1 1988 30.6 0.32 2 1989 31.5 0.31 3 1990 30.9 0.30 4 1991 30.6 0.28 5 1992 29.3 0.25 6 1994 30.3
2011 Apr 01
0
package MICE, squeeze function, calling several variables at once
Hello everyone!I have a data set with missing observations that I am trying to impute. I am using MICE and I would like the imputed values to all be positive. I have two types of variables: prices (P1 to P136) and quantities (Q1 to Q136) and I also want the range of these two types to be different. Besides these variables. I am using the squeeze function but I am unable to set it such that I
2012 May 15
0
How to set up an object to share data across diverse functions
In the past 6 months I've been struggling with an issue that has been raised periodically on the lists. This is the need to share information across a group of functions, possibly from different packages. So far I've found solutions that are either quite clumsy or else don't work as have (likely incorrectly) read the manuals. I'll be writing up my experiences as a way to help
2012 May 09
4
[Patches]mesa/nv30: Diverse set of patches that improve NV3x render quality
For all these patches I'd say: testers are welcome. The first three patches seem good enough to push as we speak IMHO (so if you agree, go ahead!), whereas for the fourth I don't know if this is the desired way to fix. The result of these four patches is that NV34 gives a nearly-correct desktop experience, where only some fading animations appear broken. It's quite useable now! [1/4]: