Displaying 20 results from an estimated 150 matches similar to: "lmList and lapply(... lm) different std. errors"
2008 Oct 03
1
NA's in segmented
I am trying to fit a very simple broken stick model using the package
"segmented" but I have hit a roadblock.
> str(data)
'data.frame': 18 obs. of 2 variables:
$ Bin : num 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ...
$ LnFREQ: num 5.06 4.23 3.50 3.47 2.83 ...
I fit the lm easily:
> fit.lm<-lm(LnFREQ~Bin, data=id07)
But I keep getting an error
2009 Jul 30
3
Looping through R objects with $ operator and tags
Hi all,
Suppose I want to set the values in a column to the log of the values
of another column like so:
object$LogDist <- log10(object$Distance)
How do I loop through the objects if I have object1, object2, etc to
perform this function?
object1$LogDist <- log10(object1$Distance)
object2$LogDist <- log10(object2$Distance)
object3$LogDist <- log10(object3$Distance)
I was trying to
2005 Jun 28
2
function for cumulative occurrence of elements
Hello,
I have a data set with 9700 records, and 7 parameters.
The data were collected for a survey of forest communities. Sample plots
(1009) and species (139) are included in this data set. I need to determine
how species are accumulated as new plots are considered. Basically, I want
to develop a species area curve.
I've included the first 20 records from the data set. Point
2010 Aug 31
4
weird to me interaction between time() and %%, %/%
Dear List,
I'm getting weird and unexpected behaviour using time and %%, or %/%. It's
likely I'm not appreciating the nuances of floating point arithmetic. Or it
could be a bug.
I'm running
> R.version
_
platform x86_64-redhat-linux-gnu kernel 2.6.33.8-149.fc13.x86_64
arch x86_64
os linux-gnu
system x86_64, linux-gnu
2008 Jan 21
2
experiments with slot functions and possible problems NOTE
Hello,
first of all, thanks to LT for \pkg{codeutils}. I agree that it is
indeed very useful to identify errors and also to encourage re-thinking
past solutions. My problem:
I want to compare different sets of related sub-functions which should
be used alternatively by the same top-level function. Sets of related
functions should be bound together (as lists) and the workspace should
be as clean
2012 Jan 30
1
how to sum multiple data entries for the same sampling event?
I'm having trouble with some catch per unit effort data (CPUE, fisheries
data). Some of the samples were "retained" and some "unretained," and they
are entered as 2 separate entries for the same sampling event (Date and
time). I want to calculate the total CPUE (so sum the "retained" and
"unretained" number for each sampling event) and am having troubld
2003 May 13
1
assessing the fit of a LME model
Dear All,
I would like to ask a couple of questions on a LME model.
I tested 4 selection lines at 4 food concentrations against a standard
competitor stock. I had 3 replicate cages per selection line. In each cage
I have 10 vials. I counted the number of wild type flies and competitor
stock emerging in each vial. My main question is: is there any difference
between selection lines?
I did fit
2011 Jan 26
2
2 functions with same name - what to do to get the one I want
There seems to be 2 functions call ecdf...
http://lib.stat.cmu.edu/S/Harrell/help/Hmisc/html/ecdf.html
http://127.0.0.1:11885/library/stats/html/ecdf.html
How do I get the one ecdf {Hmisc} to run instead of the ecdf {stats}
A pointer in the right direction would be greatly appreciated.
Tried to instal Hmisc but got this message, so I assume I have it
> utils:::menuInstallPkgs()
Warning:
2008 Dec 05
2
Help with wavCWTPeaks
I cannot understand the following error printed out when I try to get the extrema of my time series.
I would appreciate some suggestion as I really cannot interpret the error. I might not be using a proper
set of parameters in calling such functions. I am learning by doing ...
> aa.peak <- wavCWTPeaks (aa.tree)
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1",
2012 Sep 01
1
Vectorial analogue of all.equal()?
Greetings All.
Once again, I am probably missing something fairly accessible,
but since I can't find it I'd welcome advice!
I have a dataframe derived from a text file of data in tabular
format. For one of the variables, say X, I want to select the
subsets which in which X equals a particular value.
Such values are given in the text file like: 2.3978953, and each
such value will occurr
2009 Dec 15
3
RFC: lchoose() vs lfactorial() etc
lgamma(x) and lfactorial(x) are defined to return
ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively.
Unfortunately, we haven't chosen the analogous definition for
lchoose().
So, currently
> lchoose(1/2, 1:10)
[1] -0.6931472 -2.0794415 NaN -3.2425924 NaN -3.8869494
[7] NaN -4.3357508 NaN -4.6805913
Warning message:
In
2009 Nov 03
1
creating mulptiple new variables from one data.frame according to columns and rows in that frame
Dear R-helpers,
I have a data.frame (bcpe.lat.m) containing 13 countries, ages 0-50yrs per month, and the corresponding mu&sigma (see below).
* I would like to limit the age range to include all 12 months for the 1st 5 years and only whole years for all ages thereafter for each of the countries present in the data frame.
* I would like to create separate data.frames according
2003 Nov 11
1
cor
Greetings:
It would seem to me that the three arguments "a", "c" and "p" ought to
produce the same result with a data frame that doesn't have any missing
data which is not the case. What am I doing wrong or what don't I understand?
> tmp <- data.frame(vol,con,mot,esp,pri,sec)
> tmp
vol con mot esp pri sec
1 1.00 120 90 78 21 1
2 0.50
2006 Sep 04
1
merge files after cor.test
Dear All,
Suppose I have 2 files:
# first one : testid.csv
A
B
C
D
E
> (id<- read.table ("testid.csv",col.name=c("id")))
id
1 A
2 B
3 C
4 D
5 E
# second file is the result file I calculate from cor.text, which shows the
correlation coefficient.
> cor.value.t
1 2 3 4 5
1 1.0000000 0.2156213 0.31000492
2008 Nov 27
0
Help with "replicate"
Hello everyone,
I have a file called "trans" which has 100 records (rows) and 60 columns.
I need to make 2 samples (with 5 records in each) out of this file with no
replacement, so I used "replicate".
The sampling part works fine and I called the outcome "result".
my problem is then I need to calculate the correlation matrix for each
sample. I used
2009 Aug 11
0
SEM decomposition of Hessian
I'm trying to run an SEM, but I keep getting the following error message.
In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.
I have 4 latent variables (plant, AMF, abiotic, and soilAgg) with 2 or 4 indicator variables for each latent variable.My model is specified as:
>
2009 Jan 02
1
Calculating signicance value
Hi friends,
If someone can find out some time to go through my problem would be really
grateful.
I have a dataset(dataset1) as shown below:--
recmeanC1 recmeanC2 recmeanC3 recmeanC4 i1 i2 i3 i4 i5 i6 i7
i8 i9 i10 i11
1 NA 1 1.00 1.800000
NA 1 NA 1 1 NA 2 2 2 NA 2
2 2 2 1.00
2005 Mar 21
2
NaN
Dear R
What does NaN mean?
I recently did a correlation on a batch of data for some reason it didn't
like one column
cor(sleep,use="complete.obs")
BodyWt BrainWt SlowSleep ParaSleep TotalSleep
BodyWt 1.00000000 0.95584875 -0.3936373 -0.07488845 -0.3428373
BrainWt 0.95584875 1.00000000 -0.3867947 -0.07427740 -0.3370815
SlowSleep -0.39363729
2009 Feb 17
2
matrix output
Hi friends,
I have questions about printing a pretty big size matrix.
As you could see from below, the matrix wasn't showed in R at full size
(11X11), but it was cut partly into three smaller matrices (11X4,11X4,11X3).
I'm wondering if there is a way to show the whole matrix with dimension
11X11, do you know how to make it?
If R really couldn't fit the full big matrix at once, what
2006 Dec 28
1
LU bug in Matrix package
There is a bug in Matrix package, please check it, thanks!
Matlab result:
x =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
>> lu(x)
ans =
21.0000 22.0000 23.0000 24.0000 25.0000
0.0476 0.9524 1.9048 2.8571 3.8095
0.7619