similar to: What is the correct model formula for the results of piecewise linear function?

Displaying 20 results from an estimated 110 matches similar to: "What is the correct model formula for the results of piecewise linear function?"

2008 Mar 24
1
Great difference for piecewise linear function between R and SAS
Dear Rusers, I am now using R and SAS to fit the piecewise linear functions, and what surprised me is that they have a great differrent result. See below. #R code--Knots for distance are 16.13 and 24, respectively, and Knots for y are -0.4357 and -0.3202 m.glm<-glm(mark~x+poly(elevation,2)+bs(distance,degree=1,knots=c(16.13,24)) +bs(y,degree=1,knots=c(-0.4357,-0.3202
2011 Sep 26
0
horizontal labels for a dendrogram
Dear R-help list, I'd like to create visualize the clustering of a dataset with a dendrogram. I'm using the following script: data = read.table("data.csv", header=T, sep=";") require(cluster) res = as.dendrogram(agnes(data)) chlab <- function(n) { if(is.leaf(n)) { att <- attributes(n) labx <- data$category1[att$label] lab_color <- ifelse(labx ==
2004 Jul 21
2
Cutting heatmap dendrogram
Hello, I've been clustering my data using hclust and cutting the resulting tree with cutree. Separately, I visualize the clusterings with heatmap. Is it possible to have the dendrogram on the heatmap reflect the cutree results? That is, instead of having one large dendrogram, it would have 4 or 25 in the example below. Any guidance on if that's possible or not, and what kinds of
2010 Jun 19
2
How to Print Rails Source
Hi all, Inspired by Mike Schwab, I''d like to read the Rails 3 source code on printed paper (and preferably in color). For example, xv6 (http://pdos.csail.mit.edu/6.828/2009/xv6-book/index.html) did a nice job printing their code ( http://pdos.csail.mit.edu/6.828/2009/src/xv6.pdf). It even has line numbers and an index. The only thing I would like to add is syntax highlighting. Anyone
2006 May 15
1
what's wrong with my "gls"? it does not allocate memory... even for the simplest AR1 model...
> myfit1 <- gls(col1 ~ col2+col3+col4+col5+col6-1, data=data2, corr=corAR1( 0.3202), method='ML') Error: cannot allocate vector of size 199712 Kb if I get rid of the "corr=corAR1(0.3202)" option, it works okay... can anybody help me? thanks a lot! [[alternative HTML version deleted]]
2013 Mar 21
1
Compatibility problem Iramuteq / R : help !!!
Hi, I try to run the Iramuteq software with R, on Windows 7 professional (latest version of Iramuteq, and I tried with the three latest versions of R). I properly installed the packages and coded the texts, but anytime I want to run the analysis, I receive this error message : Erreur R None1 None None. Could someone help me to deal with that problem ? Thank you !!! Arthur Borriello PhD student -
2012 Aug 28
1
don't print object attributes
Dear all Suppose the object below: > require(Hmisc) > require(plyr) > x <- dlply(iris, .(Species), describe) How can I print the object without displaying the attributes? I inspected ?print and ?print.default with no luck. > x $setosa x[, "Sepal.Length"] n missing unique Mean .05 .10 .25 .50 .75 50 0 15 5.006 4.40 4.59
2008 Sep 03
1
R puts '+' within my numbers
Hello, my test.R file contains two huge arrays (>3000 entries), from which R needs to calculate the Pearson Correlation, if I look at the file the numbers look correct. if I run R R < test.R --no-save I see things like this: 0.723, 0.838, 1.002, 0.364, 0.357, 0.227, 0.982+ , 0.963, 0.535, 1.214, 1.270, 0.832, 1.033, 0.632, 2.482, 1.239, 0.743, 1.077, 0.962, 1.052, 1.075, 1.427, 1.395,
2010 Jan 29
1
help on drawing right colors within a grouped xyplot (Lattice)
Hi, I've lost my mind on it... I have to scatterplot two vectors, grouped by a third variable, with two different dimensions according to whether each cell line in the plot is sensitive or resistant to a given drug, and with a different color for each of 9 tissues of origin. Here's what I've done:
2000 Jun 25
1
possible bug, anova.glm(), family="gaussian" (PR#579)
Dear R team, I don't get what I think I should get when using anova.glm() with family="gaussian" -- please ignore this and forgive me if this turns out to be another example of a fundamental misunderstanding on my part (a highly likely event!) For example: S <- as.factor(rep(c(rep("m",2),rep("f",2)),2)) A <-
2013 Oct 29
0
Mean error
Hi, Try either: res1 <- apply(mydata[,1:2],2,mean) ?res2 <- colMeans(mydata[,1:2]) ?identical(res1,res2) #[1] TRUE # Also if you need to find means for each group ("Ungrazed vs. "Grazed") by(mydata[,-3],mydata[,3],colMeans) #or if column names are "V1", "V2", "V3" aggregate(.~V3,mydata,mean) #or library(plyr)
2011 Feb 10
1
Newb Prediction Question using stepAIC and predict(), is R wrong?
I'm using stepAIC to fit a model. Then I'm trying to use that model to predict future happenings. My first few variables are labeled as their column. (Is this a problem?) The dataframe that I use to build the model is the same as the data I'm using to predict with. Here is a portion of what is happening.. This is the value it is predicting = > [1] 9.482975 Summary of the
2006 Aug 18
0
How to change passwords on LDAP Server?
Dear List People Someone here could please send me some advice on changin' LDAP passwords? It seems that everything is working nice, except by dovecot: I can send emails using my new LDAP password trought postfix smtp authentication, I can login to my Intranet website and to the Mod-LDAP protected pages on my company. I just can't POP my mail messages, because Dovecot says
2008 Mar 21
0
How to Package Extra Results to summary.lm
Dear R users, I came up with some simple functions to give me the standard betas and tolerance values from a predefined lm() model. I have been trying to insert the results from these functions into the coefficients matrix in a modified summary.lm function that I'm calling summary2 (I'd never edit the summary.lm function directly!!). I managed to get the results inserted into the
2013 Apr 02
0
coxph and variables
Dear list,I am quite new to the world of biostatistics and I encounter some issues in the precise understanding of the coxph function of the survival package.I have a set of survival data (patient who had (or died from) a breast cancer) I'd like to see which are the variables that might cause dead or not.When trying> summary(coxph(Surv(Time_to_distant_recurrence_yrs, !Distant_recurrence)~
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2007 Jul 14
0
ts model challenge (transfer function)
Dear useRs, I am trying to model a time series with a transfer function. I think it can be put into the ARMA framework, and estimated with the 'arima' function (and others have made similar comments on this list). I have tried to do that, but the results have so far been disappointing. Maybe I am trying to make 'arima' do something it can't... The data are time series of
2003 May 28
1
Kernel density
Hi, I want to fit a kernel density estimator by bkde of library KernSmooth. I need only the density value at the point 0. I do not understand the following behaviour: > q <- rnorm(100) > bkq <- bkde(q, bandwidth=0.11, gridsize=1, range.x=c(0,0)) Error in 0:L : NA/NaN argument > bkq <- bkde(q, bandwidth=0.11, gridsize=1, range.x=c(-1,1)) > bkq $x [1] -1 $y [1] NA > bkq
2007 Dec 08
0
help for segmented package
Hi, I am trying to find m breakpoints of a linear regression model. I used the segmented package. It works fine for small number of predicators and breakpoints.(3 r.v. 3 points). However, my model has 14 variables it even would not work even for just one breakpoints!. The error message is always estimated breakpoints are out of range. Since my problem is time related problem. So I
2011 May 20
5
regression coefficient for different factors
Dear R-helpers, In my dataset I have two continuous variable (A and B) and one factor. I'm investigating the regression between the two variables usign the command lm(A ~ B, ...) but now I want to know the regression coefficient (r2) of A vs. B for every factors. I know that I can obtain this information with excel, but the factor have 68 levels...maybe [r] have a useful command. Thanks,