Displaying 20 results from an estimated 5000 matches similar to: "Conditional model in R"
2010 Jan 25
1
locfit questions/problems
Hi,
I'm trying to work through the examples and code in Loader's
LOCAL REGRESSION AND LIKELIHOOD, and have run into a problem
with the code for one sided smoothing and change point analysis
(p. 110-112).
The code, after loading locfit:
midp<-(1945:1988)+0.5
fitl<-locfit(thickness~left(year), data=penny, alpha=c(0,10), deg=1, ev=midp)
2011 Oct 25
3
thanks for your input, fletcher
hey fletcher, thanks for your input here. :+)
and -- quite obviously -- your program will be
whatever it is that _you_ think that it should be.
of course.
the thing is, i am certain that i have been clear
that the feature that i believe will be "killer" is
on-the-fly formatted display. that's my stand.
and i'd say my reasoning has been equally clear,
namely that this
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of
row.
Example (actual list has ~200 elements):
> temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04))
> temp2<- data.frame(ID=c("Herb","Shrub",
> "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3))
> L<-list(a=temp1,b=temp2)
> L
$a
2009 Jul 13
1
Help get this simple function to work...
I have a function (see below). This function has one object, ID. If I run
the loops by themselves using a character value (ie,"VFFF1-7") instead of
the function object, then the loops work fine. However, when I try to
insert the character value via the function call, it doesn't work. I don't
get an error, but the TotalCover.df dataframe does not update according to
the loop
2009 Jan 14
3
multiple secondary axes
Dear R experts,
I want to plot a line chart with another secondary axis placed right to
the standard secondary axis which one can access with the axis command, so
that the data lines are seen in the same plot. Is there any way to do this
in R?
Many thanks,
Kirsten.
2009 Jul 13
2
Help me get this function to work...
I have a function (see below). This function has one object, ID. If I run the loops by itself using a character value (ie,"VFFF1-7"), then the loops work fine. However, when I try to insert the character value via the function call, it doesn't work. I don't get an error, but the TotalCover.df dataframe does not update according to the loop criteria. Any obvious problems that
2008 Aug 29
1
significance of random effects in poisson lmer
Hi,
I am having problems trying to assess the significance of random terms
in a generalized linear mixed model using lme4 package. The model
describes bird species richness R along roads (offset by log length of
road log_length) as a function of fixed effects Shrub (%shrub cover) and
Width (width of road), and random effect Site (nested within Site
Cluster).
>From reading answers to previous
2006 Nov 22
1
differences between aov and lme
Hi,
we have a split-plot experiment in which we measured the yield of crop
fields. The factors we studied were:
B : 3 blocks
I : 2 main plots for presence of Irrigation
V : 2 plots for Varieties
N : 3 levels of Nitrogen
Each block contains two plots (irrigated or not) . Each plot is divided
into two secondary parcels for the two varieties.
Each of these parcels is divided into three subplots
2009 Aug 19
2
how do i vectorize relational queries in R
I am basically trying to append a value(vector) to one dataframe using a
relational value from another dataframe. Obviously, I can use a loop to
accomplish this. However, is there a way to vectorize it?
Example:
> data <- data.frame(c(1,1,1,2,2,2,3,3,3),rep(2,9)); names(data) <-
> c("Sample","Score")
> meta <-
2009 Jul 30
2
weight median by count for multiple records
Hello everyone,
I have a .csv file with the following format:
uniqueID SubjectID Distance_miles Tag
1 1001 5.5 3
2 1001 7 1
3 1001 6.5 1
4 1001 5 1
5 1002
2009 Sep 07
1
Omnibus test for main effects in the face of an interaction containing the main effects.
R 2.9.1
Windows XP
I am fitting a random effects ANOVA with two factors Group which has two levels and Time which has three levels:
fita<-lme(Post~Time+factor(Group)+factor(Group)*Time, random=~1|SS,data=blah$alldata)
I want to get the omnibus significance tests for each factor and the interaction. I believe I can get the omnibus test for the interaction by running the model:
2010 Nov 04
5
Sorting data from one column with strings
Hello,
I have tried to find this out some other way, but unsuccessful I have to
try this list.
I assume this should be quite simple.
I have a dataset with 4 columns, "Sample_no", "Species", "Nitrogen",
"Carbon" in csv format. In the species column I have many different
species with varying number of obs per species
Eg
"Sample_no"
2007 Jul 30
1
simple coding question
I have a list of ICD9 (disease) codes with various formats - 3 digit,
4 digit, 5 digit. The first three digits of these codes are what I am
most interested in. I would like to either add zeros to the 3 and 4
digit codes to make them 5 digit codes or add decimal points to put
them all in the format ###.##. I did not see a function that allows
me to do this in the formatting command. This seems
2008 Oct 31
1
replace() error: new columns would leave holes after existing columns
Hello, I have a problem with using replace() to convert a vector of dates
from yyyy-mm-dd to julian date.
For example, I type
replace(x,2004-05-14,134)
and I receive an error:
Error in `[<-.data.frame`(`*tmp*`, list, value = 134) :
new columns would leave holes after existing columns
If I can successfully convert, I have a script that will convert all of
the dates in
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All
I have a problem with the height of the boxes in the key in the following.
(The text is over 2 lines to accentuate the problem of no space
between the rectangles.)
Is there an easy way to put a space between the rectangles; size
controls the width but there appears to be nothing for the height?
xyplot(1~1,
key = list(corner = c(0.8,0.8),
2009 May 20
3
error message re: max(i), but code and output seen O.K.
I have a researcher who is consistently get the warning message:
In max(i) : no non-missing arguments to max; returning -Inf
Best as I can tell the code is working properly and the output is as
expected. I would like some help in understanding why he is getting this
error message and what its implications are. I have his code.
Sincerely,
Kirsten Miles
Support Specialist
Research Computing Lab
2008 Oct 16
3
correlation
What test do I use to determine if there is a correlation between a
discrete variable and a continuous variable?
For example - I have water quality ratings for streams (excellent,
good, fair, poor) and a corresponding nitrogen concentration for each
rating. I want to know if the the ratings correlate with the
concentration of nitrogen in the stream.
Help?
2017 Jul 24
5
Ifelse statements and combining columns
Hi everyone,
I'm having some trouble with my ifelse statements.
I'm trying to put 12 conditions within 3 groups. Here is the code I have so
far:
dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" |
dat$cond == "cond3" dat$cond == "cond4"
yes = "Uniform"
no = ifelse(test =
2017 Jul 13
1
How to make a figure plotting p-values by range of different adjustment values?
Hi Jim,
Thanks for your help, I really appreciate it.
Perhaps I'm misunderstanding, but does this formula run different ajustment
values for this function?
logit(p = doc$value, adjust = 0.025)
I'm looking to plot the p-values of different adjustment values.
Thanks so much,
Kirsten
On Wed, Jul 12, 2017 at 8:49 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Kirsten,
2005 Feb 16
5
Repeating grey scale in graph?
Dear R users,
Could somebody tell me why the grey color ramp is repeated in this
graph, eventhough the ramp values go from 0 to 1? I must be missing
something obvious, but I can not see it!
z <-
c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226,
0.038507288,0.094184749,0.140959431,0.180803984,0.215159105,0.245096084,0.271412845,