Displaying 20 results from an estimated 200 matches similar to: "nls: how do you know if the model is significant?"
2012 Feb 13
2
different way for a for loop for several columns?
Hi,
I have a question about repeating something for several columns. I
calculated a lot of values for different objects. The values are normally
calculated step-wise for every day for each object. With this obtained data
frame, I make further calculations. Here I have to calculate some things and
I have to take into account the years because I want a number for each year.
I do these first for one
2012 Jun 04
2
Non-linear curve fitting (nls): starting point and quality of fit
Hi all,
Like a lot of people I noticed that I get different results when I use nls
in R compared to the exponential fit in excel. A bit annoying because often
the R^2 is higher in excel but when I'm reading the different topics on this
forum I kind of understand that using R is better than excel?
(I don't really understand how the difference occurs, but I understand that
there is a
2012 Jan 17
2
result numeric(0) when using variable1[which(variable2="max(variable2)"]
Dear all,
I have a question about the knowing for which row I have the max value of
one of my variables.
I calculated the Rsquared for different columns and made a list to gather
them. I unlisted this list to create a vector with this values. I want to
know for which column I have the max value of Rsquared.
The columns were always named in the same way. They always start with
results4$depth_
2012 Jan 18
3
manipulating data of several columns simultaneously
Dear all,
I have a question concerning manipulating data of several columns of a
dataframe at the same time.
I manage to do it for one column (with the use of the specific name for this
column).
In each columns, I have 60 values. But I should reorganize the values
(because I created this as an output before and I want to compare it with an
other dataset). I want that the value on row 2 becomes
2012 Mar 13
1
size of graphs when using multiple figures by row
Hi all,
I have a basic question concerning graphs in R. I?m using the par()
function and I?m working with multiple figures by row (mfrow) but my the
hight of my figures become compressed. I have 4 rows and 2 columns (because
I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my
margins with for example ?oma? and ?mai? but I don?t know how to choose the
size of the figure? I
2012 Feb 20
1
apply with as function ifelse with 2 logical conditions
Hi all,
I have a question concerning using several conditions in an ifelse function
used as the function in apply.
I want to create a new value with the function ifelse ? object which can be
coerced to logical mode ?test[n,] >1 & test[n-1,]==0?
With n I mean the row. I don?t know how I could do this without a loop. I
want to avoid the usage of loops and was thinking about apply. This
2012 Feb 15
2
function similar to ddply? + calculations based on previous row
Hi all,
I was wondering if there is a function kind of similar that splits a
dataframe, applies a function to each row and returns in a data frame. I
know ddply but this one isn?t useful in this situation.
I have a dataframe with values for each day (rows) for different objects
(columns). I have values for several years. Now, I want to do calculations
on only the data of that year. With the
2004 Jul 11
2
Interpreting Results of Bootstrapping
I tried to bootstrap the correlation between two
variables x1 and x2. The resulting distribution has
two distinct peaks, how should I interprete it?
The original code is attached.
Y. C. Tao
----------------
library(boot);
my.correl<-function(d, i) cor(d[i,1], d[i,2])
x1<-c(-2.612,-0.7859,-0.5229,-1.246,1.647,1.647,0.1811,-0.07097,0.8711,0.4323,0.1721,2.143,
2007 Jul 06
0
import DTM with readRAST6()
Hello everybody,
I am a new R & Grass user.
I am interested in doing a kriging of the Temperature in a basin,
based on pixel elevation (DTM).
I use Grass 6.2.1 and R 2.5.1 and have installed the spgrass6 package.
The DTM is called "DTM_trentino_100m" and is like this:
north:5158000.0
south:5058500.0
east:1729700.0
west:1611600.0
rows:995
cols:1181
-9999.0 -9999.0 -9999.0
2013 Feb 27
1
Finding the knots in a smoothing spline using nknots
Hi r-helpers.
Please forgive my ignorance, but I would like to plot a smoothing spline
(smooth.spline) from package "stats", and show the knots in the plot, and I
can't seem to figure out where smooth.spline has located the knots (when I
use nknots). Unfortunately, I don't know a lot about splines, but I know
that they provide me an easy way to estimate the location of local
2012 Jun 12
1
Analyzing large files faster
I'm trying to analyze the following data set (sample):
"ID" "adj.P.Val" "logFC" "Gene.symbol"
"1419156_at" "5.32e-12" "2.6462565" "Sox4"
"1433575_at" "5.32e-12" "3.9417089" "Sox4"
"1428942_at" "2.64e-11"
2009 Jan 26
1
glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
Problem:
I am sorting through model selection process for first time and want to make
sure that I have used glm, stepAIC, and update correctly. Something is
strange because I get a different result between:
1) a glm of 12 predictor variables followed by a stepAIC where all
interactions are considered and then an update to remove one specific
interaction.
vs.
2) entering all the terms
2005 Nov 07
2
how to export density_function output?
Dear all,
quite a naive question: I have a data frame and I computed "the kernel
density estimate" with density on each column.
Now I'd like to export in a txt file the density function output for each
column, but, when if I use write.table, I get a message "Error in
as.data.frame.default(x[[i]], optional = TRUE) : can't coerce class
"density" into a
2017 Dec 20
2
outlining (highlighting) pixels in ggplot2
Using the small reproducible example below, I'd like to know if one can
somehow use the matrix "sig" (defined below) to add a black outline (with
lwd=2) to all pixels with a corresponding value of 1 in the matrix 'sig'?
So for example, in the ggplot2 plot below, the pixel located at [1,3] would
be outlined by a black square since the value at sig[1,3] == 1. This is my
first
2006 Nov 20
1
Proportional data with categorical explanatory variables
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20061120/73240e63/attachment.pl
2012 May 04
7
Breaking up a Row in R (transpose)
I have the following:
Time A1 A1 B1 B1 C1 C2
x y x y x y
0 5 6 6 7 7 9
1 3 4 4 3 9 9
2 5 2 6 4 7 4
I want to change it to the following:
0 1 2
x y x y x y
A1 5 6 3 4 5 2
B1
2012 Jan 11
3
Accomplishing a loop on multiple columns
Hello,
I have a question concerning ?for loops? on multiple columns.
I made 91 columns with results (all made together with a for loop) and I
want to us lm to fit the model.
I want to compare the results of all these calculated columns (91) with one
column with observed values. I use the function lm to fit the model and
calculate r.squared. I manage to do this for each column separately:
For
2009 Oct 18
2
How to create MULTILEVELS in a dataset??
Dear R users
I have a data set which has five variables. One depenedent variable y, and 4
Independent variables (education-level, householdincome, countrygdp and
countrygdpsquare). The first two are data corresponding to the individual
and the next two coorespond to the country to which the individual belongs
to. My data set does not make this distinction between individual level and
country
2005 Dec 09
3
retrieving p-values in lm
Dear list,
I want to retrieve the p-value of a two-polynomial regression. For a
one-polynomial lm I can easily do this with:
summary(lm(b~a, data=c)[[4]][[8]].
But how do I find the final p-value in the two-polynomial regression? Under
$coefficients I don't find it
Any suggestions?
Patrick
alt <-(2260,2183,2189,1930,2435,
2000,2100,2050,2020,2470,
1700,2310,2090,1560,2060,
2011 Oct 24
3
extract the p value
OK, what is the trick to extracting the overall p value from an lm object?
It shows up in the summary(lm(model)) output but I can't seem to extract it:
> test2 = apply(aa, 1, function(x) summary(lm(x[,1] ~ 0 + x[,3] + x[,6])))
> test2[[1]]
Call:
lm(formula = x[, 1] ~ 0 + x[, 3] + x[, 6])
[omitted summary output]
F-statistic: 40.94 on 2 and 7 DF, p-value: 0.0001371
It does not seem