[R] return() in nested functions

2007-07-14 Thread Mark Hempelmann
Dear WizaRds, After consulting different sources I am still unable to understand the correct use of return() in nested functions. To illustrate the problem: f - function(x,y,type){ est1-function(x,y){ z=x+y out(x,y,z)} est2-function(x,y){ z=x*y

[R] Conditional Selection of Columns for Tables

2007-01-27 Thread Mark Hempelmann
Dear Wizards - Thank you so much for your help. That was exactly what I was looking for. Now, I have been working on conditional selection of columns in a data frame. My goal is to calculate the total revenue per sales representative per status in a table. I have come to a complete

[R] select subsets in data frame

2007-01-10 Thread Mark Hempelmann
Dear WizaRds! A trivial question indeed on selecting subsets in data frames. I am sorry. Unfortunately, I did not find any helpful information on the introduction, searched the help archive and read in introductory books. Please help: I want to select column KB which is read via read.csv2 as

[R] Two Phase Sampling

2006-07-11 Thread Mark Hempelmann
Dear WizaRds, I tried to construct a two-phase sampling design in Survey just the way I hoped understood in Vienna - I was wrong. I think I am too stupid to create the correct subset for phase 2. Phase1: Sample 1000 parts with 80 defective. Phase2: Sample 100 parts out of these 1000

[R] Multistage Sampling

2006-07-07 Thread Mark Hempelmann
Dear WizaRds, dear Thomas, First of all, I want to tell you how grateful I am for all your support. I wish I will be able to help others along one day the same way you do. Thank you so much. I am struggling with a multistage sampling design: library(survey) multi3 -

[R] persp/ scatterplot3d

2006-06-28 Thread Mark Hempelmann
Dear WizaRds, I would like to create a 3d-plot with persp(). I sampled 17 points with xyz-coordinates (real-life example!), representing the peaks of the whole plane with zero coordinates x=3,y=3,z=3. My intention is to show which entries are above or below the zero level with persp() on a

[R] Post Stratification

2006-06-18 Thread Mark Hempelmann
Dear WizaRds, having met some of you in person in Vienna, I think even more fondly of this community and hope to continue on this route. It was great talking with you and learning from you. Thank you. I am trying to work through an artificial example in post stratification. This is my

[R] Survey - twophase

2006-06-05 Thread Mark Hempelmann
Dear WizaRds, I am struggling with the use of twophase in package survey. My goal is to compute a simple example in two phase sampling: phase 1: I sample n1=1000 circuit boards and find 80 non functional phase 2: Given the n1=1000 sample I sample n2=100 and find 15 non functional. Let's

[R] pairwise combinatons of variables

2006-03-25 Thread Mark Hempelmann
Dear WizaRds, although this might be a trivial question to the community, I was unable to find anything solving my problem in the help files on CRAN. Please help. Suppose I have 4 variables and want to use all possible combinations: 1,2 1,3 1,4 2,3 2,4 3,4 for a further kmeans

[R] kmeans Clustering

2006-03-23 Thread Mark Hempelmann
Dear WizaRds, My goal is to program the VS-KM algorithm by Brusco and Cradit 01 and I have come to a complete stop in my efforts. Maybe anybody is willing to follow my thoughts and offer some help. In a first step, I want to use a single variable for the partitioning process.

[R] Clustering and Rand Index - VS-KM

2006-01-08 Thread Mark Hempelmann
Dear WizaRds, I have been trying to compute the adjusted Rand index as by Hubert/ Arabie, and could not correctly approach how to define a partition object as in my last request yesterday. With package fpc I try to work around the problem, using my original data: mat - matrix(

[R] Clustering and Rand Index

2006-01-07 Thread Mark Hempelmann
Dear WizaRds, I am trying to compute the (adjusted) Rand Index in order to comprehend the variable selection heuristic (VS-KM) according to Brusco/ Cradit 2001 (Psychometrika 66 No.2 p.249-270, 2001). Unfortunately, I am unable to correctly use cl_ensemble and cl_agreement (package: clue).

[R] nls() fit to Kahnemann/ Tversky function

2005-10-31 Thread Mark Hempelmann
linear least-squares. It also seems the nls model tries to find ten different gammas, but I want only one single gamma parameter for the function. I appreciate your help and support. Thank you. sol lucet omnibus Mark Hempelmann __ R-help

[R] regression with restrictions - optimization problem

2005-09-09 Thread Mark Hempelmann
. Mark Hempelmann __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Survey - Cluster Sampling

2005-06-16 Thread Mark Hempelmann
Dear WizaRds, I am struggling to compute correctly a cluster sampling design. I want to do one stage clustering with different parametric changes: Let M be the total number of clusters in the population, and m the number sampled. Let N be the total of elements in the population and n

[R] Survey and Stratification

2005-05-26 Thread Mark Hempelmann
Dear WizaRds, Working through sampling theory, I tried to comprehend the concept of stratification and apply it with Survey to a small example. My question is more of theoretic nature, so I apologize if this does not fully fit this board's intention, but I have come to a complete stop in my

[R] firefox and R 201

2004-12-12 Thread Mark Hempelmann
sorry if this problem was addressed earlier. R forever! viele grüße mark hempelmann universität bielefeld __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting