similar to: question about 'coef' method and fitted_value calculation

Displaying 20 results from an estimated 2000 matches similar to: "question about 'coef' method and fitted_value calculation"

2006 Jul 31
4
question about dataframe ("sensory") in PLS package
Dear all, I am trying to my dataframe for the PLS analysis using the PLS package. However I have some trouble generating the correct dataframe. The main problem is how to use one name to represent several columns in the dataframe. The example dataframe in PLS package is called "sensory". I cannot directly read the data file since it's a binary file. If I use
2005 Jun 16
1
AIC in glm.fit with intercept
Dear R users, glm.fit() gave me the same AIC's regardless of TRUE or FALSE intercept option. > myX <- as.matrix(1:10) > myY <- 3+5*myX > foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=TRUE) > foo$aic [1] 38.94657 > foo <- glm.fit(x=myX, y=myY, family = gaussian(link = "identity"), intercept=FALSE) > foo$aic [1]
2007 Apr 18
5
Problem with ?curve
Dear all R gurus, I have following syntax: y = c(1:10) chippy <- function(x) { y[5] = x sin(cos(t(y)%*%y)*exp(-t(y)%*%y/2)) } curve(chippy, 1, 20, n=200) But I am getting error while executing : Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ In addition: Warning message: number of items to
2010 Jan 27
1
control of scat1d tick color in plot.Predict?
Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know the ticks are produced by scat1d, but after spending a fair bit of time going through documentation, it still
2006 Aug 19
2
question about cbind()
Dear all, I have a question about how to get a matrix by combining a large number of columns from a data file. Suppose I read a file which have 1000 columns by: test = read.table("dat.txt", header=F) I know I could use "cbind()". It's easy to do when the number of columns is small (i.e. cbind(test$V1, test$V2)). But how about build a matrix "X" by combine the
2013 Nov 21
2
overlaying 2D grid on randomly distributed points
Hi, I have a cloud of randomly distributed points in 2-dimensional space and want to set up a grid, with a given grid-cell size, that minimizes the distance between my points and the grid nodes. Does anyone know of an R function or toolbox that somehow addresses this problem? This is a problem of optimizing the location of the grid, not a problem of deciding what should be the grid-cell size,
2008 Oct 29
1
How to set read.table variables to vectors?
The summary stats for the xin and yin variables below are correct. However, if I use plot(xin,yin), an exception is thrown saying that "object xin is not found." Also, it is apparent that I can't successfully replace the x and y vectors with values from xin and yin. The four plots on one panel are showing but the range of x and y is only [0,1], and therefore, it seems like an
2007 Nov 15
3
Graphics device storable in a variable
I'm using R embedded in PostgreSQL (via PL/R), and would like to use it to create images. It works fine, except that I have to create every image in a file (owned by and only readable by the PostgreSQL server), and then use PostgreSQL to read from that file and return it to the client. It would be much nicer if I could plot images into an R variable (for instance, a matrix), and return that
2006 Jul 03
1
xlab, ylab in balloonplot(tab)?
I'm not understanding something. I'm trying to add xlab & ylab to a balloon plot of a table object. From docs I thought following should work: require(gplots) # From balloonplot example: # Create an example using table xnames <- sample( letters[1:3], 50, replace=2) ynames <- sample( 1:5, 50, replace=2) tab <- table(xnames, ynames) balloonplot(tab)
2007 Oct 13
2
the use of the .C function
Dear All, could someone please shed some light on the use of the .C or .Fortran function: I am trying load and running on R the following function // psi.cpp -- psi function for real arguments. // Algorithms and coefficient values from "Computation of Special // Functions", Zhang and Jin, John Wiley and Sons, 1996. // // (C) 2003, C. Bond. All rights reserved. // //
2012 Apr 17
3
error using nls with logistic derivative
Hi I?m trying to fit a nonlinear model to a derivative of the logistic function y = a/(1+exp((b-x)/c)) (this is the parametrization for the SSlogis function with nls) The derivative calculated with D function is: > logis<- expression(a/(1+exp((b-x)/c))) > D(logis, "x") a * (exp((b - x)/c) * (1/c))/(1 + exp((b - x)/c))^2 So I enter this expression in the nls function:
2004 Sep 06
4
how to add error bar to the data in R?
Dear all, Does anyone knwo how to add error bar to the data point in a simple xyplot? Right now, I have a .dat file including both the data points and their standard deviation and read it in R. I tried function arrows(). But it didn't gave me any arrows. Thanks for the help! Jeny
2002 Oct 21
2
3-D scatter plot laid over Surface plot
Hello, I have created a Fitness surface (persp()), with data that was created by a tp spline procedure. Now I would like to superimpose a set (XYZ) of existing points (from two different treatments) onto this surface. I didn't come across any function or command that is able to do this in R. Could somebody please help me in finding a solution to this problem Thank you Peter --
2012 Aug 07
1
lm with a single X and step with several Xi-s, beta coef. quite different:
Hi, (R version 2.15.0) I am running a pgm with 1 response (earlier standardized Y) and 44 independent vars (Xi) from the same data =a2: When I run the 'lm' function on single Xi at a time, the beta coefficient for let's say X1 is = -0.08 (se=0.03256) But when I run the same Y with 44 Xi-s with the 'step' function (because I left direction parameter empty, I assume a backward
2008 Jul 02
1
Extracting regression coef. and p-values in JRClient
Hi there, I am using JRClient to build logistic regression model in the following manner : Rconnection c = new Rconnection(); c.eval("KSN<-read.table(\"/Users/amine/Documents/Research/ Tools/R/D2R1.txt\",header=T,sep=\",\")"); c.eval("result <- glm(Nausea ~ Kaletra*Sustiva, family = binomial(link = logit), data =KSN)");
2013 May 17
2
zigzag confidence interval in a plot
Dear All, When I plot the values and linear regression line for one data set, it is fine. But for another one I see zigzags, when I plot the confidence interval >cd Depth CHAOsep12RNA 9,94 804 25,06 1476,833333 40,04 1540,561404 50,11 1575,166667 52,46 349,222222 54,92 1941,5 57,29 1053,507042 60,11 1535,1 70,04 2244,963303 79,97 1954,507042 100,31 2679,140625 >
2011 Jul 28
1
Problem with anova.lmRob() "robust" package
Dear R users, I'd like to known your opinion about a problem with anova.lmRob() of "Robust" package that occurs when I run a lmRob() regression on my dataset. I check my univariate model by single object anova as anova(lmRob(y~x)). If I compare my model with the null model (y~1), I must obtain the same results, but not for my data. Is it possible? My example:
2008 Aug 18
1
"nested" getInitial calls; variable scoping problems
Hi All, Another nls related problem (for background, I'm migrating a complicated modelling package from S-plus to R). Below I've reduced this to the minimum necessary to demonstrate my problem (I think); the real situation is more complicated. Two similar selfStart functions, ssA and ssB. The 'initial' function for ssB modifies its arguments a little and then calls getInital
2010 Oct 17
4
Variable name as string
Hello, from Verzani, simpleR (pdf), p. 80, I created the following function to test the coefficient of lm() against an arbitrary value. coeff.test <- function(lm.result, var, coeffname, value) { # null hypothesis: coeff = value # alternative hypothesis: coeff != value es <- resid(lm.result) coeff <- (coefficients(lm.result))[[coeffname]] # degrees of freedom = length(var) -
2010 Mar 09
3
Shade area under curve
I want to shade the area under the curve of the standard normal density. Specifically color to the left of -2 and on. How might i go about doing this? Thanks -- View this message in context: http://n4.nabble.com/Shade-area-under-curve-tp1586439p1586439.html Sent from the R help mailing list archive at Nabble.com.