similar to: rv package, rvnorm function

Displaying 20 results from an estimated 100 matches similar to: "rv package, rvnorm function"

2010 Oct 25
2
Question on passing the subset argument to an lm wrapper
Hello, How would you go about handling the following situation? This is on R 2.12.0 on Ubuntu 32-bit. I have a wrapper function to lm. I want to pass in a subset argument. First, I just thought I'd use "...". ## make example reproducible set.seed(123) df1 <- data.frame(age = rnorm(100, 50, 10), bmi = rnorm(100, 30, sd = 2)) ## create a wrapper using
2006 Apr 13
1
Subset rows over multiple columns
I have a data frame where I need to subset certain rows before I compute the mean of another variable. However, the value that I need to subset by is found in multiple columns. For example, in the data below the value R0000160 is found in the first and second columns (itd_1 and itd_45). These data are student responses to multiple choice test items from a computer adaptive test. So, the variable
2001 Aug 17
2
Principle Component Analysis
I have the manual for S+ 6 and I'm trying to use R for the Principle Component Analysis example and I'm getting a few interesting answers... The log is as follows: R : Copyright 2001, The R Development Core Team Version 1.3.0 (2001-06-22) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type `license()' or
2011 Mar 10
0
confidence intervals when using polr()
Hello, I am running a model with four categories and want predicted probabilities in each category. Now for this example I wont give a counterfactual just the training data is fine but is there anyway to get a confidence interval around the predicted probabilities in each group? I have tried but it gives me probabilities and I have used interval="confidence", level=.095 and then interval
2005 May 01
2
eigen() may fail for some symmetric matrices, affects mvrnorm()
Hi all, Recently our statistics students noticed that their Gibbs samplers were crashing due to some NaNs in some parameters. The NaNs came from mvrnorm (Ripley & Venables' MASS package multivariate normal sampling function) and with some more investigation it turned out that they were generated by function eigen, the eigenvalue computing function. The problem did not seem to happen
2005 Dec 26
2
resorting a dataset
Quick question to see how I might re-sort an Activerecord data set. Let''s say I have this table: tablename: testscores | id | student | score | avg_for_year 1, steve, 85, 82 2, tom, 84, 92, 3, jim, 92, 95 In my controller, I have something like: t= Testscores.find(:all, :order => "score DESC", :limit => 2) ...where it would return the records for Jim and Steve.... My
2005 Dec 21
7
use of SET command in find_by_sql
Hi, I''m trying to execute something like this method in a model: def self.sql_for_rankings() sql = "SET @counter:=0;" sql << " SET @counter:=0; SELECT *, @counter:=@counter+1 AS rank FROM testscores. " find_by_sql(sql) end Where the new rank column is a kind of autoincrementer inside of
2000 Jul 27
2
batch mode in linux
I'm trying to learn how to use R version 1.1.0 under Mandrake Linux version 6.1. Using R interactively, I get good results. However, when I attempt to execute commands from a file (following the directions in section 1.10 of An Introduction to R, version 1.10) my output disappears. As a default or after a sink() command, I would expect to see output on the console, but none appears. After
2008 Aug 12
1
fPortfolio constraints, maxsumW
Running R version 2.6.1 under Gentoo Linux and using the fPortfolio package, I am having trouble specifying a sector constraint. One of the constraints to be imposed is that assets 1 and 2 together account for no more than 13.63% of the portfolio. My attempt at coding that constraint, "maxsumW[1:2Assets]=13.63" fails. The relevant section of my code file and the resulting error
2008 Aug 15
1
map("state" ...) Is the USA cracking up?
Running R version 2.6.1 under Linux, I'm trying to use the maps and mapdata packages and the state database to produce a thematic map of the USA. My problem is that cracks (white spaces) appear between some states--e.g. between Colorado and Utah and between Michigan and Indiana. The resulting visual impression is that the country is breaking up. This occurs in all the projections I have
2009 Aug 17
1
Bayesian data analysis - help with sampler function
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.   s <-Sampler( J=8, sigma.y  =c(15,10,16,11,9,11,10,18),           y  =c(28, 8,-3,7,-1,1,18,12),      theta =Gibbs(theta.update,theta.init),           V =Gibbs(V.update,mu.init),         mu =Gibbs(mu.update,mu.init),         tau =Gibbs(tau.update,tau.init),       
2008 Dec 20
2
Problems installing lme4 on Ubuntu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While I'm not an R expert, I have used R on Windows XP. Now I've moved to Ubuntu (Intrepid), and I'm trying to configure R to work with the Gelman and Hill _Data Analysis Using Regression and Multilevel/Hierarchical Models_. So far, it's not working. I start by following the instructions for installing arm and BRugs at
2001 Dec 23
1
ext3 on 2.2.20 w/2.2.19 patch?
Hey everyone, I am planning to set up a debian server using the 2.2 kernel tree (kernel 2.2.20) I have tried applying the 2.2.19 patch once but it spewed out some rejects. I went ahead and selected yes to the second fs development code. When I converted all my partitions to 'ext3' (by adding a journal) everything seemed to go well, but when I rebooted (bad shutdown) the computer during
2008 Aug 04
2
thematic map of USA
My goal is to prepare a thematic map of the US, with states shaded according to their values for a variable of interest. I would like to include an inset for Alaska in the upper left and an inset for Hawaii in the lower left. If possible, I'd like to use Albers conic projection, or something similar. Thus far I have tried using the maps package with its state database (which omits
2008 Apr 30
1
R isn't finding tcltk
On a x86 machine operating under Gentoo Linux, I'm having persistent difficulty in getting R version 2.6.1 (the latest available through Gentoo's portage system) to use tcltk. The R command library(tcltk) elicits the following response: Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users, I am trying to use the following code to reproduce results from Prof. Gelman's book, but have the listed error for R2WinBUGS version (the openbugs version is good). I am using R-2.6.1 on windows XP, and all the R packages are most current ones. schools.bug can be found at http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone help me to figure out what's
2000 Sep 07
3
plot with two y axes
I'm trying to make a transition from S-plus under Windows to R under Linux. My immediate aim is to produce a scatter plot with two y-axes with different scales. That can be done in S-plus with a command of the following form: guiPlot( PlotType="Scatter", DataSet="execon", Columns="years,hstart,ship", AxisType="Multiple Y" ), where years, hstart, and
2008 Aug 12
1
separate maps in one figure
My aim is to create a figure consisting of three maps: Alaska in the upper left corner, the 48 contiguous US states in the center right, and Hawaii in the lower left corner. In some ways the figure I'm trying to create is analogous to figure 1.5 in Paul Murrell's excellent "R Graphics", which combines a map of New Zealand with a map of the world. I tried adapting the code
2006 Dec 22
1
"inherit acls" only works with "inherit permissions"
We are running a fileserver (Samba version 3.0.10-1.4E.9) on CentOS 4.4. No AD, clients are Windows XP and OS X. Linux acl's are used for access to directories and files. Each top-level folder belongs to a primary group with mode 2770. The acl's restrict access to lower level directories. We need to pass the acl's down the directory tree or else users may have unexpected access to
2009 Jan 18
1
regression model selection
Hello, Newbie here, be gentle ;) I have a reference book that discusses regression model selection using several methods - what they call 'Forward Model Selection' i.e. add one variable at a time and examining R, R^2, Mallow's C-p value, etc., 'Backward Model Selection' i.e. starting out with all the variables included and then remove them one at a time, and examining for