search for: dateset

Displaying 9 results from an estimated 9 matches for "dateset".

Did you mean: dataset
2010 Apr 12
1
rpart: Writing values of the leaves to a dateset
I'm fitting a regression tree with rpart and I want to write the values for every leaf in a dataset. As an example take the variable turnover. Let's suppose my tree for turnover has 30 leaves and I want to have 30 datasets with dataset 1 containing the turnover values of the units in leaf 1, dataset 2 containing turnover values for the observations in leaf 2 and so on. How can I do
2009 Dec 21
5
Help,Suggest me some methods to identify training set and test set!!!
I want to split my whole dateset to training set and test set, building model in training set, and validate model using test set. Now, How can I split my dataset to them reasonally. Please give me a hand, It is better to give me some R code. and I see some ways like using SOM to project whole independents to 2-dimensions and find...
2008 Mar 20
3
create matrix
...nrow = [a,b], exctracting the element for longevity, and then with byrow = TRUE letting the data be filled in by row. At the end I would have to set the last element in 'survival' to '1', and then combine all matrices into one single one. So far I've used Excel to create these datesets manually, but with more than 1000 individuals this gets really tedious. I haven't used R before for this sort of a bit more advanced data manipulation, and I would really appreciate any input/primer about how people would go about doing this. Thanks, Felix _______________________________...
2011 Dec 27
2
How to create a loop and then extract values from the list generated by cor.test
...= "data.frame") ## Create vector with unique individual IDs WW_Wing_Individuals <- unique(WW_Wing_SI$Individual_ID) ## Create temp dataset with for the first individual temp <- WW_Wing_SI_Spring[ which(WW_Wing_SI_Spring$Individual_ID == WW_Wing_Individuals[1]), ] ## Create temp2 dateset with results of pearsons product-moment correlation (for the first individual) temp2 <- cor.test(temp$Delta13C, temp$FeatherPosition, method="pearson") Many Cheers, Keith ******************************************************************************************* Keith Larson, PhD Stu...
2005 Nov 03
1
Problems with abline adding regression line to a graph
...rot,cex = 2, col = "red", xlab= "TC/OS at GS32", + ylab="Grain crude protein (CP)") + }) This part works well and produces the datapoints as red circles. When I try to add a line, using a fitted linear model in a way that works perfect with other variables in the same dateset the following happens: > with(njfA_bcd, { + abline(lm(predict(m1tc) ~ TC_OS.G31), lty = 1, col = "red") + }) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ And this means? There exists missing values for TC_OS...
2012 Apr 17
1
Function with multiple indices
Hi, I wrote a function which works for one group but not for multiple groups in several years. Could anyone help me out? The dateset has 3 variables, year, group, and sales. I want to calculate the annual group median adjusted sales performance for observation i in group j and year yr, I do the following procedure. For each yar, 1. exclude observation i from group j 2. calculate the sales median for group j without observation i...
2012 May 09
0
Survival data with time dependent covariate
...or a person. The id variable is a number corresponding to a specific measurement on an indivudual. The date is the date of the measurement. Feverstart is the day the fever of a person started and dumfever is a dummy-variable which tells use whether the person had a fever or not. I need to build a dateset with a start and a stop variable for each day and a variable that tells me whether the person got a fever that day, like this: start stop fever 2011-04-11 2011-04-12 0 2011-04-12 2011-04-13 0 I already started to write a piece of code for this: surv...
2007 Oct 01
3
export csv
Hello, I wanna know how to export a data frame to Excel. For example I wanna export this data frame > M[1:5,] var1 var2 distance 1 41 42 0.2 2 41 43 0.304347826086957 3 41 46 0.19047619047619 4 41 47 0.155555555555556 5 41 48 0.209302325581395 I don't know how to use write.table or write.csv to do this. Can you help me please? Thanks.
2009 Feb 17
2
creating a map
I'm trying to create a fairly basic map using R. What i want to get is the map of the country with circles representing a count of students in each state. What I've done so far is as following - map("state") symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inches=F) this gives me the map of the country, but one that's not populated by my counts. Does