search for: dvumani

Displaying 18 results from an estimated 18 matches for "dvumani".

Did you mean: vumani
2005 Aug 04
2
drawing a network digraph
Dear R users, I have a matrix with 2 columns with the variables: "daughter index", "mother index". I would like to draw a network digraph using this data, where each daughter is connected to a mother and between the connections inlcude a circle with the information on the indices ("daughter index", "mother index"): i.e. something similar to graphs
2007 Jun 20
2
"xtable" results doesn't correspond to data.frame
Dear useRs, Am trying to use xtable on the following data.frame and I don't get what I expect: example.table <- data.frame(rbind( c("Gender"," "," "," "), cbind(rep(" ",2),c("Male","Female"),c(3.0,4.0),c(3/7,4/7)) )) colnames(example.table) <- c(" "," ","number of
2005 Mar 23
4
sampling from a mixture distribution
Dear R users, I would like to sample from a mixture distribution p1*f(x1)+p2*f(x2). I usually sample variates from both distributions and weight them with their respective probabilities, but someone told me that was wrong. What is the correct way? Vumani
2003 Jan 17
0
Re: Universal legend in plot
...that case, the legend (key in lattice) can be placed pretty much anywhere. Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia andreww at cheque.uq.edu.au On Friday, January 17, 2003 10:22 PM, Vumani Dlamini [SMTP:dvumani at hotmail.com] wrote: > Dear R-users: > > I asked a question on how I can have a universal legend in a plot and > received the following result. I tried using "layout" but I can't seem to > work on the "empty" plot (where I have to have the legend). I tried...
2003 Jun 16
1
Hmisc multiple imputation functions
Dear all; I am trying to use HMISC imputation function to perform multiple imputations on my data and I keep on getting errors for the code given in the help files. When using "aregImpute" the error is; >f <- aregImpute(~y + x1 + x2 + x3, n.impute=100) Loading required package: acepack Iteration:1 Error in .Fortran("wclosepw", as.double(w), as.double(x),
2004 May 27
2
manipulating elements of a vector
Dear R users; I would like to convert a series of vectors to matrices in the following way; (2,1,1) to a matrix 1 0 0 1 0 0 0 1 0 0 0 1 The idea is that the column sum of the matrix should be equal to the elements of the vector. Thanks. Vumani
2006 Mar 08
2
fitting a distribution using glm
it is easy to fit a distribution using fitdistr poisdata <- rpois(n = 100, lambda = 2) poismle <- fitdistr(poisdata, "Poisson") poismle but i would like to know whether its possible to get an identical result using glm. I use poistab <- data.frame(table(poisdata)) colnames(poistab) <- c("width","freq"); poistab[,"width"] <-
2003 Jan 22
1
something wrong when using pspline in clogit?
...ar2]<-mean(xvar) temp$xvar3[indices$var3]<-mean(xvar) totalmodel<-clogit(status~intercept1+intercept2+intercept3+pspline(xvar1)+pspline(xvar2)+pspline(xvar3)+strata(stratum),method="exact",temp) coef(totalmodel) >From: ripley at stats.ox.ac.uk >To: Vumani Dlamini <dvumani at hotmail.com> >CC: R-help at stat.math.ethz.ch >Subject: Re: [R] R analogue >Date: Mon, 20 Jan 2003 13:17:02 +0000 (GMT) > >On Mon, 20 Jan 2003, Vumani Dlamini wrote: > > > Is there any R analogue for the S+ function "na.gam.replace". > >No, for it is ta...
2003 Jan 17
2
Re: Universal legend in plot
Dear R-users: I asked a question on how I can have a universal legend in a plot and received the following result. I tried using "layout" but I can't seem to work on the "empty" plot (where I have to have the legend). I tried "oma" but I couldn't improve the quality of the plot, and that I didn't know how to specify all the line types using the
2004 Mar 25
3
subsetting based on vector
Dear R users; I am trying to write a small program which reads in a data set, and selects observations from certain years before the analysis. I have a problem including the selection criteria in the header of the program. Here is the problem; dataFIT<-function(MODEL, MARGINS, yearConsidered){ library(foreign CovPaper<-read.spss("C:/Data/data.sav") NewData <-
2002 Jul 29
0
multinomial probit
Is there any library for fitting multinomial probit using either likelihood or the "method of simulated moments" or both. I presume it would be possible to write a family function in VGAM for the multinomial probit, but was hoping that someone has done it already. Thanking you as always. Vumani Dlamini CSO-Swaziland
2003 Jan 20
1
R analogue
Dear R users: Is there any R analogue for the S+ function "na.gam.replace". I would like to make an interaction of a categorical and smooth continuous covariate. Thanks. Vumani Dlamini Central Statistical Office Swaziland
2003 May 09
1
manipulating elements of a matrix
Dear R users: I have the following matrix. 0 1 1 0 1 0 2 1 0 3 0 0 I would like to spread the matrix such that whenever the row sum is greater than 1 the row is repeated the number of times given by the row sum. Furthermore I would like to split the following cases: 0 1 1 such that it map to the following matrix 0 1 0 0 0 1 such that each row adds up to 1. I have no problems with cases
2005 Jun 01
1
"\n" in legend using substitute and as.expression
Dear R users, Is it possible to force a hard return in an expression. I tried including one for a legend using an expression and it didn't work. Here is my code, legend(12, 0.10, c("Fitted density", as.expression(substitute(paste("Weibull (", alpha==shapeU," , ", beta==scaleU,") Mean = ",meanU," days"), list(shapeU =
2008 Aug 15
1
estimating the proportion without recurring ailment based on the nelson-aalen estimator
Dear useRs, I'm trying to estimate the proportion of individuals with a without a certain recurring ailment at several times points. The data are of the survival type, with "start"-"stop" dates and whether the individual had the ailment in that interval. Some cases are observed until database closure and some died or are lost to followup. The interest is not on death. I
2006 Jun 29
1
using "rbinom" in C code gives me erroneous results... random variable is not random (always zero)...
Dear Listers, I am trying to use "rbinom" in my C code, but i always get zeros as output no matter the probability. Am not sure what I am doing wrong because the function has worked before. Attached in an example. Noticed that "rbinom" expects 'n' to be REAL. Regards, Vumani R 2.3.1 (2006-06-01) Windows XP Gcc /* Called this file binom.c and then ran rcmd shlib on it
2006 Jul 05
1
i suspect that there a memory leak in "vmmin"?
Dear listers, Am currently using MCMC approaches to estimate some parameters of my model. One parameter has to be updated using a tuned gamma distribution. So at each iteration I estimate the mean and variance of the density of the gamma approximation using "vmmin" (i also supply the gradient argument). For moderate replications the procedure works, but if I increase them R crashes.
2003 Aug 20
1
query on converting survey data from one structure to another
Dear R users, I am trying to convert a dataset from one format to several rectangular datasets. A consultant helped design the data entry program for our survey using Delphi/Pascal and for each household the information is stored in a file called "EA-HM-HH.TXT" where EA is the enumeration area number, HM is the homestead number and HH is the household number. Within this file the