similar to: read.spss in R 2.1.0 & make basic dataframe

Displaying 20 results from an estimated 4000 matches similar to: "read.spss in R 2.1.0 & make basic dataframe"

2005 May 31
1
apply the function "factor" to multiple columns
I have a case where I would like to change multiple columns containing numbers to factors. I can change each column one at a time as in: TEMP.FACT$EXPOS01<-factor(TEMP.FACT$EXPOS01,levels=c(1,2,3),labels=c("No ne","Low Impact","MedHigh Imp")) TEMP.FACT$EXPOS02<-factor(TEMP.FACT$EXPOS02,levels=c(1,2,3),labels=c("No ne","Low
2006 Jan 05
4
ylim problem in barplot
R Version 2.2.0 Platform: Windows When I use barplot but select a ylim value greater than zero, the graph is distorted. The bars extend below the bottom of the graph. For instance the command produces a problematic graph. barplot(c(200,300,250,350),ylim=c(150,400)) Any help would be appreciated. Paul [[alternative HTML version deleted]]
2005 May 31
3
lars / lasso with glm
We have been using Least Angle Regression (lars) to help identify predictors in models where the outcome is continuous. To do so we have been relying on the lars package. Theoretically, it should be possible to use the lars procedure within a general linear model (glm) framework - we are particular interested in a logistic regression model. Does anyone have examples of using lars with logistic
2005 Sep 09
2
Simulate phi-coefficient
Looking for help with the following problem. Given a sample of zeros and ones, for example: > VECTOR1<-rep(c(1,0),c(15,10)) > VECTOR1 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 How would I create a new sample (VECTOR2) also containing zeros and ones, in which the phi-coefficient between the two sample vectors was drawn from a population with a known
2006 Aug 24
2
Why are lagged correlations typically negative?
Recently, I was working with some lagged designs where a vector of observations at one time was used to predict a vector of observations at another time using a lag 1 design. In the work, I noticed a lot of negative correlations, so I ran a simple simulation with 2 matched points. The crude simulation example below shows that the correlation can be -1 or +1, but interestingly if you do this
2006 Jun 28
1
Simulate dichotomous correlation matrix
Newsgroup members, Does anyone have a clever way to simulate a correlation matrix such that each column contains dichotomous variables (0,1) and where each column has different prevalence rates. For instance, I would like to simulate the following correlation matrix: > CORMAT[1:4,1:4] PUREPT PTCUT2 PHQCUT2T ALCCUTT2 PUREPT 1.0000000 0.5141552 0.1913139 0.1917923 PTCUT2
2000 Dec 12
1
An SPSS save file for testing
Saikat DebRoy is working on a revised "foreign" package (currently in the src/contrib/Devel area on CRAN) that will include the ability to read the SPSS save format. Since we don't use SPSS we don't have easy access to a sample data set and have been using PSPP (see http://pspp.stat.wisc.edu/) to generate test data. It would be more realistic to have a small, redistributable
2005 Jan 24
1
mcnemar.test odds ratios, CI, etc.
Does anyone know of another version of the Mcnemar test that provides: 1. Odds Ratios 2. 95% Confidence intervals of the Odds Ratios 3. Sample probability 4. 95% Confidence intervals of the sample probability Obviously the Odds Ratios and Sample probabilities are easy to calculate from the contingency table, but I would appreciate any help on how to calculate the confidence
2005 Sep 27
1
Simulate phi-coefficient (correlation between dichotomous vars)
Newsgroup members, I appreciate the help on this topic. David Duffy provided a solution (below) that was quite helpful, and came close to what I needed. It did a great job creating two vectors of dichotomous variables with a known correlation (what I referred to as a phi-coefficient). My situation is a bit more complicated and I'm not sure it is easily solved. The problem is that I must
2004 Oct 26
1
read.spss Error reading system-file header
Hi Jake, I had and still have got the same problem. There were two columns in the data frame which contain just missing values. When I deleted those the impord seemed to work, but there is still a warning message. Warning message: C:\test.sav: Unrecognized record type 7, subtype 13 encountered in system file. > Jake Wegelin wrote: > Is there any documentation on what kind of SPSS
2003 Apr 21
3
Dates in read.spss
I am using read.spss in the foreign package to read an SPSS save file. For date variables I get huge values such as 11489990400. Does anyone know how to convert these values to R POSIXct date objects? Thanks in advance -Frank platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor
2006 Mar 23
1
gam y-axis interpretation
Sorry if this is an obvious question... I'm estimating a simple binomial generalized additive model using the gam function in the package mgcv. The model makes sense given my data, and the predicted values also make sense given what I know about the data. However, I'm having trouble interpreting the y-axis of the plot of the gam object. The y-axis is labeled "s(x,2.52)"
2004 Sep 21
2
Bootstrap ICC estimate with nested data
I would appreciate some thoughts on using the bootstrap functions in the library "bootstrap" to estimate confidence intervals of ICC values calculated in lme. In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance the ICC in the following example is 0.116: > tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT) > VarCorr(tmod) IDGRUP = pdLogChol(1)
2005 Dec 15
1
bug?
> library(foreign) > da<-read.dta(file.choose()) > da startdat starttim enddate endtime days hoursmin secused 1 2005-01-11 2 2005-12-15 20.19 NA NA 9 > attributes(da) $datalabel [1] "Example of use of date and time functions" $time.stamp [1] "15 伿伄伓侢佋伮 2005 20" $names [1] "startdat" "starttim"
2000 Feb 02
1
Large data sets and aggregation
I've noticed quite a few messages relating to large data sets bedeviling R users, and having just had to program my way through one that actually caused a "Bus error" when I tried to read it in, I'd like to ask two questions. 1) Are there any facilities for aggregation of data in R? ( I admit that this will not do much for the large data set problem immediately) 2) Is there any
2012 Nov 22
2
BibTeX entries in CITATION file
Dear List, While trying to define a customised CITATION file for a package, following R-exts, I realised that if I use only one 'citEntry' I got both a text description and a BibTex entry for the package, as for the 'nlme' package: -------------------------- citation('nlme') To cite package 'nlme' in publications use: Jose Pinheiro, Douglas Bates, Saikat
2003 Oct 09
1
An artifact of base being namespace
Function in the base library of R 1.8.0 seems to use a search path with base coming before the local environment. I think this is intentional and is related to base being a namespace. > log <- function(x, base) 200 > log(1) [1] 200 > log10 function (x) log(x, 10) <environment: namespace:base> > log10(1) [1] 0 > This is most problematic when you are creating a
1999 Nov 03
3
bug in Rdconvlib.pl converting to latex (PR#311)
If .../<pkg>/man/ contains a filename beginning with [, such as [.datetimes, Rdconvlib.pl cannot convert that help file into latex at INSTALL time. [Using --no-latex is a workaround.] The error given is: # R INSTALL ssCatalogues : help >>> Building/Updating help pages for package `ssCatalogues' Formats: text html latex example /^[.datetimes$/: unmatched [] in regexp at
2001 Mar 21
1
Is there any help for "Cannot allocate vector size of xxx KB"
Forgive me if this isn't relevant, but: are you stripping off the output you need (e.g., parameter estimates) and throwing away what you don't (e.g., residuals)? Reid Huntsinger -----Original Message----- From: Saikat DebRoy [mailto:saikat at stat.wisc.edu] Sent: Wednesday, March 21, 2001 12:15 PM To: Han Lai Cc: R-help Subject: Re: [R] Is there any help for "Cannot allocate vector
2008 Nov 24
1
FW: read.ssd
Did not seem to reach Saikat DebRoy, this might be the forum. Bendix -----Original Message----- From: BXC (Bendix Carstensen) Sent: 24. november 2008 15:00 To: 'saikat at stat.wisc.edu'; 'stvjc at channing.harvard.edu' Subject: read.ssd It's always annoyed me that that read.ssd crashed on datasets with long variable names, but the other day a collegue of mine pointed out to