Displaying 20 results from an estimated 600 matches similar to: "Create variables with common values for each group"
2005 Oct 09
1
enter a survey design in survey2.9
Hi dears,
I expect that Mr Thomas Lumley will read this message.
I have data from a complexe stratified survey. The population is divide in 12 regions and a region consist to and urban area and rural one. there to region just with urbain area.
stratification variable is a combinaison of region and area type (urban/rural)
In rural area, subdivision are sample with probabilties proporionnal to
2011 Jun 16
1
Specify ID variable in daisy{cluster}
Hi All - I am using the daisy function from the cluster library to create a
dissimilarity matrix. I'm going to use that matrix to run a cluster
analysis. My participants are identified with the variable, hhid. However,
when I try to keep hhid in the dataset that I use to create the
dissimilarity matrix, daisy uses it to create the matrix rather than
ignoring it as an ID variable. I need to
2009 Jan 22
2
Converting ddf/dct/sas data definition file to R
Dear all,
I was wondering whether anyone knows about a program which converts
(part of) a data definition file (such as a .dct file for stata, or
.sas file for sas) into an R-script.
Here is an example with a .sas file:
<-- snipp
VALUE HTYPE (default=32)
0 = "Not in household"
1 = "Married couple family household"
2 =
2009 Aug 15
1
System is computationally singular and scale of covariates
Dear all,
I'm running a self-written numerical optimization routine (hazard
model) which includes computing the inverse of the outer product of
the score. I have been getting the above error message ("System is
computationally singular"), and after some tweaking, I realized that
these variables have some high numbers and the problem could be
circumvented by scaling them down (i.e.
2009 Jan 19
2
Using apply to generate matrix from rows?
Dear all,
I have a simple question which I unfortunately do not seem to be able
to solve myself. I have a (NxK) matrix and want to generate a new
matrix by multiplying each row with itself such that the new matrix
has dimension ((N*K)xK) (or better, generate an array with dimension
(K,K,N)). I tried apply, but that did not work. Any suggestions?
Thanks!
Stephan
## Here is a simple
2009 Jun 25
4
Using by() and stacking back sub-data frames to one data frame
Dear all,
I have a code where I subset a data frame to match entries within
levels of an factor (actually, the full script uses three difference
factors do do that). I'm very happy with the precision with which I can
work with R, but since I loop over factor levels, and the data frame is
big, the process is slow. So I've been trying to speed up the process
using by(), but I got stuck at
2011 Dec 26
4
Summary tables of large datasets including character and numerical variables
Hello !
I am attempting to switch from being a long time SAS user to R, and would
really appreciate a bit of help ! The first thing I do in getting a large
dataset (thousands of obervations and hundreds of variables) is to run a SAS
command PROC CONTENTS VARNUM command - this provides me a table with the
name of each variable, its type and length; then I run a PROC MEANS - for
numerical
2008 Nov 19
2
tapply and any
Dear all,
A quick question which I somehow cannto figure out: I want to apply
the function "any" to subsets of a dataset in order to create a vector
with TRUE/FALSE values, depending on whether a subset has the number
5. I.e.,
y <- matrix(c(1,2,3,3,4,5,5,6,6,7,5,1,1,3,5,NA,5,1,1,3),ncol=2)
> y
[,1] [,2]
[1,] 1 5
[2,] 2 1
[3,] 3 1
[4,] 3 3
[5,]
2009 Mar 30
1
Importing csv file with character values into sqlite3 and subsequent problem in R / RSQLite
Dear all,
I'm trying to import a csv file into sqlite3 and from there into
R. Everything looks fine exepct that R outputs the character values in
an odd fashion: they are shown as "\"CHARACTER\"" instead of
"CHARACTER", but only if I show the character variable as a
vector. Does someone know why this happens? Below is a sample
code. The first part is written in
2011 Feb 28
4
mlogit.data
I am trying to estimate multinomial logit models off of a .csv table in
IDCASE IDALT format where I have
ROWS HHID PERID CASE ALTNUM NUMALTS CHOSEN IVTT OVTT TVTT COST DIST
WKZONE HMZONE RSPOPDEN RSEMPDEN WKPOPDEN....
1 1 2 1 1 1 5 1 13.38 2.00 15.38 70.63 7.69
664 726 15.52 9.96 37.26
2 2 2 1 1 2 5 0 18.38 2.00
2003 Jan 03
4
factor analysis (pca): how to get the 'communalities'?
Dear expe-R-ts,
I try some test data for a factorAnalysis (resp. pca) in the sense of Prof.
Ripley's MASS ? 11.1, p. 330 ff., just to prepare myself for an analysis of my
own empirical data using R (instead of SPSS).
1. the data.
## The test data is (from the book of Backhaus et al.: Multivariate ##
Analysemethoden. Springer 2000 [9th ed.], p. 300 ff):
2004 Aug 06
2
pull relay problems
i was using multiple ports because that's how i figured i'd have to do
it.
o, mounting the remote source locally? i'm not familiar with how to do
this. i'm also not seeing how to do this in the docs.
how would i go about mounting a remote stream?
-a.j.
On Fri, 27 Apr 2001, Jack Moffitt wrote:
> Why are you using multiple ports at all? That's what mountpoints are
>
2006 Jul 04
1
using weights in lrm
Dear all,
just a quick question regarding weights in logistic regression. I do
results <- lrm(y.js ~
h.hhsize
+ h.death1
+ h.ill1
+ h.ljob1
+ h.fin1
+ h.div1
+ h.fail1
+ h.sex
+ h.ch.1
2004 Aug 06
2
pull relay problems
heya...
i'm extremely new to the list (10 minutes), and i have a burnin' question
that i was hopin' you folks could help me out with.
i'm running beos as an encoder box, with two streams (8000 and 8001)
hosted on it.
the idea is to use my redhat box to relay those streams to the public
using icecast, allowing the be machines cpu cycles to focus solely on
encoding.
anyway, i
2003 May 11
1
Mac OS X canonically decomposed UTF-16 filenames
Hi.
I'd like to find some way for Samba to convert the filenames created
by Macintosh OS X into something windows can use.
According to their docs:
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/FileSystem/chapter_9_section_13.html
filenames are stored as
canonically decomposed Unicode 2.1 in UTF-16 format (a sequence of
16-bit codes)
Samba running on a
2008 Feb 25
3
Whitespace in img src
Hello,
markdown (Python implementation) seems to render:
![alternativer text](pfad/und/eine lange/url zum bild.jpg)
to
<img src="pfad/und/eine" title="lange/url zum bild.jpg"
alt="alternativer text"/>
breaking the URL at the whitespace. AFAIK whitespaces are ok in URLs
so why is it breaking up the URL here?
Thanks,
Florian
--
I'm using an
2004 May 04
6
Runtime Error - abnormal program termination
Hi,
I'd like to run a win-prog with Linux but it fails: Runtime Error -
abnormal program termination.
In the console I get the following infos:
fixme:ole:CoCreateInstance no classfactory created for CLSID
{48071bd8-a9f0-11d0-954b-00a0c911760e}, hres is 0x80040154
fixme:ole:MSFT_ReadValue BSTR length = -1?
fixme:ole:ITypeLibComp_fnBind (L"Now", 10ba25, 0x3, 0x406ef200,
2013 Aug 22
3
Deduplication
Hello,
some questions regarding btrfs deduplication.
- What is the state of it? Is it "safe" to use?
https://btrfs.wiki.kernel.org/index.php/Deduplication does not yield
much information.
- https://pypi.python.org/pypi/bedup says: "bedup looks for new and
changed files, making sure that multiple copies of identical files
share space on disk. It integrates deeply with btrfs so
2008 Feb 13
3
Syntax for extensions
Hello,
I need to to slightly extend the markdown syntax. (place an image (img tag)
in text which URL has not yet been determined). Therefore I want to define
something like $[Alt text](img.jpg) which would be replaced by my
pre-processor with ![Alt text](/path/to/img.jpg) and then sent to markdown.
Is there any special syntax that should be used for such 3rd party extensions?
How would you do
2009 Sep 20
1
Computing the sum of cross products of rows of a matrix
Hi everyone,
I would like to compute the sum of cross products of rows of a
matrix. Does anyone know how to do this without an explicit loop for
computational efficiency? Below is a code example.
Thanks!
Stephan
# I.e., if I have a matrix like this
x <- matrix(rep(c(1,2,3),3),ncol=3)
## > x
## [,1] [,2] [,3]
## [1,] 1 1 1
## [2,] 2 2 2
## [3,] 3 3