similar to: How to get back POSIXct format after calculating with hist() results

Displaying 20 results from an estimated 300 matches similar to: "How to get back POSIXct format after calculating with hist() results"

2007 May 17
1
MICE for Cox model
R-helpers: I have a dataset that has 168 subjects and 12 variables. Some of the variables have missing data and I want to use the multiple imputation capabilities of the "mice" package to address the missing data. Given that mice only supports linear models and generalized linear models (via the lm.mids and glm.mids functions) and that I need to fit Cox models, I followed the previous
2010 Sep 23
1
How to pass a model formula as argument to with.mids
Hello I would like to pass a model formula as an argument to the with.mids function from the mice package. The with.mids functon fits models to multiply imputed data sets. Here's a simple example library(mice) #Create multiple imputations on the nhanes data contained in the mice package. imp <- mice(nahnes) #Fitting a linear model with each imputed data set the regular way works
2004 Feb 23
2
deleting elements from an array/object
Hello, I created a simple histogram with: myHist<-hist(myData) the object myHist now has two arrays (among the others): myHist$mids myHist$counts Since myHist$counts contains some "0", and I want to calculate the linear fit among myHist$mids and log(myHist$counts), I want remove the elements of both arrays where these "0" occurs. which are the possible solutions to
2004 Mar 29
2
cut and factor
Eric, thanks for quick reply. at first look I thought it is what I need, but, unfortunately, it doesn't applied to original data - it creates new data with loosing original indexes ! I want to keep indexes of original data, but replace original data with $mids of corresponding $breaks. So, if I have z = 1:10, t=hist(z,plot=F) > z [1] 1 2 3 4 5 6 7 8 9 10 > t$breaks [1] 0 2
2006 Mar 01
1
mice library / survival analysis
Hello folks, I am a relatively new user of R and created multiply imputed data sets with the 'mice' library. This library provides two functions for complete-data analysis on multiply imputed data set objects (lm.mids and glm.mids). I am trying to estimate a series of Cox PH regression models and cannot figure out the best way to do this. Is it possible with the mitools library?
2012 Mar 13
1
multi-histogram plotting
I have a vector x: table(x) 2 3 4 5 6 7 8 9 10 11 12 13 14 45547 11835 4692 2241 1386 820 593 425 298 239 176 158 115 15 16 17 18 19 20 21 22 23 24 25 26 27 94 88 76 67 47 46 40 20 30 22 20 33 14 28 29 30 31 32 33 34 35 36
2013 Feb 14
2
Plotting survival curves after multiple imputation
I am working with some survival data with missing values. I am using the mice package to do multiple imputation. I have found code in this thread which handles pooling of the MI results: https://stat.ethz.ch/pipermail/r-help/2007-May/132180.html Now I would like to plot a survival curve using the pooled results. Here is a reproducible example: require(survival) require(mice) set.seed(2) dt
2002 Nov 18
2
vector of center of
Hello I have a vector gd of 279 values of diameter of limpets. Using 'hist(gd, breaks=seq(10,60,5),plot=F)' I can obtain a vector of 10 centers of size-class ($mids). But I'd like to work on a vector of 279 values being the mids (centers of size-classes) corresponding to the respective 279 values in gd. I looked in the different manuals and in archives of list but didn't find
2009 Nov 06
2
Binning of integers with hist() function odd results (PR#14046)
Full_Name: Gerald Guglielmo Version: 2.8.1 (2008-12-22) OS: OSX Leopard Submission from: (NULL) (131.225.103.35) When I attempt to use the hist() function to bin integers the behavior seems very odd as the bin boundary seems inconsistent across the various bins. For some bins the upper boundary includes the next integer value, while in others it does not. If I add 0.1 to every value, then the
2013 Apr 05
2
Assessing the fit of a nonlinear model to a new dataset
Hi all, I am attempting to apply a nonlinear model developed using nls to a new dataset and assess the fit of that model. At the moment, I am using the fitted model from my fit dataset as the starting point for an nls fit for my test dataset (see below). I would like to be able to view the t-statistic and p-values for each of the iterations using the trace function, but have not yet worked out
2003 Mar 24
1
negative binomial regression
I would like to know if it is possible to perform negative binomial regression with rate data (incidence density) using the glm.nb (in MASS) function. I used the poisson regression glm call to assess the count of injuries across census tracts. The glm request was adjusted to handle the data as rates using the offset parameter since the population of census tracts can vary by a factor of
2011 Dec 31
1
Histogram omitting/collapsing groups
I have two large datasets (156K and 2.06M records). Each row has the hour that an event happened, represented by an integer from 0 to 23. R's histogram is combining some data. Here's the command I ran to get the histogram: > histinfo <- hist(crashes$hour, right=FALSE) Here's histinfo: > histinfo $breaks ?[1] ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 10 11 12 13 14 15 16 17 18 19 20 21
2011 Jul 29
3
Problems with ks.test()
Hi, I got two data point vectors. Now I want to make a ks.test(). I you print both vectors you will see, that they fit pretty fine. Here is a picture: http://www.jochen-bauer.net/downloads/kstest-r-help-list-plot.png As you can see there is one histogram and moreover there is the gumbel density function plotted. Now I took to bin-mids and the bin-height for vector1 and computed the
2008 Dec 30
1
extend summary.lm for hccm?
Hi! I am trying to estimate Engel curves using a big sample (>42,000) using lm and taking heteroskedasticity into account by using the summaryHCCM posted here by John Fox (Mon Dec 25 16:01:59 CET 2006). Having used the SIC (with MASS stepAIC) to determine how many powers to use I estimate the model: > # ========================================= > summary.lm(fit.lm.5) Call: lm(formula
2009 Sep 25
1
error while plotting
I am getting the following errors when I am trying to plot the data below. I cannot figure out the error. Error in plot.window(...) : need finite 'xlim' values In addition: Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In min(x) : no non-missing arguments to min; returning Inf 4: In max(x) :
2010 Nov 10
1
par mfrow in "function" problem
Hi all, I defined the following ############################# myhist=function(x){ hist(x,xlab="",main="") h=hist(x) xfit=seq(min(x),max(x),length=100) yfit=dnorm(xfit,mean(x),sd=sd(x)) yfit=yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) } ############################# individually, it worked fine however, if I used par(mfrow=c(2,2))
2010 Jan 22
2
Stata and R user GLM method
Hello people, I am in the process of migrating from Stata to R and I would like to check if my results are similar under the two softwares: Here is my GLM command under R nurse.model<-glm(pQSfteHT~dQSvacrateHTQuali3_2 + dQSvacrateHTQuali3_3 + dQSvacrateHTQuali3_4 + dQSvacrateHTQuali3_5 + cluster_32 + cluster_33 + cluster_34 ,family=binomial(link = "logit")) and below the stata
2008 Sep 01
3
another histogram question
Hi there, I hope this question is not as stupid as the one before ... I tried to shorten my histogram (because the distribution is quite skewed and I simply don't want to see the long tail but still use the histogram plot). How can I do something like this? (The example does not work but I don't know why...) data <- rnorm(100) # as example, of course this is not skewed... h <-
2010 Apr 23
1
help in conditional histogram
Dear Dr. Sarkar, When I try to run the codes, I found the following problem: > h<- sample(1:14, 319, rep=T) > c<- sample(1:14, 608, rep=T) > n<- sample(1:14, 1140, rep=T) > vt<-c(h, c, n) > ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) > > to<-data.frame(vt,ta) > library(lattice) Attaching package: 'lattice'
2019 Mar 01
2
Using Access Control Lists with SMB2/SMB3 Mounts on Linux Clients
Hi Jeremy, Hi Steve, Hi Ronnie, thanks for your replies and the profound discussion. I think, it's best to demonstrate my problem case along an real world example: The following log of a console sesssion shows how I am doing the mounts on behalf Linux Kernel CIFS-FS Module on the client side against a Samba 4.5 file server (both running on Debian Stretch 9.8) via SMB/CIFS resp. SMB2 protocol: