similar to: how to show a section of a matrix neatly (or row by row ) that satisfies some condition

Displaying 20 results from an estimated 1000 matches similar to: "how to show a section of a matrix neatly (or row by row ) that satisfies some condition"

2003 Mar 24
1
how to show a section of a matrix neatly (or row by row) that satisfies some condition
Hi all, I want to show the rows of a matrix (100x3) of which some of its elements satisfy a certain condition. In particular, how can I display the 2 rows of my matrix one after the other and not all all elements of column 1 first, then column 2 and so on. See the following. > finest[finest[,1] > 10^3] [1] 4.960632e+13 3.612619e+04 7.668204e+12 1.001911e+04 8.886153e-01 [6]
2010 Feb 15
1
get current window (device) size
Dear R-listers, I am writing a function that will generate a simple plot for the user . The size of the window (that contains the plot) may not be what the user wants. Supposing the user adjusts the window to a size of her/his choice, I would like to be able to save the new window size and specify the plot to be of this new window size when the user calls my function again. My question is
2010 Jun 24
0
Snowfall: "cannont open connection " problem
Dear R-listers, I have been using Snowfall (version 1.84) for parallel computing on a quad-PC running Windows 7 for a month or so without much problem. I started having problems runnnig R with Snowfall over our network when a new Novell client was installed for Windows 7. I experinenced network mapping problem with this new client. Our network colleague provided a fix which worked but a little
2011 Jun 02
0
allowing individual level correlations to differ by cluster in lme in R
Dear R-listers, I am fitting bivariate mixed models for cost-effectiveness data of cluster randomized trials using lme in R. So I have individuals nested within clusters. My response variable is a vector with bivariate response (individual level costs and effects) stacked into a single column. The covariates in my models are a constant and a treatment term. They are response-specific, e.g. a
2003 Mar 05
3
reading in tab delimited data in a loop
Dear all, I need to read in 4 sets of tab delimited data in a loop. The 4 data sets are called "simu1.dat", "simu2.dat" and so on. I know what I need on the righthand side of the read.table expression but I can't the left hand side of it to work (see the line in bold below). Can you kindly help? Many thanks. simu1 <- matrix(0,30,3) simu2 <- matrix(0,30,3) simu3
2008 Aug 20
3
bug in lme4?
Dear all, I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore: library(lme4) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data
2007 Dec 20
3
mle
Dear all, I'm trying to estimate the parameters of a special case of a poisson model, where the specified equation has an integral and several fixed parameters. I think that the MLE command in STATS4 package could be a good choice, but it's a little complicated. I've got some problems with the offset and I don't understand some of the functions. Do you know where can I find some
2008 May 28
1
postscript
Hello, I'm trying to save a graph as a .ps file to include it in a LaTex presentation, but R replies: Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font database 2: font family not found in PostScript font database If I load the package grDevices and type "postscript()" then I can save it, but it creates also a text file saying:
2009 Feb 02
2
logLik for poisson models
Dear all, I have a very basic question: how does the logLik function work for poisson models? Example: I simulate 20 observations from a Poisson distribution with mean 800. y <- rpois(20,800) model <- glm(y ~ 1, family=poisson()) logLik(model) I would like to know what's the exact formula the function logLik uses. I looked at ?extractAIC but I cannot sort it out. Can you please
2009 Nov 13
1
multivariate meta-analysis with the metafor package
Dear Wolfgang Viechtbauer and R users, I have few questions regarding the development of the package 'metafor. As you suggested , I post to the R-help mailing list. I read you're planning an extension of this method to the multivariate case. I think it would be a useful tool. I'm currently performing some analyses with R on multiple outcomes, using the Stata command mvmeta to get
2008 Oct 31
1
AIC for quasipoisson link
Dear fellows, I'm trying to extract the AIC statistic from a GLM model with quasipoisson link. The formula I'm referring to is AIC = -2(maximum loglik) + 2df * phi with phi the overdispersion parameter, as reported in: Peng et al., Model choice in time series studies os air pollution and mortality. J R Stat Soc A, 2006; 162: pag 190. Unfortunately, the function logLik
2008 Jun 08
1
exponential distribution
Dear all, I've tried to solve the Es. 12, cap 4 of "Introduction to GLM" by Annette Dobson. It's about the relationship between survival time of leukemia patients and blood cell count. I tried to fit a model with exponential distribution, first by glm (family gamma and then dispersion parameter fixed to 1) and then with survreg. They gave me the same point estimates but the
2010 Jan 04
1
glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)
Dear R users, I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions. My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random effects for linear splines components (see Durban et al, Stat Med 2005, or " Semiparametric regression" by Ruppert et al,
2009 Jul 20
0
new package 'dlnm' to run distributed lag non-linear models
Dear R Community, I am pleased to announce the release of a new package called 'dlnm', now available on CRAN (version 0.2.1). The package dlnm provides some facilities to run distributed lag models (DLM's) and their non-linear extension (DLNM's), a modelling framework to describe simultaneously non-linear and delayed effects between predictors and an outcome in time-series
2009 Jul 20
0
new package 'dlnm' to run distributed lag non-linear models
Dear R Community, I am pleased to announce the release of a new package called 'dlnm', now available on CRAN (version 0.2.1). The package dlnm provides some facilities to run distributed lag models (DLM's) and their non-linear extension (DLNM's), a modelling framework to describe simultaneously non-linear and delayed effects between predictors and an outcome in time-series
2009 Aug 03
0
problem with predict(...,type="terms")
Hello R users, I'm trying to understand the meaning of the results returned by the command 'predict' with type="terms". I thought it was the matrix with the fitted values for each term (value of predictor * related coef), but the calculation is different. I include an example below: y <- rnorm(10) x1 <- rnorm(10) x2 <- rnorm(10) model <- lm(y ~ x1 + x2)
2009 May 20
0
function returning the name of an object
Hello R users, I'm trying to solve an apparently simple problem. I include a matrix in a model formula, and I want then to extract the related coefficients. Basically, I want a function func such that: mymatrix <- cbind(rnorm(10),rnorm(10)) y <- b <- rnorm(10) model <- lm(y ~ b + mymatrix) func(mymatrix,model) which returns only the 3rd and 4th coefficients. I thought to
2008 Aug 19
1
R vs Stata on generalized linear mixed models: glmer and xtmelogit
Hello, I have compared the potentials of R and Stata about GLMM, analysing the dataset 'ohio' in the package 'faraway' (the same dataset is analysed with GEE in the book 'Extending the linear model with R' by Julian Faraway). Basically, I've tried the 2 commands 'glmmPQL' and 'glmer' of R and the command 'xtmelogit' of Stata. If I'm not
2010 May 14
7
[Bug 28107] New: [NV31]
https://bugs.freedesktop.org/show_bug.cgi?id=28107 Summary: [NV31] Product: xorg Version: unspecified Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau AssignedTo: nouveau at lists.freedesktop.org ReportedBy: finest.bug at
2012 Jan 05
1
Fwd: WHO Anthro growth curve macros and R&In-Reply-To=<CAAOCNNZawGtKkWpgFMYADSyxWGTeWEDxqVVHv7=Azo=1G+H9gg@mail.gmail.com>
Dear Gustaf, I wish you a happy new year! I am a PhD Staff at LSHTM and I have been trying to use WHO anthro macros in R with the file you posted on internet but when I double check the WHZ, HAZ, WAZ output with output from ENA or STATA, it differs slightly. Do you have any idea why that might be the case? Many thanks Severine