similar to: newbie Syntax questions: Re-Calculating expansion factors

Displaying 20 results from an estimated 200 matches similar to: "newbie Syntax questions: Re-Calculating expansion factors"

2008 Nov 05
1
How do I read a text (.csv) file to match a matrix/cross tab? (Object confusion??)
I'm having a problem reading data to set control totals for a dataframe. I want to adjust a dataframe based on a 2-d table of values, which I get by using : > CurrentX1Sums <- as.matrix(xtabs(~tripid_nu+lineon, data=SurveyData)) > CurrentX2Sums <- apply(CurrentX1Sums, 1, sum) I've created a .csv file with new (target) sums that looks like this: tripid_nu Warner
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
I want to calculate "expansion factors" for elements in my dataframe based on a 2-d cross classification. Since I'll have "missing values" (many combinations will have no record) I'll need a second "expansion factor" for each "row". I've included my "work to date" below, but I'm not very close to getting this right. My
2008 Oct 31
0
Why are these different?
I want to import some "target values" to normalize elements of a dataframe. I'm summarizing the existing totals using as.matrix(xtabs(~tripid_nu+lineon, data=SurveyData)) and reading a .csv table of target values. I can't even get them to list out as similar data items. My idea is to do something like this, but I don't know how to do it in R
2008 Aug 18
1
Survey Design / Rake questions
I'm trying to learn how to calibrate/postStratify/rake survey data in preparation for a large survey effort we're about to embark upon. As a working example, I have results from a small survey of ~650 respondents, ~90 response fields each. I'm trying to learn how to (properly?) apply the aforementioned functions. My data are from a bus on board survey. The expansion in the
2008 Nov 07
2
Faster way to combine data sets with different date ranges
I am trying to combine two data sets, one with daily values and one with weekly values.  SurveyData conatins environmental data collected on a daily basis.  sat.data contains satellite sea surface temperature that is an average of satellite measurements over a six day period.  I would like to combine the two files so that my output file has the daily dates from SurveyData and the weekly average
2008 Aug 14
2
Simple (?) subset problem
I can't figure out the syntax I need to get subset to work. I'm trying to split my dataframe into two parts. I'm sure this is a simple issue, but I'm stumped. I either get all or none of the original "rows". > XTTable <- xtabs( ~ direction_ , SurveyData) > XTTable direction_ EASTBOUND
2009 Feb 06
0
Comparing weighted histograms?
I'm trying to plot and compare weighted histograms and I can't seem find where to start. I have data similar to this: Miles2LAX RADAM2005Pct LAWA2005Pct 35.57 .00123 .00684 24.74 .00118 .00187 27.09 .00965 .00876 16.23 .00587 .00397 { ...
2009 Feb 07
0
Problems with svyhist
I have two problems with svyhist. I hope this is easy, and it may be that "simple R syntax" will do what I need. 1) I'm able to get a single plot out, but I need to put two distributions in the same graphic to visually compare them. 2) I get uniform breaks at intervals of 10. I can plot the unweighted data using MyBreaks with hist as shown in the second code snippet
1999 Jun 07
1
data.frame
I am not sure if I should call this a bug or just a design imperfection. I have noticed that the data.frame function does not preserve the integrity of multivariate components. Here is a simple illustration: > x <- matrix(1:6,3,2) > y <- 1:3 > z <- data.frame(x=x,y=y) > z$x # NULL > z$y # [1] 1 2 3 One can however get by that by using model.frame: > zz <-
2008 Jun 17
1
read.spss {foreign} doesn't work over network?
I'm unable to open an SPSS file over my network. If I copy it to my local C:/ drive I can read it. I saved the command (in a "crib sheet" text file) in order to avoid all the typing, so I'm pretty sure I've done it before. I verified that the file I'm trying to read is OK. This is what happens: > SurveyData <-
2009 Nov 22
2
how to read BRFSS file
hello, I am trying to do exploratory factor analysis with BRFSS dataset ( http://www.cdc.gov/brfss/technical_infodata/surveydata/2008.htm) for a couple of days, but I was not able to do that and got frustrated. Can anybody help me with step by step guide? BRFSS dataset provides ASCII or SAS format. Thank you. chloe [[alternative HTML version deleted]]
2003 Feb 11
2
Periods instead of spaces in dataframe names?
Basic question: when I use names() to extract the name of a dataframe element, why does it have "." instead of " " between words? Context: I'm importing a CSV file of survey results for analysis. I read them like this: df <- read.csv("surveydata.csv",nrows=40,header=TRUE,
2013 May 27
0
Variable labels in a data.frame
I'd like to take a different approach to the old question of dataset variable labels. Support for their use in output is low. For example, among packages that provide tables of model estimates only 'stargazer' provides support for these labels (apologies if I missed support from aprstable, memisc, texreg, xtable). Part of the lack of support could be that variable labels are not
2016 Feb 11
2
inconsistency in treatment of USE.NAMES argument
Changing the vapply() behavior makes sense in principle. I analyzed the CRAN code base using the R parser and found 143 instances of calling vapply with USE.NAMES=FALSE. These would need to be inspected to understand the consequences of the change. For reference: /AzureML/R/datasets.R:226 /BBmisc/R/toRangeStr.R:33 /DBI/R/DBDriver.R:205 /Kmisc/R/str_rev.R:37 /Matrix/R/diagMatrix.R:98
2017 Sep 01
4
Consejo
Estimados miembros de la comunidad de R Me gustaria conocer dado que estoy trabajando con datos del World Values Survey, y tengo que recodificar variables y manipularlas, por donde podria empezar a estudiar el uso de R en grandes surveys. Que podria comenzar a la leer. Su respuesta sera bienvenida saludos Antonio -- Member, Editorial Committee, *The Economic and Labour Relations Review* (a
2013 Mar 04
3
What package can I use to help me categorize comment responses?
Hi, We have comment questions from a survey that we need to categorize. What package and functions can I use in R to help do this? Daniel Lopez Lawrence Livermore Labs SHRM [[alternative HTML version deleted]]
2013 Oct 09
1
muestreo
Se quiere hacer una encuesta de actitudes a una población de 45000 personas, quisiera me sugirieran un script adecuado , he revisado algunos en epicalc, pero no encuentro la respuesta adecuada (prevalencia 0,5, error 5%) -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud.
2002 Jul 16
6
Sage Line 50
Hi all, I am attempting to get Sage to support their software if the files are on Samba (Linux). They (like a lot of people I've heard) say "We don't support Linux, Goodbye." even when the client is on Win98/NT. We have been having trouble on a particular site, and they refuse to support Sage Line 50 if the files are on Linux which is absurd, because Linux is much more
1999 Mar 24
0
Mounting Novell Volumes
I am Successfully running Samba under Linux as my server on my Home network. I will shortly be in a position to upgrade our Work network to Samba/Linux from Novell 4.1, however I have a small problem, I want in the short term to keep the Novell system useable as a fall back position, my plan is as follows :- The server is a Pentium2 PC with a SCSI HDD, I intend to fit another HDD into the
2002 Jun 20
0
NT 4.0 SP7
Guess what, after I posted I came across the list of hotfixes for after SP6 for NT4. It's basically SP7 under any other name - but requires SP6a installed. http://support.microsoft.com/default.aspx?scid=kb;en-us;Q299444& It's a whopping 13.99 Mb to download (or if you believe IE's figures more than their website, 14.1 )