Displaying 20 results from an estimated 2000 matches similar to: "Shading area under density curves"
2007 Jun 20
2
Extracting t-tests on coefficients in lm
I am writing a resampling program for multiple regression using lm(). I
resample the data 10,000 times, each time extracting the regression
coefficients. At present I extract the individual regression
coefficients using
brg = lm(Newdv~Teach + Exam + Knowledge + Grade + Enroll)
bcoef[i,] = brg$coef
This works fine.
But now I want to extract the t tests on these coefficients. I cannot
2008 Jul 11
2
Help with error in "if then" statement
Dear list,
I'm afraid this is a mundane question. Here's the background: I've
produced a function which allows me to sequentially measure angles and
distances from a specified reference point to a curve defined by
empirical data points while (i.e. using a while loop) the angle being
measured is within certain bounds. Because the curve is circular I
need to pars the data
2003 Aug 01
1
shading in image()
Is there a way to make a shading interpolation on an image plot?
Something similar to matlab 'shading interp', I think it is called Gouraud
shading.
What I want is to make a image plot look nicer. with image() it looks very
facetted, and I would like to make it look smoother.
I've tried with interp.surface() in fields package but it (obviously) makes
nan values at the borders and
2007 Oct 01
4
Disentagling formulas
I am writing a program in which I would like to take in a formula, change the response (Y) variable into something else, and then pass the formula, with the new Y variable to another function. That is, I am starting with
formula <- Y~X1+X2+X3
and I'd like to do something like
Y <- formula$Y
newY <- f(Y)
lm(newY~X1+X2+X3)
So far, it seems that my
2009 Mar 21
2
limiting simulated animal movement
Hi,
I am trying to simulate animal movement in a gridded landscape made up of
cells. At each time step (iteration), the animal moves from one cell to
another in a random fashion.
This is how I am simulating movement, where a and b are the x,y co-ordinates
of the animal at the previous time step:
for (i in 1:no.of.steps){
direction <- sample(1:8, 1)
if(direction == 1){
a <- a
b <- b -
2008 Nov 21
1
different .Rprofile files for different projects
Dear list,
First off, let me offer my apologies, I know this is a very basic question. After amassing a large number of objects (from multiple projects) in one working directory, I'd like to be able to start using different directories, just for the sake of organization alone. But I have no idea how to do this. I am using a mac, running R 2.5.
Searching the FAQ online I find:
12.1 How
2003 Oct 28
2
[LLVMdev] cfrontend/src/configure
Hi all,
subj has the first line:
#! /usr/dcs/software/supported/bin/bash
I think we could be more liberalistic :)
best regards,
---
Valery A.Khamenya
2008 Jan 04
1
Plotting labeled impulses: label collision
Dear all,
As you can see from the attachment I'm using R to automatically annotate
peptide fragmentation mass spectra, which are represented by impulse plots.
I'd like to poll you on approaches of how to deal as generally as possible
with the two biggest annotation issues I run into:
1) very close annotated masses (impulses) with similar y-axis dimensions -
resulting in overlapping labels
2006 Jul 29
1
fancier plotting
Hi
thank you for talking the time to help me with this.
I have a sequence of numbers in a file and an equal sequence of various character, say(a b c d) each occurs more than once. I need to plot the numbers so that numbers corresponding to a in the other sequence would have green dots, those corresponding to b a red dot, nothing on c and blue square for d. i.e
2 a show a green dot
4 b show a
2009 Mar 03
1
Error loading packages at sprintf()
Hello all,
I'm running R2.8.1 on a Mac OS 10.4.11. While trying to install the package gdata, I was presented with the following (error at end of report):
R > install.packages("gdata")
also installing the dependency ?gtools?
trying URL 'http://cran.stat.ucla.edu/bin/macosx/universal/contrib/2.8/gtools_2.5.0-1.tgz'
Content type 'application/x-tar' length 85484
2004 Oct 25
1
Ref: Variable scope or function behaviour or array reassign
Dear R- helpers
Following a draft structure of the R script for which I am facing problem
Step 1
x <- of type array with original values
y <- of type array with original values
Step 2
for (ctr in 1:10) {
# my problem here the both x and y still show the original values from step 1
# in spite of making changes to the old values of the arrays x and y in the function
function
2006 Sep 22
4
Creating Movies with R
Dear All,
I'd like to know if it is possible to create animations with R.
To be specific, I attach a code I am using for my research to plot
some analytical results in 3D using the lattice package. It is not
necessary to go through the code.
Simply, it plots some 3D density profiles at two different times
selected by the user.
I wonder if it is possible to use the data generated for different
2010 Aug 13
2
Unable to retrieve residual sum of squares from nls output
Colleagues,
I am using "nls" successfully (2.11.1, OS X) but I am having difficulties retrieving part of the output - residual sum of squares. I have assigned the output to FIT:
> > FIT
> Nonlinear regression model
> model: NEWY ~ PMESOR + PAMPLITUDE * cos(2 * pi * (NEWX - POFFSET)/PERIOD)
> data: parent.frame()
> PMESOR PAMPLITUDE POFFSET
>
2007 Oct 12
1
Addition operation based on specific columns and rows of two data frames
#Hello,
# I have a question about the addition of values in specific columns and
rows of a Data frame.
# Below I have created two data frames, X.df and "Y.df".
## creation of X.df data frame
X<- matrix(0,16,3)
X.df<-data.frame(X)
X.df[,1] <- c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4)
X.df[,2] <- c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4)
names(X.df)[1]<-"L(A)a(i)"
2010 Aug 19
2
Can't read/write to _nonfi
Good afternoon,
Hope you all have a wonderful day. I am glad to be here. Hope you could
help me with the following errors that i have been trying to figure it all
out since last week.
I am using Splus from Insightful, and as i read, R and Splus are very
similar. So hope you could help me.
I have been continously received these error messages after i ran my small
program for couple of
2011 Oct 05
4
SPlus to R
I'm trying to convert an S-Plus program to R. Since I'm a SAS programmer I'm not facile is either S-Plus or R, so I need some help. All I did was convert the underscores in S-Plus to the assignment operator <-. Here are the first few lines of the S-Plus file:
sshc _ function(rc, nc, d, method, alpha=0.05, power=0.8,
tol=0.01, tol1=.0001, tol2=.005, cc=c(.1,2),
2003 Jan 29
3
multinomial conditional logit models
A multinomial logit model can be specified as a conditional logit
model after restructuring the data. Doing so gives flexibility in
imposing restrictions on the dependent variable. One application is
to specify a loglinear model for square tables, e.g. quasi-symmetry
or quasi-independence, as a multinomial logit model with covariates.
Further details on this technique and examples with several
2011 Oct 27
2
Syntax Check: rshape2 melt()
This is my first excursion into using reshape2 and I want to ensure that
the melt() function call is syntactically correct.
The unmodifed data frame is organized this way:
head(tds.anal)
site sampdate param quant
1 UDS-O 2006-12-06 TDS 10800
4 STC-FS 1996-06-14 Cond 280
7 UDS-O 2007-10-04 Mg 1620
9 UDS-O 2007-10-04 SO4 7580
19 JCM-10B 2007-06-21 Ca 79
20
2009 Aug 20
1
Questions on factors in regression analysis
I got two questions on factors in regression:
Q1.
In a table, there a few categorical/factor variables, a few numerical
variables and the response variable is numeric. Some factors are important
but others not.
How to determine which categorical variables are significant to the
response variable?
Q2.
As we knew, lm can deal with categorical variables.
I thought, when there is a categorical
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
Thanks for the reproducable example. I can confirm that it fails on my machine using
survival 2-37.5, the next soon-to-be-released version,
The issue is with NextMethod, and my assumption that the called routine inherited
everything from the parent, including the environment chain. A simple test this AM showed
me that the assumption is false. It might have been true for Splus. Working this