similar to: SPSS and library(foreign)

Displaying 20 results from an estimated 700 matches similar to: "SPSS and library(foreign)"

2007 Feb 09
1
Using variable names in for loops - Generating plots semi-automatically from a series of variables Partly solved
Hi, This code is trying to produce a series of graphics files, with plots of male and female disease rates by age, one plot per disease. The dataframe contains a variable 'Age' and a set of variables called 'Male_CVD, Female_CVD,Male_RTA,Female_RTA, and so on. For each disease, I want to pull out the column of data containing the word 'Male' and plot this against age, and then
2024 Feb 20
1
Network issue
Hi Stephen, Thanks very much for getting back to me. My problem is described below. Any help would be greatly appreciated. Thanks, James Hi, Sorry for bothering you because I know that your time is voluntary, but I would really appreciate some help. I work in a hospital in part of Ireland?s national health service, a service which was struck by a massive cyber attack a couple of years ago. Since
2005 Nov 18
2
R-News 5/2, Bayesian Model Averaging, a detail
The article on BMA (Bayesian model averaging) presents most valuable tools for model selection, but I find one detail confusing in Example 1. In page 4 of RNews 5/2, second paragraph says that the probability of Time variable not being in the model is 0.445. It seems to me that the figure should be 1 - 0.445 = 0.555, because p!=0.445 is the prob. of Time variable being in the model. The plot in
2010 Aug 04
4
Passing the name of a variable to a function
Dear colleagues, I have a problem which has bitten me occasionally. I often need to prepare graphs for many variables in a data set, but seldom for all. or for any large number of sequential or sequentially named variables. Often I need several graphs for different subsets of the dataset for a given variable. I run into similar problems with other needs besides graphing. What I would like to
2005 Oct 14
1
Predicting classification error from rpart
Hi, I think I'm missing something very obvious, but I am missing it, so I would be very grateful for help. I'm using rpart to analyse data on skull base morphology, essentially predicting sex from one or several skull base measurements. The sex of the people whose skulls are being studied is known, and lives as a factor (M,F) in the data. I want to get back predictions of gender, and
2002 Feb 04
2
Help with accessing elements of a list
Hi, As part of the analysis of a longitudinal study, I have a list, called wg, on R 1.3.1 for windows created as follows - wg <- by(xx, xx$mrn, function(xx) lm(xx$maternal.wt ~ xx$gestation, data=xx)) xx is a data.frame, and so wg contains the results of 293 linear regressions, as lm objects. Now what I want is to extract the 293 intercepts and regression coefficients as a vector, and
2006 Jul 18
1
Classification error rate increased by bagging - any ideas?
Hi, I'm analysing some anthropometric data on fifty odd skull bases. We know the gender of each skull, and we are trying to develop a predictor to identify the sex of unknown skulls. Rpart with cross-validation produces two models - one of which predicts gender for Males well, and Females poorly, and the other does the opposite (Females well, and Males poorly). In both cases the error
2011 Jan 05
3
Advice on obscuring unique IDs in R
Dear colleagues, This may be a question with a really obvious answer, but I can't find it. I have access to a large file with real medical record identifiers (mixed strings of characters and numbers) in it. These represent medical events for many thousands of people. It's important to be able to link events for the same people. It's much more important that the real record numbers
2011 Nov 19
1
Advice on recoding a variable depending on another which contains NAs
Dear colleagues, I would be very grateful for your help with the following. I have banged my head off this question several times in the past, and repeatedly over the last week. I have looked in the usual places and found no obvious solution. I fear that this just means I didn't recognize it, but I'd be very grateful for your help. I am scoring 8000 psychometric tests - the SCQ, if
2009 Mar 03
1
SPSS data import: problems & work arounds for GSS surveys
I'm using R 2.8.1 on Ubuntu 8.10. I'm writing partly to ask what's wrong, partly to tell other users who search that there is a work around. The General Social Survey is a long standing series of surveys provided by NORC (National Opinion Research Center). I have downloaded some years of the survey data in SPSS format (here's the site:
2003 Nov 20
3
Problem with Trellis graphics in nlme
Hi, I would be grateful for help with a problem which is irritating me. I am quite sure that I am doing something stupid, but I can't see what it is. I am running R 1.7 on Windows 2000. The graphics device is the PC screen. The graphics from the nlme demonstration in Bates an Pinheiro's manual work just as advertised. The CO2 data and the Orthodont data dsiplay
2009 Oct 10
7
SPSS long variable names
Hello guys I am new to this list and for R too. I am wondering if there is a patch for the SPSS reading code on the foreign package, in order to be able to read long variable names. Right now read.spss() just trunc the names to 8 characters. Or if someone could help me on other way: I have to process everyday a lot of SPSS Syntax Files and Dat files that come from one system that can only export
2024 Feb 21
0
Network issue
Hi Stephen, Thanks again for getting back to me, Ivan Krylov responded also and suggested windows binaries and I must confess I was only familiar with installing from files via the package sources (apart from the conventional install.packages method), so the solution was as simple as installing via the binaries. Thanks again, best wishes, James From: stephen sefick <ssefick at gmail.com>
2011 Mar 25
2
library(foreign) read.spss warning
I got the following: > library(foreign) > swal = read.spss("swallowing.sav", to.data.frame =TRUE) Warning message: In read.spss("swallowing.sav", to.data.frame = TRUE) : swallowing.sav: Unrecognized record type 7, subtype 21 encountered in system file > The bulk of the data seems to read in a usable form, but I'm curious about what might be getting lost
2007 Apr 05
1
some SPSS 15 files wont open in R 2.4.0
Trying to open some SPSS .sav files (saved with SPSS 15) gives the following: read.spss('/data/big/unzipped_ukda/seh3767/3767SPSS_570D6A086C9A1B0636F13255F25A58C1/prgrp95.sav') Error in read.spss("/data/big/unzipped_ukda/seh3767/3767SPSS_570D6A086C9A1B0636F13255F25A58C1/prgrp95.sav"): error reading system-file header In addition: Warning message:
2010 Sep 28
2
Problema con read.spss
Hola, Tengo problemas a la hora de cargar un archivo que originalmente está en SPSS. Trabajo con Fedora y uso R mediante el plugin Rgedit en gedit. Además en Fedora no tengo SPSS, sino PSPP Para cargar el archivo he probado estas dos cosas (escribo también el mensaje de error que me genera R): >library_(foreign) >read.spss("guille.sav",to.data.frame = T) Error en
2009 Jun 08
1
[LLVMdev] Replacing unconditional branches with conditional ones
Hi all, Somewhat of a newbie's question, hope you can help me out. I'm trying to turn unconditional BranchInst's into conditional ones (with a condition I'm supplying) branching between the original target and a basic block of my choice. Apparently the way to do that is to create a new conditional BranchInst and remove the unconditional one from its basic block. However when
2005 Feb 03
1
Efficient selection and alteration of dataframe records
Hi All, I am writing a simulation that examines the effects of species extinctions on ecological communties by sequentially removing individuals of a given species (sometimes using weighted probabilities) and replacing the lost individuals with species identities randomly sampled from the remaining individuals. Thus I use two dataframes. One contains all the individuals and their species
2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the behaviour of the nlm function. I've been (for better or worse) using the nlm function to fit a linear model without suppling the hessian or gradient attributes in the objective function. I'm curious as to why the nlm requires 31 iterations (for the linear model), and then it doesn't work when I try to add
2005 Oct 11
3
8 char labels in read.spss
I was wondering why it is possible to read long labels from the CVS files but not from the SPSS files. I did not have much time to search for the code but I found: in foreign_0.8-10 source file var.h.in > /* Definition of the max length of a short string value, generally > eight characters. */ > #define MAX_SHORT_STRING ((SIZEOF_DOUBLE)>=8 ? ((SIZEOF_DOUBLE)+1)/2*2 > : 8)